question stringlengths 0 34.8k | answer stringlengths 0 28.3k | title stringlengths 7 150 | forum_tag stringclasses 12
values |
|---|---|---|---|
I'm newbie in wordpress. I want to implement a page like stackexchange-url ("stackexchange-url no idea how to implement. The user listing, info, avatar,user search everything will same. any idea about the issue??? | Take a look at Members List Plugin The Members Plugin allows you to create a post on your wordpress blog that lists all your wordpress members. When viewing the list of members you can also search through your members according to first name, last name, email address, URL or any other number of user meta fields you may... | Author page like wordpress answers | wordpress |
I have a custom post type for portfolio. To create one, you need to create a page with a particular template that i'm making, named page-portfolio. Now, a portfolio post has custom fields as well. But, how can i make a custom field that is displayed in the post only if i select the 'portfolio' template ? That is, a cus... | This is confusing you're mixing up the terminology of WordPress. A custom post type acts like a post and not a page . If you have a custom post type called "portfolio" and use the proper template hierarchy, you don't have to do anything special. But you will need to name it <code> single-portfolio.php </code> and not <... | Custom fields for custom post types | wordpress |
I have a bunch of options that I'd like the user to be able to change in bulk. Here's my code example. When this option selection changes, <code> <label>Default author</label> <select name='default_author' id='default_author' class=''> <option value='1'>user 1</option> <option value='5'... | this isn't a WordPress thing, just an issue with your JS. this: <code> jQuery("select[name^='post_author']").attr('selectedIndex',selected); </code> should be: <code> jQuery("select[name^='post_author']").val(selected).attr('selected','selected'); </code> | Selecting multiple options onclick | wordpress |
I am a trying to create a dashboard like custom page template that list post of of the current logged in user. I've tried to find a solution on the net. but none were appropriate | this should work for you: <code> if ( is_user_logged_in() ): global $current_user; get_currentuserinfo(); $author_query = array('posts_per_page' => '-1','author' => $current_user->ID); $author_posts = new WP_Query($author_query); while($author_posts->have_posts()) : $author_posts->the_post(); ?> <a... | How to display posts by current user/author in a custom page template? | wordpress |
I need to divide a set of taxonomy terms by the first letter of the term name. I found a few bits of code that may help but when I implement my code I get no return values. I'm sure it has to be something fairly small in my code but I just cannot find it. This taxonomy contains brands and labels carried by shops listed... | <code> $taxonomy </code> is possibly not set in this example? or maybe you've set it somewhere else in your code? also may want to check out php's ctype functions here. | How to list terms by first letter, as in A's then B's etc | wordpress |
I'm having some trouble with a custom thing I'm doing. I've implented a custom image uploader into a metabox in a custom post type. Now I'm trying to work out a way that will let me reorder the uploaded images. I found that jQuery Sortable would be a convenient way for the user to be able to just drag and drop in which... | I'm not entirely sure what your intentions are for the code, and unfortunately i didn't find what you provided worked very well, so i rewrote parts of the code supplied to make it into a more workable solution. This code will work for saving the attachment order in the metabox on <code> save </code> , not via ajax, but... | Custom function to rearrange attachments when creating posts – Almost there | wordpress |
I've created a custom post type as a plugin and released it into the repository. One of the core features involves using a featured image. I've added <code> thumbnail </code> to <code> $supports </code> in <code> register_post_type() </code> , so the meta box shows up in the Administration Panel. I'm also hooking into ... | There are comments in core code that this should be improved, but they are there for a while already. Basically there is no native function to add or remove part of some feature, only feature altogether. Doing it manually would be running something like this after theme is done (late on <code> after_setup_theme </code>... | Using add_theme_support inside a plugin | wordpress |
I found the perfect slider for my needs, the only issue now that is that I cannot get it to work correctly. Problem that occur is that the function created doesn't work like it should. It ought to display three posts from a specific category but it ends up pushing more posts, presumedly via the loop in the function. An... | replace <code> slideshow_featured_posts </code> function from that tutorial with this: <code> function slideshow_featured_posts() { $featured = 1; // Assuming that the name of the category ID number 1 is "Featured". $count = 3; // How many post to be shown as slides. Ideally, it should be more than 3 posts. add_filter(... | Problem with custom function from jQuery slider tutorial | wordpress |
I'm trying to pass a post's content (which may contain HTML) to JavaScript via wp_localize_script(). wp_localize_script() can't handle multi-dimensional arrays, so I'm encoding it in JSON and then decoding it with jQuery . That works fine as long as you it's only text and you replace the <code> &quot; </code> entit... | While it's not exact answer to your precise question, I agree with method suggest in comment. Just skip trying to stuff data into single dimension and make use of <code> l10n_print_after </code> argument instead. See stackexchange-url ("pass object/JSON to wp_localize_script") question and answer there. | Passing JSON-encoded HTML from Wordpress to JavaScript | wordpress |
I'm using the Wordpress SEO by Yoast plugin. I'm having problems getting the Sitemaps XML section to work properly. Google gives me the dreaded red X for the status of the sitemap. The error message Google gives is: 208 "Invalid URL This is not a valid URL. Please correct it and resubmit." The incorrect Google XML list... | Okay, I ended up using the Google XML Sitemap plugin. You can input the post id's of the pages you want excluded from the sitemap. I excluded the pages with null links and now Google accepts the sitemap. | Mystery URL http://#/ Listed in XML Sitemap Created by WordPress SEO by Yoast Plugin | wordpress |
I'm making this wordpress theme, and I need to create a menu that is vertical but its submenus are horizontal, like this: <code> MenuItem SubmenuItem | SubmenuItem AnotherMenuItem SubmenuItem | SubmenuItem </code> Now using wp_nav_menu() and CSS I can get this effect, but I don't have any idea on how to add the pipe sy... | This is another case where a pure-CSS definition will work. For example: <code> #main_nav_left li:after { content: ' | '; } #main_nav_left li:last-child:after { content: ''; } </code> | How to append to menu items selectively | wordpress |
I'm new to wordpress. Is it possible to say i would like to make this article public on this day and time AND have wordpress tweet it? Possibly tweeting the subject+link or a twitter msg i add in + link on that said time/date? | WordPress doesn't have "tweeting" functionality built in. However, post scheduling is built in. You just set the time when you want the post to publish on the edit post screen. If you use a twitter plugin like my own Simple Twitter Connect , and you schedule a post, then it will send the tweet at the same time as the p... | Timed post and tweet? | wordpress |
When do I use the following: home.php frontpage.php Under Settings > Reading Settings Front Page Posts Page I wish to clarify this as I find myself using "Placeholder Pages", empty pages just for the sake of a menu item and to display blog listings. If I use a Static Front Page (Set under Settings > Reading Settings > ... | You don't ever directly use (as in, select as a Page template) either <code> front-page.php </code> or <code> home.php </code> . WordPress uses these template files automatically, according to the Template Hierarchy rules. The <code> front-page.php </code> template file is used to display Site Front Page , whether you ... | Pages: frontpage.php, home.php, posts page etc | wordpress |
I had asked a related question on Super User: A use case of a system "receiving" files over FTP would be, for example, the way WordPress plugins are installed via 1-click where WordPress initiates a file transfer to the local Linux box from the remote WordPress plugin repository using ftp(s) More specifically this scre... | When you do something that requires WordPress write to the filesystem, it does a check to see if it has permissions to do so by writing a temp file. If this check fails it will ask for FTP details in order to write the files to your server. EDIT look in <code> wp-admin/includes/file.php </code> , line 843, for the <cod... | Why does WordPress require a ftp server to be running on the webserver to transfer plugins? | wordpress |
I am making a portfolio site where each portfolio entry is a subpage of "Work". In my template, I am trying to say something like: worked on 15 projects and counting, where 15 is the total number of subpages. Whats the easiest way to do this? | Use the following code, replacing the number after "child_of=" to the id of the parent page. <code> <?php $count = 0; $pages = get_pages('child_of=681&depth=1'); foreach($pages as $page) { $count++; } echo $count; ?> </code> Reference: get_pages | Easiest way to show total number of subpages | wordpress |
The home page displays the sidebar below the rest of all the latest posts, leaving a vacant sidebar area for the majority of the (long) page. The sidebar displays fine on any single post . My index.php and single.php are practically identical, apart from minor differences in the "next post", "previous post". There are ... | This has nothing to do with the JS error. On the home page, you're missing a closing div tag for <code> #content </code> and that is throwing the sidebar down below. You have other code errors, too: [Invalid] Markup Validation of superlogical.net - W3C Markup Validator . Scroll down in the validation report to see line... | Sidebar missing from Homepage | wordpress |
He Guys, i've been looking for a way to show a different Page-Template based on HTTP Referer or maybe the User Agent or what ever. I'm planning an Image-Gallery which should be shown in a Fancybox. My Idea is to use a template which contains only the <code> loop </code> and all the stuff i need to build the gallery cor... | Fancybox has built in fallback, it displays images without JavaScript. I don't see why you would want to remove the header ( or footer) since it usually contains some good info like your doctype, css, meta, title, etc. If you want it to look different ( aka strip it clean) you should still include it and use conditiona... | Different Template based on HTTP Referer | wordpress |
In Settings--> Permalinks is there any difference between: checking Custom Structure and using: /%post_name%/ or /%postname%/ Are they both correct? Will they both work? Thank you. -Laxmidi | <code> /%postname%/ </code> is the correct one and if you are asking be cause it says post_name in the codex then its just to show that you will get the actual post name. | /%post_name%/ or /%postname%/ in Permalinks? | wordpress |
I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info to the profile page and registration with.. <code> function my_custom_userfields( $contactmethods ) { //Adds customer con... | In order to do this you'll have to manually change the user-new.php page. It's not the correct way to handle it but if you're in desperate need this is how it's done. I added <code> <tr class="form-field"> <th scope="row"><label for="company_name"><?php _e('Company Name') ?> </label></t... | Adding fields to the "Add New User" screen in the dashboard | wordpress |
I've created a child theme that is a wide version of twenty-ten, and it is working for the most part. But I am struggling to make the header logo wider. You can see the work in progress here at http://7d7d.net The CSS that is not working is (it still shows as 980px): <code> #branding { margin: 0 auto; width: 1140px; } ... | in your theme's functions.php, look for this: <code> // The height and width of your custom header. You can hook into the theme's own filters to change these values. // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'tw... | Making a 1140px wide header logo in the twenty-ten theme? | wordpress |
Is there a plugin for this? Has anyone done it before? | I use the Auto Post Thumbnail plugin for doing just that on this site and it works fine. First image in a post becomes the featured image every time. | Any easy way to automatically set the first inline image in a post as the thumbnail? | wordpress |
Ok i have a wordpress site network. I would like to setup a support forum for my site. But i don't want users to signup in different pages. I mean i want my users to use the same wordpress login credentials in forum too. Is there any forum plugin available there. Thanks PS: Is it possible using bbpress? | take a look at Mingle Forum plugin, which is nice, simple and did the job for me on a couple of sites. also bbPress looks promesing but its still in a beta stage like @Rarst pointed out. and last you have SimplePress which is by far the most feature rich forum plugin I've seen. | What is best forum script available to integrate with wordpress? | wordpress |
This lists the posts in my custom taxonomy template page: <code> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> </code> How can I order those posts by comment count? | A friend helped me with a solution that I could place in my functions.php file: <code> add_filter( 'pre_get_posts', 'my_pre_get_posts' ); function my_pre_get_posts( $query ) { if ( is_tax( 'locations' ) && empty( $query->query_vars['suppress_filters'] ) ) $query->set( 'orderby', 'comment_count' ); return ... | How to order posts by descending comment count on taxonomy page? | wordpress |
In wp-signup.php there are these lines: <code> add_action( 'wp_head', 'wpmu_signup_stylesheet' ); get_header(); </code> I need to remove <code> wpmu_signup_stylesheet </code> from the <code> wp_head </code> action, but I seem to be struggling, I assume it is because the action is being called straight after. Here is wh... | The action is not right after actually. There is <code> get_header() </code> call, then <code> get_header </code> action and then locating and loading template file that has <code> wp_head() </code> in it. I try not to mess with removing things from inside of same hook you are at, so in this case I'd (ab)use that <code... | Is it possible to remove this action? (as it's added just before it's called) | wordpress |
I'm writing a plugin that will be using custom fields added by a theme. Because of this, it would be ideal if my plugin not be able to activate should these fields not exist. How do I go about displaying an error and forcing the activation to fail? | Code like this can do the trick. <code> function plugin_activation_check(){ if ( some_check_here() ) { // this is the fail case deactivate_plugins(basename(__FILE__)); // Deactivate ourself wp_die("Message to user."); } } register_activation_hook(__FILE__, 'plugin_activation_check'); </code> | Force plugin to fail activation | wordpress |
I have custom post type <code> product </code> like wp ecommerce. There are 30k posts in it. Also have relate custom taxonomy. Basically am trying to export those posts in csv, but query_posts with so many records is giving me trouble... Any tips??? | WordPress query mechanism drag whole set of results into memory so they are not suited for such large chunks of information. You can use <code> numberposts </code> and <code> offset </code> in <code> get_posts() </code> to split process into chunks. I am not sure if you will be able to do it in single run even then, so... | Not able to export large no. of posts in csv | wordpress |
Using Wordpress Stats on my site. On the admin bar when logged in and viewing the site, the spark image with daily stats is broken. It's not a critical issue, just an annoyance. Any ideas? Edit: Broken URL: http://www.denveroffthewagon.com/wp-admin/?page=stats&noheader&proxy&chart=admin-bar-hours&height... | While this could be caused by a variety of different issues, here are some general steps to take to try and troubleshoot it. Completely delete the plugin (deactivate and then delete files) and then re-install it. Simple, I know, but often works wonders. Try uploading the plugin files manually as well as installing from... | Admin bar stats widget plugin image broken | wordpress |
I have an events cpt with a slug "event" I am using it in several places but I am trying to create a "day" view that shows all the events for a given day. I also have the archive arg set in the CPT creation in functions.php I have been around and around on this one but essentially here is what I am trying to do: domain... | You will have to use the rewrite API to get that to work. First you need to register the rewrite rule. <code> add_action( 'init', 'wpse23712_rewrites' ); function wpse23712_rewrites() { add_rewrite_rule( 'events/day/(\d{4}-\d{2}-\d{2})/', 'index.php?post_type=event&event_date=$matches[1]', 'top' ); } </code> Then a... | How does: /index.php?post_type=event&event-date=2011-07-25 work? What if it doesn't work? | wordpress |
I'm using the migrate db plugin to do some find and replaces to the database after it's been exported. It continues to pester me with the directory isn't writeable error. I've went and chmod'd the whole /wp-content folder with the following command: <code> chmod -R 777 </code> which i know you're not suppoose to do; bu... | Ended up just exporting via command line. Neither answers were appropriate for the situation. | Migrate DB Plugin: Error "The directory needs to be writable" | wordpress |
I've been looking for a video plugin in the plugin depository but couldn't find one that I'm looking for. Basically, I want visitors to be able to play the video in the home page but the issue here is that the home page is displaying post excerpts. So if I would just post the video as normal, it would be cut in the hom... | The excerpt is not meant for content that is why it is called "the excerpt". Instead use a plugin like "Vipers Video Quicktags" or "Youtube shortcode" and add it to a template file and you'll probably want to get the url via a post meta field. for example ( using Youtube shortcode plugin and meta field called "video"):... | Do you know a video plugin that allows embedding in the home.php file? | wordpress |
i need to integrate facebook like button with some of additional features. those are.. every article/post has a 'Like' button (so that using this, when someone clicks 'Like' it'll appear in their Facebook news feed and add them to my Facebook page count direct from within my site) please help me to get all these featur... | You can't do the multi-like thing, but I use my plugin Simple Facebook Connect for this sort of thing. It has some features that might help you out. The Like module lets you add the Like button to all the posts and such. The Fan Box widget lets you add a fan box to your sidebar. That like button in the Fan Box (Like bo... | Facebook like plugin with Multi Option-Needed | wordpress |
Is there a coding doc or tutorial to create a SEARCH where it search post in all Blogs in WPMU that will place in WPMU primary site SEARCH? | Take a look at WPMU Global Search plugin which can easily search through all blogs into your WordPress MU posts by post title, post content or post author. and if you are not looking for a plugin then just take a look at the code and see how it's done. | Search post in all blogs in WPMU? | wordpress |
I want to hide my WordPress site (or any website) from the world and only allow certain users to enter. What's the best way of doing this without setting up user accounts and passwords? Or perhaps more precise, what's the maximum protection I can get without using accounts? Of course, I've chosen to block search engine... | stackexchange-url ("How to restrict access to uploaded files ?") There's an answer there to help you restrict access to images and other downloadable files. | Maximum protection without using password/login | wordpress |
I am running WP 3.2.1 on a dedicated server and having a little trouble with a second menu. I have a menu at the top of the page which is working fine but I've added a secondary left menu to the left column which is currently showing the top menu despite it being selected in the admin to show the left menu. In my funct... | You need to pass an array of menus to the <code> register_nav_menu </code> function like so: <code> register_nav_menus( array( 'menu-1' => 'Menu Top', 'menu-2' => 'Menu Bottom' ) ); </code> You then call them in your theme: <code> <?php wp_nav_menu( array( 'theme_location' => 'menu-2' ) ); ?> </code> | Second menu not showing | wordpress |
I have a WP network and have found that users with roles other than "super user" (admins, editors, authors, etc.) are getting a 404 when trying to preview draft posts/pages/custom post types. Any idea why this would be? I have the following: Version 3.1.4 Subdomain network install Domain mapping plugin (if this matters... | I Found this forum article . It was an issue with the domain mapping and cookies. I ended up making sure the following options were both checked in the Domain Mapping options: Remote Login Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled) | Some users getting a 404 when previewing draft posts/pages | wordpress |
Hi i am currently replacing my blog run on wordpress with another neat theme. I tried the preview template feature and everything is fine, just that i don't trust everything so easily when it comes to web-applications. So i want to use the same database currently used[meaning not to use same database for both sites, bu... | Just use the built-in exporter/importer . Export from the existing site, and import into the new site. You won't ever even need to touch the database. | Using the same database on another Subdomain | wordpress |
I am using a recipe plugin that uses a custom post type of 'recipe'. I currently have multiple lists of recipes from each category on a page. I am trying to get the title of each category list to link to an archive list of those posts within each category. This is not working, and I'm not sure if I need to create a new... | How did you create the link with your category '39'? Is it a custom taxonomy? Here's the test i just did and it works fine: In <code> functions.php </code> i created the custom post type ' recipe ': <code> add_action( 'init', 'create_recipe' ); function create_recipe() { register_post_type( 'recipe', array( 'labels' =&... | Archive list for custom post type categories | wordpress |
Several months ago my site (powered by WordPress) got hit by that webarh malware infection that set up a bunch of .htaccess redirects to its domain. Restoration of a good site backup nixed the problem, but apparently not entirely. Specifically, whenever I use Chrome, I log into my website's admin panel, and either edit... | Switch to twentyten or another theme for a second and make a test post. That will eliminate the theme. And replace all WP core files folders with ones of the same version; it could still be hiding there. Just upload them; don't do an install. This is a typical hack fix. Or, if you did completely clean the site, it coul... | Cannot find webarh/malware redirect infection that only shows on Chrome | wordpress |
The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide any joined-up examples of this. Whilst I've managed to get most of it working, I can't figure out how to properly imple... | There are several components to error/notice creation and display process: <code> add_settings_error() </code> call to add item to stack (global <code> $wp_settings_errors </code> variable). <code> settings_errors </code> transient that keeps the errors so they survive move from page to page. <code> settings_errors() <... | How should one implement add_settings_error on custom menu pages? | wordpress |
If your common with the code that wp_nav_menu function generates. You should know what im asking for. I need to add an indicator like a plus sign or an arrow to indicate that this menu-item has a sub-menu. I cant find a class or id that would allow me to do that. Im guessing ill need a plugin for this? BUT I need some ... | I would do this with JS I'm afraid. It's the quickest simplest form. Using jQuery I have this snippet. <code> jQuery(function($){ $('.menu li:has(".sub-menu")').addClass('has-sub-menu'); }); </code> Then you can use CSS to do what you need :) | How do I add an indicator to my .menu-item if it contains a .sub-menu? | wordpress |
There are a lot of plugins that color code. But most java developers work with Eclipse and Eclipse has a very specific way of coloring code. Is there a plugin that colors code exactly the same way Eclipse does? | The majority of the Syntax Highlight plugins work in a way that they create divs,spans with classes styled by css and you can simply overwrite that style with your own css to match the eclipse colors. Update turns out someone has done the job for you, take a look at SyntaxHighlighter Evolved which has an eclipse theme. | Color java code the way it is colored in eclipse | wordpress |
How can I generate a pretty permalink correctly for a post knowing the permalink structure? My posts where processed with the FeedWordPress plugin with the "Link" setting set to "Permalinks point to: The copy on the original website". So for all the posts in the admin area when editing a post the "Permalink" field unde... | GUID and permalink are two completely independent things. GUIDs are usually based on permalinks, but they don't have to be. Permalinks are not based on GUIDs in any way in modern WP (it had been changed long ago). If you permalinks are not being generated correctly then that plugin (or some other) is breaking something... | Create pretty permalink for a post knowing the permalink structure | wordpress |
am using Breadcrumb NavXT plugin. i want to show all the pages and subpages in breadcrumb.i know this is tough to understand, so am explain briefly here. i have the pages: -> mainpage ---> subpage1 ---> subpage2 ---> subpage3 if i select main page it need to show you are here> subpage1> subpage2> subpage3 if i select s... | That's not traditionally how breadcrumb navigation works, as I'm guessing you've discovered if you're trying to implement Breadcrumb NavXT. :) You might have better luck styling wp_list_pages so the links display horizontally and highlight the page you're on? Here's where it describes how to display the current page / ... | breadcrumb need to show all pages and subpages | wordpress |
I'm trying to add a new option to a theme options panel to hide/show the comments links in the theme template files. I've got the option to show up in the panel, but there's something wrong in that it doesn't work and there are no php errors. I've noted below in Main options code where I've added the option as an array... | To answer the first part of your question: your settings form already has the <code> checkbox </code> case covered; so if you add a new checkbox input, you don't need to add anything to the switch . This code will apply to all checkbox inputs you add: <code> case 'checkbox': ?> <input type="checkbox" name="vertig... | Add a new checkbox in theme options | wordpress |
I've searched far and wide to try and find an answer to my question. I'm hoping I can get help here. Here goes... I'm currently retrieving the terms of my custom taxonomy using: <code> <?php echo get_the_term_list( $post->ID, 'skills', '<ul><li>', '</li><li>', '</li></ul>' ); ?... | Can try this: <code> $terms = get_the_terms ($post->id, 'skills'); if ( !is_wp_error($terms)) : ?> <?php $skills_links = wp_list_pluck($terms, 'name'); $skills_yo = join(", ", $skills_links); ?> <span><?php echo $skills_yo; ?></span> </code> | How do I list custom taxonomy terms without the links? | wordpress |
Im using the W3 Total Cache plugin on my site, and I made page using the wp_list_comments and for some reason the page keeps coming up blank, it comes back after I disable the plugin but when i enable it everything goes blank again does anyone have a suggestion on how iI can fix this, im new to this plugin. thanks | You can turn off caching for your wp_list_comments template by placing <code> define('DONOTCACHEPAGE', true); </code> at the top of the page. Other constants available on a per page or template basis are: <code> define('DONOTCACHEDB', true); </code> Disables database caching for given page. <code> define('DONOTMINIFY',... | Page comes up blank using w3 total cache | wordpress |
I have an event scheduled to fetch feeds from different sources at midnight. I believe for some reason it is not being triggered. I use Core Control plugin for testing. When I 'Run Now' through it, it works fine. What could be possible reason? Any hint that could facilitate me to get to the cause? There is no argument ... | WP-Cron is not a guaranteed time task scheduler. The trigger for WP-Cron is somebody visiting the site itself, so if nobody visits the site at midnight, then the job doesn't run until somebody does visit the site later. Similarly, if you use a whole page caching mechanism like WP-Super-Cache, then anonymous users will ... | Scheduled event does not run at midnight | wordpress |
I came across this function to add image to rss feed. However, I keep getting lots of syntax errors. <code> /* Add RSS Logo */ function addRssImage() { echo "<image> <title>My Title</title> <url>" . get_bloginfo('template_directory') . "/images/logo.png</url> <link>" . get_bloginfo('... | The code you posted is missing an ending <code> } </code> here is a fixed and tested version of that code, so if you still get errors they are coming from another place <code> function addRssImage() { echo "<image> <title>My Title</title> <url>" . get_bloginfo('template_directory') . "/images/lo... | How to add logo to rss feed | wordpress |
After the solution to stackexchange-url ("this question") was to get a function to launch BEFORE the <code> init </code> action is fired by taking the sequence out of its function, it got me thinking, is there any earlier in the WP load sequence that I can hook a function into? | <code> muplugins_loaded </code> is the very earliest: http://codex.wordpress.org/Plugin_API/Action_Reference (via: stackexchange-url ("stackexchange-url | What is the very earliest action hook you can call? | wordpress |
After installation I've got a default root blog '/'. Then I've created a new one '/en'. I really don't want to use the default blog. How can I redirect all accesses from / to /en ? | In your .htaccess file in the main '/' directory, put: <code> # This allows you to redirect index.html to a specific subfolder Redirect /index.html http://example.com/en/ </code> | How to redirect root blog to a specific one in multilang WP? | wordpress |
So, I've been building a theme options page, one of the purposes of which is to get some style values to pass to my php stylesheet in the url. Here's what I have: <code> /* Get all theme settings */ global $options; $options = get_option( 'theme_options' ); /* ...and set 'em up! */ $stylevar = '?ts='.$options['thumbsiz... | PHP (as usual) has some nifty stuff, namely <code> http_build_query() </code> for putting together URL requests. However for some reason (historically) PHP4 compatibility and encoding issues currently WP maintains fork of that function internally and offers <code> build_query() </code> wrapper, as well as nifty higher ... | Need some PHP schoolin'! passing var to url and the old options table | wordpress |
I'm having a devil of a time getting my plugin settings to save. I've gone through the code so many times I have to think I've simply missed something. I'm following the Setting API, but any changes I make on the plugin settings page don't save. What did I miss? <code> function __construct() { self::$instance = $this; ... | the problem is you keep resting the values here: <code> $options = array( 'cemb_seminar_seminars_college' => '0', 'cemb_seminar_showcases_college' => '0', 'cemb_seminar_writers_college' > '0', 'cemb_seminar_aet_college' => '0', 'cemb_seminar_mbu_college' => '0', 'cemb_seminar_eis_college' => '0', 'cem... | Plugin settings not saving | wordpress |
THIS WORKS: <code> <script type="text/javascript"> function fadeReview() { jQuery(".reviewPanel .reviewPanel2:hidden:first").fadeIn(500).delay(3000).fadeOut(500, function() { jQuery(this).appendTo(jQuery(this).parent()); fadeReview(); }); } fadeReview(); </script> </code> BUT, THIS DOES NOT WORK: <code> <... | "Won't work" doesn't say much. Use Firebug with Firefox, or in Chrome or Safari or IE8, use the developer tools to check for JS errors on your site. WP3.2 now includes jQuery 1.6 and your jsfiddle example uses 1.4, so there's a possible conflict. | Why won't this jQuery work in WordPress? | wordpress |
I'm wanting to find a way to have all pages listed without paging and to do so in a method that isn't going to be over-written when I update WordPress, i.e. in the form of a hook. The page is in the administration: With all the pages being listed I can then use javascript to do collapsing to show/hide subpages, I'm not... | If that listing has too many pages, maybe you'll run into troubles. You probably already know that this can be set in the Screen Options of the page <code> http://example.com/wp-admin/edit.php?post_type=page </code> . If you try to put a really high value there, this warning pops up and the system doesn't accept it: Bu... | How to list ALL Pages in the dashboard? | wordpress |
I've created a custom post type that displays the individual entries collectively on a page. However, I've found that Google is not only indexing the page, but the individual posts as well. I only want the page to be indexed and followed, and not the posts. Is there any way to accomplish this? | Answering my own question here: The WordPress SEO plugin provides a menu for all posts and pages, including custom post types, that includes noindex and nofollow options. | How to noindex nofollow custom post type? | wordpress |
How can i get the row counts in query post like mysql count(*). <code> $obj_name = new WP_Query($args); while ($obj_name->have_posts()) : $obj_name->the_post(); // here i want to predict looping counts endwhile; </code> How can i do this. | <code> $num = $obj_name->post_count; </code> Reference: wp_query | How can i get count from query post | wordpress |
Is there a way to put a placeholder text in the category form label? Right now the label is empty and has a dropdown menu filled with categories. I want to make a dummy placeholder text which will be something to : CHOOSE THE CATEGORY! <code> <option value="<option value="<?php wp_dropdown_categories('exclude=... | You can add it as an argument: <code> <?php wp_dropdown_categories( 'show_option_none=CHOOSE THE CATEGORY!' ); ?> </code> Reference: wp_dropdown_categories | placeholder text in category form label | wordpress |
I've searched around and can't find anything on this, so thought I'd see if y'all could help. I am successfully scheduling posts and having them publish - no "missed schedule" problems - but when a scheduled post is published, WordPress does not ping Feedburner, and my feed is not updated. I can manually go into Feedbu... | That's weird, but you can try this. Go to WordPress Dashboard > Settings > Writing administration screen, and to the existing URIs listed under Update Services , add this: <code> http://ping.feedburner.com </code> More Info: WordPress Codex — XML-RPC Ping Services | Feedburner doesn't update when "scheduled post" publishes | wordpress |
I am using the date and time in the post dialogue to log the date and time of future events, and would like to change the text to reflect that. Is there an action hook I can tap into to achieve that? Also, it would be perfect if I could pull those controls out of the 'publish dialogue', and add it to my own meta box. | Use a <code> gettext </code> filter and match against the text. <code> add_filter( 'gettext', 'filter_published_on', 10000, 2 ); function filter_published_on( $trans, $text ) { if( 'Published on: <b>%1$s</b>' == $text ) { global $post; switch( $post->post_type ) { case 'your-posttype': return 'Whatever o... | Change the 'published on' text? | wordpress |
I want to know how to import my YouTube channel into my WordPress website? Example: I have a YouTube channel with 7 videos . I want to bring all the videos into my WordPress website's sidebar. If I click the listed videos from my channel's list, it'll need to play. For more reference this is the sample output that I ne... | I'd use the plugin Tubepress . It has a lot of options to suit your needs, such as a sidebar widget that can play your videos in a lightbox for example. I used it a few times, it's quite powerfull and customizable. | How to import my YouTube channel into WordPress? | wordpress |
I need a bit of quick help. How do I exclude category ID number 50 for example in drop down list form in Wordpress? I have this code and I need to just insert the excluded category id. <code> <?php $cate_id = retrieve_cat_data(true); $cate_name = retrieve_cat_data(false); for ($i = 0; $i < count($cate_name); $i++... | try: <code> <?php $cat_to_EXCLUDE = 50; $cate_id = retrieve_cat_data(true); $cate_name = retrieve_cat_data(false); for ($i = 0; $i < count($cate_name); $i++ ) { ?> if ($cate_id[$i] != $cat_to_EXCLUDE){ <option value="<?php echo $cate_id[$i]; ?>"><?php echo $cate_name[$i]; ?> </option>&l... | Exclude category from drop down list form | wordpress |
I was trying to create a shortcode for a multiple tabs panel. The user can set the number of tabs, the titles and the content for each. It would be something like : <code> [tabs number='4'] [tab title='First_tab_title']first tab content[/first_tab] ... ... [/tabs] </code> Now, i am wondering. Although it can be done li... | You might be able to hack a conditional for 1 shortcode but it seems wonky. Typically you use 2 parameters just like you were using raw html. There is a smart way around this using custom fields ( which I just happened to do recently). It does not use any shortcodes at all, the logic is simple it has a custom fields ca... | Multiple Content Shortcodes | wordpress |
I'm trying to create a site where a 'Game' has a set of information (im thinking it will be a custom post type, with a 'link' field, 'developer' as a taxonomy, 'price', 'release date' and some other information. I want to be able to make a post, in a category (such as 'reviews') which links to the relevant game and can... | I would create a separate Reviews CPT. In the Reviews write screen, I would add a metabox with a select input contain each Game CPT as an option. Using the metabox, you can associate the Game ID as postmeta with the Review. Finally, in your template page that displays the review, you can easily retrieve the Game ID, wh... | attach CPT data to a taxonomy | wordpress |
when we open a post, we at the bottom of the page field to post a comment I would like to hide this field. if there are comments, usually shows them however to leave a comment, click a button with this, the field appears to leave a comment Anyone have a clue how to do this? Through either normal or ajax | you can do this very easily with jQuery simply wrap your comment form in a div and hide, add a button or a link and on his click event show the comment form so smoothing like this: <code> <a href="#" ID="Leave_a_comment">Leave a Comment</a> <div id="comment_form_wrapper" style="display: none;"> <?p... | just show the field comment by clicking button | wordpress |
Hi I have a VPS and one particular site is apparently causing the server to crash and I am getting alerts about lots of IO going on. How can I troubleshoot to see what is causing the extra load? | 1) Try WordPress › WPDB Profiling « WordPress Plugins to see what is running all the queries. 2) Clearing post and page revisions will greatly reduce the size of a WP database - up to 90% in some cases - with a huge return in speed and lower server load. Run as SQL query in phpmyadmin to delete revisions; change table ... | WordPress site causing lots of server IO | wordpress |
I would like to know the procedure to put my categories in the left menu on the widget in the same style of yahoo I like this style: ScreenShot-> http://broalliance.com.br/kafra/image-1ED5_4E270F69.jpg what is the best option? html and use a field to do manually? how would the css? | Check your site source to see what classes do your category links have on them, then style these classes with CSS, like: <code> .category-5 a{ background:transparent url(images/...) no-repeat left top; padding-left: 25px; } </code> | Menu in widget with yahoo style | wordpress |
I'm using switch_to_blog() and restore_current_blog() to perform some functions across a multi site install. One of the things I'm trying to do is select a very specific post using get_row(). My function looks like this: <code> $prefix = $wpdb->prefix; $tbl = $prefix; $product = $wpdb->get_row("SELECT * FROM {$tb... | Edit: You have an extra underscore in your table name, it becomes <code> wp__posts </code> in your case. Better use like how I have shown below :) First, use table names like the following and try var_dump to see if it returns NULL. In case the Post ID doesn't exist, <code> $product </code> will be <code> NULL </code> ... | Trouble with SQL SELECT inside switch_to_blog() | wordpress |
I'm trying to redeclare a function in a wordpress child theme that is already in use by the parent theme. However, I get a "Fatal error: Cannot redeclare" message when trying to do so. Also, I've tried using the following with no luck: <code> if (!function_exists('jr_load_scripts')) { // do fancy things here... } </cod... | It is somewhat counter-intuitive but WordPress loads child's theme code before parent's theme. So wrapping anything in <code> function_exists() </code> in child theme does nothing, it's parent theme that needs to have that. Better option is to unhook parent's theme function (unless it's run right at load, which it shou... | Wordpress Child Themes | wordpress |
Can I get the term by it's id without knowing to whish taxonomy it belongs? I have a meta field that stores term ids, but doesn't store the taxonomy. However, all the <code> get_term </code> function have taxonomy parameter marked as required. Maybe I can get the taxonomy of the term by it's (term's) id somehow? | Yes, but you need you make your own SQL query. A modified version of WP's get_term(): <code> function &get_term_by_id_only($term, $output = OBJECT, $filter = 'raw') { global $wpdb; $null = null; if ( empty($term) ) { $error = new WP_Error('invalid_term', __('Empty Term')); return $error; } if ( is_object($term) &am... | get term by id without taxonomy | wordpress |
I am presently learning PHP and Linux simultaneously. And I want to blog my notes not only for my future reference, but also because it could help others. I just noticed an issue with Wordpress - - it automatically adds <code> <pre></pre> </code> tags in the background (HTML-side I mean, in the visual edito... | The only way to keep it the way you paste it is by switching to the HTML tab - this will show you the raw code as you formatted it. Wrapping code in tags is also a good idea because it tells the browser that the code is literally 'precomposed', and it therefore won't render it. In terms of WP actually altering your cod... | Wordpress automatically adds tags when pasting code, how to stop it? | wordpress |
I downloaded a widget for my blog, which works just like the calendar widget but displays a custom post type instead. It correctly marks my CPT-posts and creates links, such as http://localhost:8888/wp/?m=201105 for a certain month and http://localhost:8888/wp/?m=20110510 for a certain day. Now I want to create the req... | The problem is that the plugin only handles the calendar part, and not the archive query. What you need to do: Change the main query on archive pages if the post_type argument is present, eg: http://localhost:8888/wp/?m=201105&post_type=candy : <code> add_filter('pre_get_posts', 'atom_include_cpt_in_archives'); fun... | A problem with date archives | wordpress |
In this wordpress blog , one can vote the comments. I am wondering how can I set up this function in my wordpress blog? | If your blog is self-hosted, the easiest way to add a comment voting system is to install a plugin (e.g. Comment Rating ). If your blog is on WordPress.com, then you'd need to go through the options the options on WordPress.com to see where you could enable that functionality. | How can I set a vote on the comments? | wordpress |
I made this website for my client using WordPress. It's all great but now he's asked me that when someone loads the website, before all the WP goodness, there's a page showing just the logo, then you click the logo and go to the main page. I'm thinking I could either do this by changing WP's index to some other name an... | Just tell him that doing so is bad for SEO and no one has done this since 1998. | Need 'logo page' before wordpress page! | wordpress |
I'm trying to restore a Wordpress blog from a backup. Unfortunately, all I have is an SQL dump of the database as generated by phpMyAdmin. The dump was created when the blog was running Wordpress 2.9/2.9.1/2.9.2. The new blog is a brand-new installation of Wordpress 3.2.1. How can I import the contents of the SQL dump ... | If it is an older version of WP, you need to find out what version of WP generated the database, as WP upgrades the DB most times the files are upgraded and you should incrementally upgrade to also upgrade the database. Look in the wp_options table for option 711 and see what the version is; option name will be site_tr... | Import old SQL dump into new Wordpress version | wordpress |
I am trying to remove the admin bar from a theme front end of a theme. I found the following code block: <code> add_filter( 'show_admin_bar', '__return_false' ); remove_action( 'personal_options', '_admin_bar_preferences' ); </code> Which works fine. However I wanted to add a choice for the user, so that I can add a pe... | Just launching the function at an earlier point solved the issue <code> function block_admin(){ $show = get_option('admin_bar_'); $show = $show['admin_bar_toggle']; fb::log($show,'shoe'); if (!$show || $show != 'on'){ add_filter( 'show_admin_bar', '__return_false' ); remove_action( 'personal_options', '_admin_bar_prefe... | Problems with removing admin bar | wordpress |
I'm trying to work with an API that expects an XML string in the body of the post. Additionally, the docs for the API specify: Please post with mime-type text/xml with the XML in the body of the post I want to use the WordPress HTTP API to make this work, but I'm running into some problems. So far I have code like the ... | I figured it out. The WordPress HTTP API was doing it's job; my problem was with the API I was working with. I just modified my code like: <code> $url = 'https://www.testurl.com'; $xml = <<<TESTED XML HERE>>>; $response = wp_remote_post( $url, array( 'method' => 'POST', 'timeout' => 45, 'redirec... | Posting an XML request using HTTP API | wordpress |
I would like to just get the HTML that comments_popup_link generates, and echo it later on. I don't see the comments_popup_link has an <code> $echo </code> parameter, and I don't see a get_comments_popup_link function, like there is get_the_ID, that returns HTML istead of displaying it. I'm using WordPress 3.1.2 What c... | I found this ticket that addresses my problem exactly: http://core.trac.wordpress.org/ticket/17763 | comments_popup_link without echo? | wordpress |
Hi I set up wordpress on a VPS and I'm running into two problems: Either WordPress asks for ftp details in order to update plugins or delete them or Through FTP I cannot delete files as I get a permission denied error. Problem 1 is solved by running: sudo chown -R www-data public_html Problem 2 is solved by running: su... | you can run something like <code> sudo chown -R myusername:www-data public_html </code> it will solve both the problems together | WordPress folder ownership issues | wordpress |
I found a patch I want here: http://core.trac.wordpress.org/ticket/17763 I can see the diff , but what do I do now? How can I get that code into my Wordpress? Do I have to copy it manually? Is there anywhere to download it from? | You can download the diff file from the bottom of the diff page. The program to apply a diff is called "patch". It's widely available for various platforms. Example usages: http://en.wikipedia.org/wiki/Patch_(Unix)#Usage_examples | How to apply a patch? | wordpress |
I am seeing that in the last 2 months blocked spam comments in Akismet have jumped from around 8k to more than 100k in each of the last two months. Is there any way to stop them being posted in the first place? | You can prevent some hits by blocking bots before akismet catches them, these plugins can be very effective. Plugins : Bad Behavior plugin: http://wordpress.org/extend/plugins/bad-behavior/ Honeypot Traps: http://wordpress.org/extend/plugins/project-honey-pot-spam-trap/ WP-Hashcash http://wordpress.org/extend/plugins/w... | Getting thousands of spam comments | wordpress |
I have the following: <code> $query = 'SELECT * FROM wp_pod_tbl_add_questions WHERE id LIKE '. $id; $row = $wpdb -> get_results($query); </code> How do I get the columns named 'id' and 'name' from $row? | <code> foreach( $wpdb->get_results("SELECT * FROM your_table_name WHERE id LIKE' . $id . ';") as $key => $row) { // each column in your row will be accessible like this $my_column = $row->column_name;} </code> More info here | How to parse row results from $wpdb -> get_results | wordpress |
I have a page that is password protected, and I wish to removed some parts of the theme, and add others. Can I do that? Is there a check I can do in the theme files to see if a user has entered the password or not? | Just use the <code> post_password_required() </code> conditional: <code> <?php if ( post_password_required() ) { // Post is password-protected; do something } else { // Post is NOT password-protected; do something else } ?> </code> | Using password protection to load different page elements? | wordpress |
Can i make it possible for an excerpt to be displayed in the index page but that part of the excerpt will not be displayed in the single post anymore? | Certainly: use the "Excerpt" textarea on the Post Edit screen. It should be immediately beneath the "Content" textarea; if not, check Screen Options (tab in the upper right-hand corner), and ensure that the "Excerpt" checkbox is enabled/checked. | Display a paragraph in the index page that won't be displayed in the single post | wordpress |
I have a members section on my site and they see specific custom menu items. I'm seeking a way to simply apply a star to the <code> <li> </code> based on it's permission level and what the user's role is. Something to the effect of. <code> if( current_user_can('integrator') || current_user_can('distributor')) : <... | WRT to your question "need to apply the class if another class is present and the user's role is (whatever)" The easiest was to do this, isn't in the code, but yet in the CSS. You can target an element that has more then once class. So, using your class <code> PARTNER_STAR </code> and if your other class is say <code> ... | How do I apply a class to custom menu items based on user roles | wordpress |
Say, for example, I have the following custom taxonomy: <code> Term 1 Term 1.1 Term 1.2 Term 1.2.1 Term 1.2.2 Term 1.3 Term 2 Term 2.1 </code> How can I get the children terms of Term 1, not including grandchildren? That is, I want my results to include only Term 1.1, Term 1.2, and Term 1.3. Thanks. | possibly with <code> get_terms() </code> and the <code> 'parent' </code> parameter: http://codex.wordpress.org/Function_Reference/get_terms | Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term | wordpress |
Does anyone know how to get 1 or 2 specific posts on top of my wordpress blog all the time? I mean just like in a forum where you can sticky a post so they are always on top of the other posts. Is this maybe a simple line of code (i am not realy a coder) or does anyone knows a good plugin for this? Any help would be re... | Set it as a sticky post: | How to get 1 or 2 specific posts on top of my wordpress blog? | wordpress |
I want to retrieve a specific post_meta of all posts contained in a specific category. I want to build a search form at the top of each category with a select field which would be filled up by the required post_meta of all the post contained in the category the user is currently in. Is this doable? Maybe it's possible ... | Thank you very much for your answers! I finally found what I wanted here : http://sixrevisions.com/wordpress/custom-fields-search/ Here is the code : <code> <form name="search" action="" method="get"> <select name="City"> <?php $metakey = 'city'; $cities = $wpdb->get_col($wpdb->prepare("SELECT DIST... | echo get_post_meta of all post in a category to fill up a select field | wordpress |
I have a custom search which is a form that submits to the same page and uses wp_query to filter the results for a jobs site that I would also like the keyword search to also search in custom fields and a custom taxonomy but I am unsure how to use posts_join to do this. I want to allow the user to type in the reference... | Managed to figure it out by adapting that code from the link i posted: <code> function atom_search_where($where){ global $wpdb; if($_SESSION['js'] != '') $where .= "OR (t.name LIKE '%".trim($_SESSION['js'])."%' AND {$wpdb- >posts}.post_status = 'publish')"; $where .= "OR ($wpdb->postmeta.meta_key = '_job_ref' AND... | how to search in custom fields & custom taxonomy for custom search | wordpress |
I want the exact output of this site . I want to edit the marker and hover options in the Google map, but I don't know how to do that. Please also list any ideas for Google Map plugins | Mappress allows for custom markers, but you need to pay for the pro version. http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/ Google Map Shortcode also supports custom markers in a shortcode http://wordpress.org/extend/plugins/google-map-shortcode/ Getting custom overlays on Google maps is actual... | Integrating Google Maps with custom marker and hover? | wordpress |
Hi I am using a plugin to view the cron jobs that are run by wordpress. I am noticing that there are jobs related to plugins I have deactivated and even deleted. Why is this so and how can I remove them? | This might be because the plugins you were using didnt deregister the crons it setup. To remove the crons use the following code in your functions file: <code> add_action("init", "clear_crons_left"); function clear_crons_left() { wp_clear_scheduled_hook("cron_name"); } </code> Once thats run once you can safely remove ... | Cron jobs for deactivated plugins | wordpress |
I have a client that has a current WordPress installation in their website root, and they are creating a new WordPress site which is in a subdirectory during development. My question is, what do I do when they are ready to go live and replace their current WordPress install with the new dev version? Can they just point... | WordPress allows for this setup, and they have complete instructions here: Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory I personally would move the files because to me it's cleaner, but the above mentioned solution should work for you. | Can I setup WordPress in a subdirectory and then point my URL to the subdirectory when I'm ready to go live? | wordpress |
How does WordPress know a plugin has an available update? Is the process handled by the readme.txt file? I am trying to manage 3rd party plugins that I alter in an effort to better fit/meet the needs of my instance of WordPress but I would like to maintain the functionality that alerts the CMS user that an update is av... | Basically it sends a list of your plugins to the wordpress.org API server, which does some black magic to try to figure out if any of the plugins you have match the ones it has, then it returns version info back for them. The API uses a rather elaborate mechanism to match plugins against plugins it knows about, but the... | What Triggers a Plugin Update Alert | wordpress |
Ok This is what i'm trying to achieve. A site network where user can post their articles and get rewarded for each post. For example, Lets say i have a main site example.com. I created a network like site1.example.com, site2.example.com, etc. So lets say i have around 10 subsites in my network. Each subsite have one cu... | There sure is: Multi Site user Management The plugin syncs your users across sites. I've used it extensively and it works really well. | Single-user registration to access all sites in WordPress MultiSite Network | wordpress |
I am still looking for a solution for this and can't seem to find it. I have the following code to start, but am not sure how to write the function to fire off a .js file. I need this to work on one specific page ID. <code> function ipad_alert() { if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT'])) {?> // link to... | use <code> wp_enqueue_script() </code> to add a js file. I've hooked <code> wp_enqueue_scripts </code> so I can check <code> is_page() </code> for a specific page. <code> function ipad_alert() { if( preg_match('/ipad/i',$_SERVER['HTTP_USER_AGENT']) && is_page(7) ) { wp_enqueue_script('my_script', get_bloginfo('... | Message box when accessed from iPad | wordpress |
I am trying to only show a single post per month on a query. I can set the date as a variable and use something like the php array_unique function to check the dates and only echo out unique ones, however this feels a bit 'hacky'. Is there a built in query variable, or something built in WordPress I can use instead? As... | Maybe a bit less hacky: <code> $months = array(); while(....){ list($month, $year) = explode('/', get_the_date('n/y')); // eg. 7/11 if(in_array($month, $months)) continue; // skip $months[] = $month; echo '<li><a href="'.get_month_link($month, $year).'">'.get_the_date('F Y').'</a></li>'; } </cod... | Query pulling a single post per month | wordpress |
I have created a twenty-eleven child theme, I want to know if its possible to only load that child theme on certain pages, maybe with the custom page templates? I have looked via google and on here and have found nothing on the twenty-eleven or very outdated posts. Thanks | you can use page templates for that if you have a page template within your them, and if its a different theme all together then you can use Page Theme which is a plugin that can be used to display a different theme (not template) for each page/post of your blog. | Use child theme on certain pages and not others? | wordpress |
I have a site which is essentially a blog carrying alerts to Doctors. The idea is that the Doctors will get an SMS alerting them to the fact that a new alert has been posted and a link to the alert. The alert will contain images. It is public, hidden from SE but might contain some sensitive info. I was wondering if the... | This is complex and considering the sensitive nature of the application and the usage "doctor alerts" I would really consider not using a blog platform. There are a lot of systems out there that support secure sms with options for media. If you must for some reason use WordPress, to authenticate users have a look at so... | Quick login from mobile phone | wordpress |
For some reason, my menu items are showing tooltips on hover-over- In other words, the menu links have "title" attributes being added to them. Looking at my other, older WordPress sites, this is not the case. I can't remember having this issue before- Why would this be happening? Thanks- | Here’s the code to remove it from wp_page_menu(), wp_nav_menu() and wp_list_categories() function: <code> function my_menu_notitle( $menu ){ return $menu = preg_replace('/ title=\"(.*?)\"/', '', $menu ); } add_filter( 'wp_nav_menu', 'my_menu_notitle' ); add_filter( 'wp_page_menu', 'my_menu_notitle' ); add_filter( 'wp_l... | Disabling tooltip on menu items | wordpress |
I recently developed a small plugin for my site, that uses AJAX, and now I am trying to implement the same AJAX techniques for the same site's templates, but I keep getting <code> -1 </code> as the result, here is my code, functions.php: <code> //Front end AJAX functions function eu_custom_query(){ global $post; global... | You are passing 'eu_custom_query' as the action in your AJAX. It should be 'custom_query'. You decide the action name, when you add the action i.e. 'wp_ajax_my_action' would be called 'my_action' You are confusing it with the callback method. Hope that makes sense. p.s. to fix your code change: <code> add_action('wp_aj... | AJAX function returning -1 | wordpress |
Is it possible to search in custom post type meta fields? I have posts, with many custom meta fields. Wordpress by default search only in title and in content. How can I change it? If you didn't understand what I am saying, please take a look at my screenshot . | Take a look at my answer to how to filter post listing (in WP dashboard posts listing) using a custom field (search functionality) ? Its just what you are looking for. | Custom post type admin search | wordpress |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.