js and images files are not recognized - beginner

it might be the simplest question but i can't find why my javascript files and images are not recognized by wordpress : i put all my JS files and images in my theme's folder, so i created a folder "word" inside "theme", with all the content and then i added my files. But the website doesn't recognize the path to the javascript or the images. Could you please tell me what i'm doing wrong? i used it like that in the header page : > < script src="jquery.js" type="text/javascript"> Thanks ;)


Tag selector like stackexchange?

I'm creating my own form based on this and I'd like to have a tag selector which is similar to the one on StackExchange. I can roll my own but I was wondering if something similar already exists. Thanks!


Displaying Facebook comments count with <fb:comments-count> tag

On the Facebook Developer page they say the comments counts can be displayed using               <fb:comments-count href=http://example.com/></fb:comments-count> awesome comments      I added this to my loop then:               <fb:comments-count href=<?php the_permalink();?>></fb:comments-count>      to display the comments count per each post. Nothing is displayed even though I do have comments...any suggestion? Thank you Edit: placing the code in single.php, it shows the number 0 despite I have many comments....


Preview Post/Custom Post types in Archive

I have a few custom post types on my website. One of these is a front page slider. I add some text, images, links and as soon as I publish the CPT appears as a slide and I'm a happy camper. The problem is when I need to preview the slide before it is live. I can preview that specific CPT post via the post preview button, but obviously I see the actual slide and not how the slide looks in that slider or gallery or archive. I'm looking for a solution to preview the Drafts in an archive. Any help will be much appreciated.


Facebook Like needs confirmation?

I use a Facebook Like plugin on my WordPress blog, but it is really weird. I need to press a confirm link, even if the user clicked the like button. But most users won't click twice. Is this something that is caused by the plugin I use or by Facebook?


How are rewrite rules applied in WordPress? I don't see any rules in the .htaccess file... For example, if I set the address URL to www.example.com, then calls to example.com will 301 redirect to www.example.com, but I don't see any rule for that in the .htaccess:               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>          # END WordPress


I cant access custom taxonomy page listing

I had a issue with a custom taxonomy and a custom post type using the same url. my url i am using for my post type is /news and then i have a taxonomy which i need to have /news/cars I followed this post to get my urls to work but now i cant access the actual taxonomy listing pages as i get a 404. Mixing custom post type and taxonomy rewrite structures? this is my code i am using to do this functionality:                   function register_custom_post_types() {         $args = array(             'labels' => array(                 'name' => __( 'News' ),                 'singular_name' => __( 'News' )             ),             'menu_position' => 5,             'public' => true,         'query_var' => 'news',             'has_archive' => 'news',             'hierarchical' => true,             'taxonomies' => array('news_categories'),         'publicly_queryable' => true,             'capability_type' => 'post',             'rewrite' => array('with_front' => false, 'slug' => 'news/%news_categories%'),             'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'page-attributes')         );         register_post_type( 'news', $args);          }     add_action( 'init', 'register_custom_post_types' );          add_action( 'init', 'create_my_taxonomies', 0 );              function create_my_taxonomies() {             register_taxonomy(                 'news_categories',                 'news',                 array(                     'labels' => array(                         'name' => 'News Categories',                         'add_new_item' => 'Add New Category',                         'new_item_name' => "New Category"                     ),                     'query_var' => 'news',                     'show_ui' => true,                     'show_tagcloud' => false,                     'hierarchical' => true,                     'rewrite' => array(                         'with_front' => false,                         'slug' => 'news'                     )                 )             );         }              add_filter('post_type_link', 'news_term_permalink', 10, 4);         function news_term_permalink($post_link, $post, $leavename, $sample) {             if ( false !== strpos( $post_link, '%news_categories%' ) ) {                 $glossary_letter = get_the_terms( $post->ID, 'news_categories' );                 $post_link = str_replace( '%news_categories%', array_pop( $glossary_letter )->slug, $post_link );             }             return $post_link;         }      Any help would be really appreciated Thanks


How to display an RSS feed widget inside a page?

I have an RSS feed (link) that I would like to display as a widget inside one of my posts. The wordpress RSS widget already does that on the sidebar, is there some solution to have it in the post? The best solution would latter let me do something like: So I could embed this also on other sites. Thanks.


wp_insert_user keeps echoing values

This is bugging the heck out of me. Essentially I've narrowed the issue down to one line of code:               $user_id = wp_insert_user ($userdata);      From what I can tell nothing should be echoed here, but I should get the user_id returned from the wp_insert_user function. What I'm getting though is the email and other values echoed back. I will paste the code for the entire function at the moment, but I've tested it apart and this is the line of code causing the echo in my ajax call, messing up my return because its not formatted in my JSON variable. See code below ( **Thanks you in advance for any help I can get with this, really need it at this point** )               public function registerUser(){             $event = $_REQUEST['event'];             $nonce=$_REQUEST['ajax_nonce'];             if (! wp_verify_nonce($nonce, 'ajax_nonce') ) {                 $response = json_encode(                      array(                          'success' => false,                         'html' => 'Please stop trying break me. For security reasons your IP has been logged'                     )                  );                 header( "Content-Type: application/json" );                 echo $response;                 die();             }             global $wpdb;             $html = "";              //We shall SQL escape all inputs               $user_login = $wpdb->escape($_REQUEST['username']);               if(empty($user_login)) {                   $error = 1;                 $html .= "
Username could not be created because you have not completed your first and last name.
";               }             $user_email = $wpdb->escape($_REQUEST['email']);               if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/", $user_email)) {                 $error = 1;                   $html .= "
Please enter a valid email.
";               }             $user_pass = $wpdb->escape($_REQUEST['password']);             $confirm_password = $wpdb->escape($_REQUEST['confirm_password']);             if(empty($user_pass) || $user_pass != $confirm_password){                 $error = 1;                   $html .= "
Passwords do not match.
";             }             if(empty($error)){                 $first_name = $_REQUEST['first'];                 $last_name = $_REQUEST['last'];                 $display_name = $_REQUEST['first']." ".$_REQUEST['last'];                 $userdata = compact('user_login', 'user_email', 'user_pass', 'first_name', 'last_name', 'display_name');                 $user_id = wp_insert_user( $userdata );                 if ( is_wp_error($user_id) ){                     print_r($status);                     $error = 1;                     $html = "Username already exists. Please try another one or contact us";                   } else {                     update_usermeta( $user_id, 'phone', $_POST['phone'] );                       $from = get_option('admin_email');                       $headers = 'From: '.$from . "\r\n";                       $subject = "Painter Registration Successful!";                       $msg = "
Registration successful!

Your login details:

Username: $username
Password: $password

Thank you again for joining Brush Party, now you can login and finish signing up for the next party here!";                     $html = "Awesome! You are officially a registered painter at Brush Party. That was easy, and you thought painting was going to be hard... Now you just need to check your email for you login details";                   }               }             $response = json_encode(                  array(                      'success' => $status = (empty($error)) ? true : false,                     'first' => $_REQUEST['first'],                     'last' => $_REQUEST['last'],                     'phone' => $_REQUEST['phone'],                     'email' => $_REQUEST['email'],                     'html' => $html                 )              );             add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));             wp_mail( $email, $subject, $msg, $headers );               // response output             header( "Content-Type: application/json" );             echo $response;             die(); // WP AJAX calls must die         }      EDIT: I've since looked at the user.php file and targeted the issue at line 1371, here's the code there               if ( $update )             do_action('profile_update', $user_id, $old_user_data);         else             do_action('user_register', $user_id);


A Way to Auto update plugins using cron?

Is there a solution to keep plugins updated with wordpress by auto upgrade them without need to access to the admin panel every time?


W3 total cache - cache refresh programmatically

I am building a Digg like website in WordPress. After installing W3 Total Cache, I noticed certain elements such as number of votes (and voters ids) per post are cached even though they shouldn't be (at least not after a user votes for an article). I assume it is not possible to prevent specific elements in a page from being cached (or is it?), so I thought of triggering page cache refresh programmatically. Any suggestions?


wordpress upload http error?

I'm trying to uplaod video files,my upload file size limit is 96mb,and I can upload videos until 10mb size,but I want to uplaod videos that have 20mb size.If I try to uplaod bigger video I get http error,I found on web a lot of solutions but none of them acctualy help me.Is there any other solution how to fix http uplaod error and uplaod bigger files on my wordpress site? I have tried every thing from there links : http://wordpress.org/support/topic/http-error-on-image-upload-still http://wordpress.org/support/topic/flash-uploader-logs-out-during-crunching- phase http://wordpress.org/support/topic/http-error-image-upload Tnx in advance. Anybody have idea why is this happening ?


Wp-admin widgets have no title texts

In wp-admin when I enter widgets I see their bars, but the titles of widgets are missing. only :Something remain visible and the others are gone. What happened? How do I fix that? Edit: Found it in wp-admin/includes/widgets.php line that was `<div class="widget-title"><h4><?php $widget_title ?><span class="in-widget- title"></span></h4></div> ` should be `<div class="widget-title"><h4><?php echo $widget_title ?><span class="in- widget-title"></span></h4></div> ` Is that a wordpress bug or somebody on my team had to edit this? [noone takes the blame ;)]


Justin Stern's bulk export for users

I want to bulk export lists of users in WP. I found this tutorial which is great: http://www.skyverge.com/blog/add-custom-bulk-action/ The problem is, I cannot seem to figure out how I need to edit the code to get this to work on the users page instead of the posts page. Help! Thanks in advance!


how can i get posts from custom post type particular taxonomy category

I have registered custom post type Article in my template using **register_post_type** function. and i also having taxonomy category for this article posts. Here i want to filter the posts under particular category. using query post How can i do this Thanks in advance !


WordPress Page Template to Display Page Title, Custom Field, and Date

I'm currently attempting to create a page template that will display all posts by the current logged in user, a particular custom field from those posts (i.e., Item Status), and the dates those posts were published. I am using the following code for the list of posts by the current user:               <?php     //if a certain page, then display posts authored by the logged in user     $page_title = 'Support History';     if ( is_user_logged_in()  && is_page($page_title) ) {     global $current_user;     get_currentuserinfo();     $args=array(         'author' => $current_user->ID,         'post_type' => 'post',         'post_status' => 'publish, private',         'posts_per_page' => -1,         'caller_get_posts'=> 1     );     $my_query = null;     $my_query = new WP_Query($args);     if( $my_query->have_posts() ) {     echo 'Your Support History';     while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
     <?php     endwhile;     }     wp_reset_query();  // Restore global post data stomped by the_post().     }     ?>      I would like for it to look roughly like this when complete: **Item Title** **Item Status** **Item Date** Essentially, a table display of the posts with their titles, status (i.e., the custom field value), and date. I cannot seem to get the second two bits of information to display properly (read: attempting to do so seems to break the post listing and cause the page to fail to load anything).


WP_Query with intersection of post meta field and user meta field

On the site I'm building, each post has a serialized array of strings. Let's say post ID 1234's value for `my_site_teams` is `array( 'Chess', 'Cheerleading', 'Football' )`. Each user also has a `my_site_teams` meta field setup in the same way. Let's say user 56's value is `array( 'Chess', 'Soccer', 'Hockey' )`. I want to limit WP_Query so that it only returns posts for the user where at least one of these values overlap. In this case, both post `1234` and user `56` include `Chess`. What I've tried so far:   1. Using `meta_query'. Problem is this can't take the intersection of two arrays. Only the values you're searching _against_ can be arrays.   2. Running a normal WP_Query, then filtering these afterward. This produces the correct results, but it breaks WP pagination.   3. Running a secondary query during `pre_get_posts` that loops through all the posts, notes any intersections, then sets `post__in` to an array of intersecting post IDs. This does work, but I dislike the extra query, and I'm worried about the sustainability of this approach as I scale to more site views and more posts. I suspect I'll need to edit the query's `JOIN` with `posts_clauses`, but I haven't been able to create a bug-free inner join.


how to exclude admin page from add_rewrite_rule in wordpress

I'm trying to add the following rewrite rules:               add_rewrite_rule('([A-Za-z0-9])/([A-Za-z0-9])', 'index.php/product?subcategory=$1&product=$2', 'top');          add_rewrite_rule('([A-Za-z0-9])', 'index.php/categories/?cat=$1', 'top');      The problem is that its affecting the admin page leading into an internal server error. After the rules has been flushed the `.htaccess` file has added the rules above into the following:               RewriteRule ^([A-Za-z0-9])/([A-Za-z0-9]) /wordpress/index.php/product/?subcategory=$1&product=$2 [QSA,L]          RewriteRule ^([A-Za-z0-9]) /wordpress/index.php/categories/?cat=$1 [QSA,L]      So something like:               <domain>/GameConsoles/Nintendo3ds     <domain>/GameConsoles      But the problem is that the rules that I have set seems to be matching in the admin. What am I doing wrong here? And with regards to SEO best practices should I be doing it this way or is it better to use something like:               <domain>/product/Nintendo3ds     <domain>/category/GameConsole      Thanks in advance!


Theme Review: post thumbnail, header image, content width

A followup to my previous question about my theme that was rejected for the WordPress.org theme directory: >   * RECOMMENDED: No reference to the_post_thumbnail() was found in the > theme. It is recommended that the theme implement this functionality instead > of using custom fields for thumbnails. >   * RECOMMENDED: No reference to add_custom_image_header was found in the > theme. It is recommended that the theme implement this functionality if > using an image for the header. > How do I correct it? This is my function:               // thumbnail list      function retImage($content){          $pattern="/<img.*?src=[\'|\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/";          preg_match_all($pattern,$content,$match);           if(empty($match[0][0])){                      echo "<img src=\"";                      bloginfo('template_url');                      echo "/images/thumbnail.png\" />";          }else{              echo  $match[0][0];          }     }      I used an image for the header by css, why do they say this: >   * RECOMMENDED: No reference to add_custom_image_header was found in the > theme. > ![Header image CSS rules](http://i.stack.imgur.com/jPcaV.png) >   * Embedded videos overlap sidebar. Please set the content_width variable > In my the `functions.php` of my theme I did this:               if ( ! isset( $content_width ) )         $content_width = 992;      Why do they still give me that tip?


Conditional success callback based on Ajax Response not working

I am trying to run an ajax request to pass some data to a function I have written. I return the response, and try and run some javascript based on the response, but it doesn't seem to be running properly. Regardless of what the response is back, it always runs it as if the response was not 'Everything's Chimpy!'               jQuery.ajax({         type: 'POST',         url: ajaxurl,         data: {             action:      'chimp_form',             form_action: 'validate_api_key',             api_key:     apiKey,             data_center: dataCenter         },         success: function(validation_response) {             // alert(validation_response);             if(validation_response == "Everything's Chimpy!") {                 jQuery('.mailChimp_api_key_preloader')                     .fadeOut('fast', function() {                         jQuery('.mailChimp_api_key_validation_message')                             .html(' Valid API Key')                             .css("color", "green").fadeIn();                     });             } else {                 // alert(response);                 jQuery('.mailChimp_api_key_preloader')                     .fadeOut('fast', function() {                         jQuery('.mailChimp_api_key_validation_message')                             .html(' Error: '+validation_response+'.')                             .css("color", "red").fadeIn();                     });                                          };         },         error: function(response) {             alert('There was an error processing your request...');          }     });      I am getting a response back from the ajax request, and it says 'Everything's Chimpy!', but my conditional is not running. No matter what , the successfunction runs the second conditional. But I have tested the response and can see that it matches my first conditional statement. Why isn't the first one running? Weirdest part about it...I developed this on localhost installation. When I transferred it over to my live site, this ajax request and success callback is not working as it does on localhost. I can't think of a reason it would act differently on localhost than it does on the live site. **This is the response that is coming back:** Error: Everything's Chimpy!.


Hide update messages from non-admin users?

Is it possible to hide the update messages for any users other than the main admin? We use WP as a CMS for clients and it's a bit annoying that a normal user has to read something like: > WordPress 3.1.3 is available! Please update now.


Combine Multiple Categories Into One URL Slug

I have a Wordpress website with 20+ categories. To make it easier to navigate I want to decrease the categories, but at the same time keep the original categories. In other words I want to be able to query multiple categories with a category group or a virtual slug. Example categories:               /category/apples/     /category/pears/     /category/bananas/      I want to be able to query all three of them with a unique url slug:               /category/fruit/      But like I said, it should still be possible to go to i.e. **/category/bananas/** I know it's possible to query multiple categories the way I want to using **/category/apples,bananas,pears/** but it's not a elegant solution. Is it possible to do this virtual grouping with a plugin or even using a rewrite? Tips and recommendations are greatly appreciated!


Building a Data Intensive Website with Wordpress

I am an intemediate website builder and have been working with wordpress for a few years. I am attempting to build a website (for myself) that is data intensive. All I've built to date are sites that have 20-30 categories, and several pages. The new site is a business directory that will cover 50 U.S. States and have 20-30 Business Types. My problem is that I have never really worked with post types or taxonomies, and so I cannot wrap my small brain around how to structure this site so that the content is easy to search for users. For example, a user should be able to search for a motorcycle dealer in Florida. My plan is to cover cities and zip codes via tags (unless someone suggests a better way!). Most of the default wordpress search functionality is pretty weak as well. For instance you cannot sort results via something like a dropdown menu (as far as I've seen anyway). **I was thinking to structure the website like this:**   Post Type - California   Taxonomies - Bar, Cafe, Auto Dealer, Salon, etc...   Post Type - New York   Taxonomies - Bar, Cafe, Auto Dealer, Salon, etc...   So, any help determining the best way to put together this type of site in a fashion that doesn't bury the data and is usable as a directory would be really appreciated. It will be a photo intensive site, so although I know there's a nice directory plugin out there - it just wouldn't work! Each business location needs to be it's own post. In addition to structuring the directory, any ideas for the best way to implement advanced search functionality would also be greatly appreciated. Looking at the Relevanssi Pro Plugin at this point for search. Thanks for reading. Also, let it be known that I am not opposed to paying a pro for their time helping me with this information, or setting this up on the back end. \----------------- **FURTHER QUESTIONS:**   **Thanks** a lot. This is the most comprehensive advice I've gotten anywhere.      To be sure I understand correctly:      Step 1:   Create a post type: companies   Step 2:   Create 2 Taxonomies:   location   business_type      Step 3:   Create Taxonomy Terms for each of the above taxonomies:   Taxonomy: location   Terms: NY, CA, KY, TX, GA, etc...      Taxonomy: business_type   Terms: salon, auto_dealer, restaurant, etc...      Step 4:   Add custom fields to companies post type with custom meta boxes:   city   zip code   phone number   That all seems pretty clear and leaves me with a few more **questions** : Is Relevanessi the best method you know of to implement searches for this type of data? http://wordpress.org/extend/plugins/relevanssi/ Do categories/subcategories become completely irrelevant when implementing the above procedures? (my guess is yes they do, as this seems much more powerful) Lastly, I haven't read enough yet, but I assume the way to create menu items is to use taxonomies and taxonomy terms. Is that correct? Thanks so much for introducing me to this different level of wordpress usage. Never had the need before, so I just never learned it.


apply_filters() and the_excerpt are giving unexpected results

I feel like I must be missing something pretty obvious, here, but I can't seem to get WordPress to cooperate. I'm generating Facebook OG tags with a function. Everything works fine, except for the excerpt. Since the deprecation of `get_the_excerpt($post->ID)`, is there another way to create an excerpt without having to create a whole new loop? It seems excessive to me. My first instinct was to use `apply_filters()`:               $description = apply_filters('the_excerpt', get_post($post->ID)->post_content);      That gives me the full post, complete with HTML-formatted content. Okay, must be wrong. So I tried the next logical idea:               $description = apply_filters('get_the_excerpt', get_post($post->ID)->post_content);      No dice. Now there's no HTML, but it's still the full post (which is really confusing). Okay, no problem. Let's skip all the fancy stuff and just go for the trimmed entry:               $description = wp_trim_excerpt(get_post($post->ID)->post_content);      No change. So, my question is this: what the heck is going on? Is there something I'm missing, here? I got into the WP core to find how `the_excerpt()` works, and it appears to be identical to my call:               /**      * Display the post excerpt.      *      * @since 0.71      * @uses apply_filters() Calls 'the_excerpt' hook on post excerpt.      */     function the_excerpt() {         echo apply_filters('the_excerpt', get_the_excerpt());     }      I have a few questions based on my findings:   1. Why isn't the filter applying as expected?   2. Is there a way to get the excerpt outside of the loop without creating a new loop?   3. Am I crazy? Thanks in advance for having a look. I'm fairly stumped, here.


Static pages not being allowed

I followed the directions for creating a static front page and displaying the news on another page. I have done this before with success but now I am having a problem. When I go to mysite.com/news I am getting an Internal Server Error, but when I undo the static pages options, everything is fine. What am I doing wrong now?


get_posts meta_value is serialized array, how can I grab specific posts with combination of meta_key/meta_value[0]->is_featured?

I've a postmeta key saved in DB: `mediSHOP_product_extras` It's value is Unserialized: `Array ( [0] => Array ( [is_slider] => 0 [is_featured] => 0 [in_stock] => 0 [video_url] => [related_product_list] => ) )` For simplicity I didn't want to save each value as a new key/value combination in DB. But I might have made a mistake... I want to use get_posts to fetch posts that have `is_featured == 1` And I cannot figure out how to do this...               $slides_content = get_posts(array(         'post_type'      => 'post',         'posts_per_page' => 12,         'meta_key'       => 'mediSHOP_product_extras',         'meta_value'  => '1'     ));      meta value needs to be 1, but it also needs to be `is_featured == 1`. Simplest solution would be to just save is_featured as a separate key. But maybe you know how to solve my problem?


Find the Children of a Page then Echo it as a Bulleted List of Links (menu)

I am trying to check if a parent Page has children. If it has children I would like to echo the children as a bulleted list with links to each child (basically a menu). Right now I have the following code in loop-page.php and it checks if the Page has any children and returns an array with the children. I use an if statement to check if the number is greater than 0.               $children = get_pages('child_of='.$post->ID.'&parent='.$post->ID);          if (count($children)) {         // Echo children as a bulleted list of links     }      This part seems to work. My question is how do I echo through the children as a bulleted list of links? Like the example below. Let's say "Services" is the parent page and its children pages are "Grass Cutting", "Water Gardens", and "Landscaping". count($children) would return 3 for the "Services" page since it has 3 children. Now it should echo them as so:

Grass Cutting

Water Gardens

Landscaping

      a href= should be the link to the page.


register_setting and AJAX?

Please pardon me if this question is totally unrelated in itself, but I'll do my best to point out the issue I am having and what I would like to achieve. **Scenario:** I have a custom theme option's panel, that uses custom-made tabs.   **Goal:** Whenever the user saves the panel's options, the page and the panel's tabs should stay just like they are (i.e. no reloading and no taking- the-user-back to initial tab). I am almost completely certain that this is AJAX-related, thus the title. This is the PHP code of my panel: http://pastie.org/3102112   This is the JS that makes the tabs works (for the sake of this example, as the tabs themselves work flawlessly):               $('div#options_tabs div.block').hide();     $('ul.options_tabs li:first').addClass('active').show();     $('div#options_tabs div.block:first').show();          $('ul.options_tabs li').click(function() {              $('ul.options_tabs li').removeClass('active');         $(this).addClass('active');         $('div#options_tabs div.block').fadeOut(100);              var activeTab = $(this).find('a').attr('href');         $(activeTab).fadeIn();         return false;     });      And finally, my attempt at AJAXing the tabs and the way my panel is saved (note that I am really clueless as to what should be placed within the AJAX action; and I also feel I might be completely off-track, as my panel uses the WordPress built-in register_settings method):               (function ($) {          inlineEditOption = {         init: function () {             $('.save-options', '#the-theme-options').live('click', function () {                 inlineEditOption.save_options(this);                 return false;             });         },              save_options: function (e) {           var d = {             action: "options.php"           };           b = $(':input').serialize();           d = b + "&" + $.param(d);           $.post(ajaxurl, d, function (r) {             if (r != -1) {               $('.ajax-message').ajaxMessage('
 Theme Options were saved
');             } else {               $('.ajax-message').ajaxMessage('
 Theme Options could not be saved
');             }           });           return false;         }          }     });      Anyhow, I hope I was clear enough; if I forgot something please let me know!   Thank you all in advance,   Chris


Can I use two languages together in WordPress

com blog can I use two languages, lets say I want to have the Language English and other language. I also need my audience to write comments using either in Engish or another language. Is that possible in WordPress!!


How to display NextGEN gallery in templates?

I have installed the NextGEN Gallery plugin and have all my images in albums. Can someone please support me in displaying the NextGEN gallery with the use of the Galleryview plugin? Is there any easier way?


Second page (and next) of search results redirects me to the home page

WP 3.5, nginx (latest) and PHP5-FPM (latest). If you visit http://bombacarta.com/?s=coma the page is properly loaded. When you click on the link to go to the next page, you are redirected to the home page. Try it out: http://bombacarta.com/page/2/?s=coma I don't know what's the cause to this... I think it's something related to my nginx conf for WP (because it happens on also another installation on the same VPS with same config but different theme). Here's my nginx config:               location ~ \.php$ {         try_files $uri =404;         fastcgi_split_path_info ^(.+\.php)(/.+)$;                    include /etc/nginx/fastcgi.conf;         fastcgi_pass unix:/var/run/php5-fpm.sock;     }          location / {     # if you're just using wordpress and don't want extra rewrites     # then replace the word @rewrites with /index.php      try_files $uri $uri/ /index.php;          }


display tag slug as class per link in tag cloud

I would like to filter `wp_generate_tag_cloud` so each of the tag links include the slug as a class. More specifically, I would like to output "tag-" + the tag slug. Currently what is assigned as the class is "tag-link-" + the tag ID. The the end, I would happy with either a replacement or just adding this additional class to the links.


Query pages by category

Trying to query pages based on the category they are associated with. I am passing in the cat_ID, but it doesn't seem to be working. Always returns a single post with the title "Hello World" while there is an actual page with real title associated with this category.               // The Query     query_posts('cat='.$current);          // The Loop     while ( have_posts() ) : the_post();              the_title();          endwhile;          // Reset Query     wp_reset_query();


Template Page Content Made Searchable

I'm migrating a client site over to a WordPress CMS. I made templates for each of the pages that would have static content: about us, facility, FAQs, etc. The problem is that this content seems to be unsearchable (if that's the right term). Is there an easy way to make this content available to an internal (not Google.com) search query (along with the rest of the content that is available on a blog)? Should I have put this stuff (the copy) into the content editor and accessed it with the_content()? Is that the best way? As I'm finishing this I'm getting that "duh" feeling, but I'll post it anyway in case there are other ways that might help others doing the same. Thanks very much.


How can i list random author?

Im listing current category of all author list but I want to list random author list from current category. I was try 'order' => 'RAND', RAND code its not worked. My Code:               function getCurrentCatID(){       global $wp_query;       if(is_category() || is_single()){         $cat_ID = get_query_var('cat');       }       return $cat_ID;     }          $current_category_ID = getCurrentCatID();     $current_cat_id = $current_category_ID;          $author_array = array();     $args = array(       'numberposts' => -1,       'cat' => $current_cat_id,       'orderby' => 'author',       'order' => 'asc',       'posts_per_page' => '10',     );     $cat_posts = get_posts($args);          foreach ($cat_posts as $cat_post) :       if (!in_array($cat_post->post_author,$author_array)) {         $author_array[] = $cat_post->post_author;       }     endforeach;          foreach ($author_array as $author) :       $auth = get_userdata($author)->display_name;       $auth_link = get_userdata($author)->user_login;       $autid= get_userdata($author)->ID;       $link = get_author_posts_url($autid);       echo ''. get_avatar( $autid, '46' ).'';       echo "";       echo '
'.$auth.'
';       echo "";       echo "

";       echo "
";     endforeach;


How can I include meta box content when searching?

When I search on my site it currently doesn't search the content in my custom meta boxes. How can I include this content when searching? I'm registering my meta boxes as follows:               $meta_box['recipe'] = array(         'id' => 'recipe-meta-details',         'title' => 'Recipe Meta Details',         'context' => 'normal',         'priority' => 'high',         'fields' => array(              array(                 'name' => 'Country',                 'desc' => 'Country dish is from',                 'id' => 'recipe_country',                 'type' => 'text',                 'default' => ''             ),             array(                 'name' => 'Serves',                 'desc' => 'Number of people dish serves',                 'id' => 'recipe_serves',                 'type' => 'text',                 'default' => ''             ),              array(                 'name' => 'Ingredients',                 'desc' => '',                 'id' => 'recipe_ingredients',                 'type' => 'wysiwyg',                 'default' => ''             ),              array(                 'name' => 'Method',                 'desc' => '',                 'id' => 'recipe_method',                 'type' => 'wysiwyg',                 'default' => ''             )         )     );      And displaying them like this in my custom post archive loop:               $recipe_country = get_post_meta($post->ID, 'recipe_country', true);     $recipe_serves = get_post_meta($post->ID, 'recipe_serves', true);     $recipe_ingredients = get_post_meta($post->ID, 'recipe_ingredients', true);     $recipe_method = get_post_meta($post->ID, 'recipe_method', true);

Ingredients
     <?php echo $recipe_ingredients; ?>

Method
     <?php echo $recipe_method; ?>
      Thanks


How can I set the first link in my nav menu to simply be a drop-down to some other pages

I want to have a set of ~3 pages in a subdirectory called "about"               example.com/about/history     example.com/about/program     example.com/about/coaches      I don't want any `about/index.html` page, I just want "about" to be the label of the drop-down menu. The pages will be just regular WordPress pages. I don't need help writing the HTML/CSS, I just need to know what files to edit and how to set it up in the WP admin area. Hope my first post makes sense. This is my first WordPress project. Thanks in advance.


Fully-featured forum plugin

I'm looking for a plugin recommendation. I'm currently using bbPress to add a forums area to our website. However, it has been deemed "disappointing" in terms of functionality. Are there any forum plugins which have the following features?   * Easy image attachment (i.e. not like the bbPress GD add-on which uses the Media Library)   * Unread threads / mark as unread button   * Private messaging   * Quoting   * Rich text editor for new topics/replies Thanks in advance,


How to use variables from widgets in other pages?

I have a widget where I set some custom url's like register or login. I want to use those variables declared in a widget outside of the widget, in other pages (page templates). How can I save or use, for example, $login or $register variables, in other pages ?


Trouble with conditional tags

I've got some code I want to run on every page other than the blog page and the archive page. If I use               <?php if ( !is_home() )  { ?>      The code correctly doesn't show on the blog page. If I use               <?php if ( !is_page('archive') )  { ?>      The code correctly doesn't show on the archive page. But if I use               <?php if ( !is_home() || !is_page('archive') )  { ?>      The code incorrectly shows up on both the pages. Any suggestion what I'm doing wrong?


Structure with category setting

OK, it's more a philosophic question that a programming question, but at the end it will have a huge impact on code... I have 5 main product, a,b,c,d,e those 5 products have options those products can belong to multiple category So the end, i should show the product a, with below, option of product a witch is a1, a2, a3, a4 and below, the other products that belong to the same category as a, so it can be, x, y, z. So it look like   * a      * a1      * a2     * a3     * a4   * x   * y   * z How should i manage categories, should i create a category witch name is option for a or there is a better way. Organising is not my stongest point, but good organization can lead to easy coding.. thanks in advance * * * idea, if i can control the ID of the post created, i will create product a as id=100 and all option as product option a1 : id-101. option a2 : id=201 and so on ..


Simple custom theme option not being saved

I'm not a web developer and have been following a tutorial on how to add options to a simple self-written theme. In functions.php I've added the following code:               <?php     $themename = "Theme Name";     $shortname = "sn";     $options = array (                   array(  "name" => "Price"),              array(  "type" => "open"),              array(  "name" => "Price",                 "desc" => "Enter a price to sell your item for.",                 "id" => $shortname."_price",                 "std" => "",                 "type" => "text"),              array(  "type" => "close"),          );     ?>      In index.php I have the following code                   <?php if ($sn_price) { ?>
<? echo "$" . $sn_price; ?>
         <? } else { ?>
Price on registration of interest.
         <? } ?>      The theme options are available in the back end, and I have saved the price in the theme options. The price is saved when I return to the back end to check the options, but $sn_price displays as empty on the front end. Any ideas why? **Edit** : Here is functions.php


What exactly do this function declared into functions.php file of a WP theme?

someone can help me to understand what exactly do this function declared into the **functions.php** file of a theme?               function exclude_featured_tag( $query ) {         if ( $query->is_home() && $query->is_main_query() ) {             $query->set( 'tag__not_in', 'array(ID OF THE FEATURED TAG)' );         }     }     add_action( 'pre_get_posts', 'exclude_featured_tag' );      I am not into PHP but looking it I think that if the user is on the home page it modifya query object exluding the posts having a specific tag. Is it right? If it's right can you explain me the last line:               add_action( 'pre_get_posts', 'exclude_featured_tag' );      I think that it is used to automatically call the previous function what a specific event happen...is it right? what event? can you help me to understand how exactly work? Tnx


Tax Query not working

I'm having some trouble with my tax query. Im getting some values by GET, but it seems my tax query refuses to work:               $args = array(                         'post_type' => 'imovel',                         'tax_query' => array(                                 'relation' => 'AND',                                 array(                                     'taxonomy' => 'finalidade',                                     'field' => 'id',                                     'terms' => $taxonomy_id,                                      ),                                 array(                                     'taxonomy' => 'cidade',                                     'field' => 'id',                                     'terms' => array($_GET['estado'], $_['cidade']),                                     'operator' => 'AND'                                 )                             )                              );      In fact, $_GET values are coming correct, so what's wrong? Thanks!


Query custom posts of logged in user only

I have a custom post type setup called `website` I thought using the code below would display only the logged in users posts but it's displaying all of the custom posts even those not belonging to the logged in user. Can someone show me what the query is to get only the custom posts by the logged in user               global $current_user;           get_currentuserinfo();     $authorID = $current_user->ID;         $args = array(                   'post_type' => 'post',//or whatever you need                   'posts_per_page' => 5,                   'author' => $authorID                   );              $temp = $wp_query;         $wp_query= null;         $wp_query = new WP_Query($args);


Save output of the_content_rss into variable

How can I save the output of the function `the_content_rss` into a string variable?


Background image in login showing in admin area

I have customized my login screen with a logo using html{background:#E2DEAF url(.../images/login_logo.jpg) center top no-repeat;} because it is so wide. Usually would not tie something to the HTML element. works great BUT... it also shows up in the admin area. Anyway to prevent this? I only want it on the login.


page template for attachement page?

hey guys, I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so people can easily navigate through a gallery. Maybe it's even possible to add comments to each image? edit: Moreover is it also possible to query if I'm currently on an attachement page? E.g. for breadcrumbs I want to insert something like "home > back to post > current_image.jpg" edit/update:               function breadcrumbs() {         if (!is_home()) {             echo "Home ⟩ ";             if (is_category()) {                 $category = get_the_category();                  echo $category[0]->cat_name;             } else if (is_single()) {                 the_category('title_li=');                 echo " ⟩ ";                 the_title();             } else if (is_page()) {                 $ancestors = get_post_ancestors($post);                 // echo ancestors                 foreach($ancestors as $id) {                     echo "" . get_the_title( $id ) . " ⟩ ";                 }             } else if (is_tag()) {                 global $wp_query;                 $tag = get_term( $wp_query->queried_object_id, 'post_tag');                 echo "Tag ⟩ " . $tag->name;             } else if (is_search()) {                 echo " Searchresults ⟩ " . get_search_query();             } else if (is_404()) {                 echo "Not found";             //} else if ( is_attachment() ) {             } else if ($post->post_type == 'attachment') {                 //echo "" . get_the_title() . "";                 echo "doesn't work?";             }         }     }


Why does my taxonomy code display the first alphabetical term?

What i am trying to do is echo the last hierarchial child term for the taxonomy. My taxonomy is `propertytype`. My hierarchial structure is:   * Real Estate (Parent)   * Commercial (Child)   * Offices (Child of Commercial)   * Basement (Child of Commercial) So in the above case i would only like to echo `Offices`, or which ever the last hierarchial child term is. I thought my code below would do this, but it actually echoes `Commercial` because `Commercial` is alphabetically before Offices. Now `Basement` will be ok because it is alphabetically before `Commercial`. How do I always echo the last hierarchial child term only? My code is:               $terms = get_the_terms($wp_query->post->ID, 'propertytype');                         //die(print_r($terms));     $props = array();     foreach ($terms as $term) {          $hasChildrenTest = get_term_children($term->ID, 'propertytype' );         if ($term->parent) {             if (empty($hasChildrenTest) && !is_wp_error($hasChildrenTest)) {                 $props[] = $term->slug;             }         }     }     echo $props[0];


problem with guid, when i change the folder name

I'm new to WordPress. I started the site as good with folder name `wordpress`. After I changed the folder name from `wordpress` to `test`. And also change the **siteurl** from `http://localhost/wordpress` to `http://localhost/test` in wp_options table. And I modified the **guid** with this refer. My problem is, still I click any 'post' or 'comment', that goes to `http://localhost/wordpress/?p=7#respond` page only. I want that's goes to `http://localhost/test/?p=7#respond`. Anyone can?


Filter to remove image dimension attributes?

I'm working on a site based on a fluid width css template which sets a max- width on images to the width of the column containing them, and I need to remove the inline **width** and **height** dimension attributes that WordPress adds to images. I'm doing it with my featured images with this filter:               add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 );          function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {         $html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html );         return $html;     }      I know I can apply the same filter to **the_content** , if necessary. But is there a better way of doing this?


Custom Post Type Child Won't Come Through With Pretty Permalinks

I'm in a pickle and unfortunately, have almost zero working understanding of mod_rewrite/apache stuff. Here's what's going on: I've got a hierarchal custom post type with parents and children. On my test server, before I can see any of the custom posts, i needed to go to the permalinks settings page and hit refresh. Then I can see parents. When I hit it again, I can see children, and I'm golden. On the actual server (my friend's shared hosting account) -- I follow the same process and the parent's come through -- but not the children. I know it's not a plugin issue, because it's true with them all turned off, and also on the test server with them all turned on. The child posts DO come through when i have the settings at default permalinks -- so I know the posts are actually getting created. I'm thinking it has to be something on the shared server -- any ideas what to look for? It's so weird that parent's work but children don't... Thanks! martin \--Since it's working on the test server, I'm pretty sure my code is right -- but just in case, this is how i'm registering them:               register_post_type('book', array(         'label' => __('Books'),         'singular_label' => __('Book'),         'public' => true,         'show_ui' => true,         '_builtin' => false, // It's a custom post type, not built in!         '_edit_link' => 'post.php?post=%d',         'capability_type' => 'post',         'hierarchical' => true,         'rewrite' => array("slug" => "book"), // Permalinks format         'query_var' => false,         'supports' => array('title', 'editor', 'comments','thumbnail','page-attributes')     ));               add_action( 'init', 'create_book_taxonomies', 0 );     function create_book_taxonomies() {         register_taxonomy( 'format', 'book', array( 'hierarchical' => true, 'label' =>              __('Formats', 'series'), 'query_var' => 'format' ) );          }      -cheers, mc.


theme path in javascript file

I need to include the path to my theme file within a javascript file. How would I go about this? I have already tried:               var templateUrl = "<?php get_stylesheet_directory_uri(); ?>";          function LightboxOptions() {       this.fileLoadingImage = "'"+templateUrl+"/img/loading.gif'";       this.fileCloseImage = "'"+templateUrl+"/img/close.png'";       this.resizeDuration = 700;       this.fadeDuration = 500;       this.labelImage = "Image";       this.labelOf = "of";     }      This does not give me the path, but just inserts `<?php get_stylesheet_directory_uri(); ?>` instead of the actual path. Any ideas? Thanks in advance!


call a string/function from database

I need call a string from `$_POST["m_giambellino"]`, etc... (see down), saved in database of wordpress:               if ($_POST["send"] == "Save")              {                  update_option("mese_giambellino", $_POST["m_giambellino"]);             update_option("giorno_giambellino", $_POST["g_giambellino"]);             update_option("mese_teramo", $_POST["m_teramo"]);             update_option("giorno_teramo", $_POST["g_teramo"]);             update_option("mese_solari", $_POST["m_solari"]);             update_option("giorno_solari", $_POST["g_solari"]);                  echo "Evento/i salvati con successo!";              }      into a theme (for example: `<div><?php get_$_POST["m_giambellino"] ?></div>`). How can I do it?


Silently register plugin pages

I am developing one of my first plugins, and have come across a error: > You do not have sufficient permissions to access this page The plugin has a wizard that uses several forms, obviously I don't want people selecting later forms using the menu. Is there a way to "silently" register a page? Basically, register the page without having it appear in any menu. (I don't like my work around)


Blip Slideshow plug in Mootools/jQuery conflict

This particular site uses the Blip Slideshow plug in (because it's fed by a Picasa web rss feed) and also a jQuery powered slider. The plug in inserts the Mootools script links ahead of the jQuery ones in the header which breaks the slider. I can push the Mootools links to the footer but then Blip doesn't work. The script that calls the slider is already using jQuery no conflict - I think correctly:               jQuery(document).ready(function() {     jQuery('.fp-slides').cycle({         fx: 'fadeZoom',         timeout: 8000,         delay: 0,         speed: 500,         next: '.fp-next',         prev: '.fp-prev',         pager: '.fp-pager',         continuous: 0,         sync: 1,         pause: 1,         pauseOnPagerHover: 1,         cleartype: true,         cleartypeNoBg: true     });      });       I've read many forum answers about how to use no conflict but don't know where else it may need to be applied to resolve this. The scripts in use are: Mootools v1.3.1 jQuery v1.7.1 jquery.cycle.all I can post links or any other code that might need to be seen if someone can help sort this out.


Using dashboard uploader instead of FTP

Recently, I change my host server. that causing a problem. When I want upload a new theme or plugin instead of using dashboard uploader want me to enter FTP host and username and password, What I can do to come back to the previous uploader?


Use AJAX in shortcode

I have the following code to the shortcode to display a random quote. Question: how to make a button display a new random quote? I mean, that would hit the button and show you a new quote (without refreshing the page of course).               function random_quote() {              // quotes file          $array = file("/path to txt file");              // generate a random number between 0 and the total count of $array minus 1         // we minus 1 from the total quotes because array indices start at 0 rather than 1 by default         $r = rand(0,count($array)-1);              // return the quote in the array with an indices of $r - our random number         return $array[rand(0,count($array)-1)];     }          add_shortcode( 'randomquotes', 'random_quote');      I'm interested in how you can update the content on the page using ajax in WordPress? In my situation, because in fact be exactly that. Sorry for my bad English. I hope you understand me. Thanks!


Custom text for certain tags

Is it possible to write on the page (single post) to display text that changes depending on what kind of tag is specified in the record. I understand that correctly written. For example, through an associative array to make a couple TAG-TEXT. If the record is for the TAG that is specified in an array, it should be displayed corresponding to this tag TEXT. Do you understand what I want? I know there is a function in WordPress has_tag (), but what if I have too many tags? What I want: For example,               if (has_tag ('TAGNAME')) {     <p> TEXT tag TAGNAME </p>          elseif (has_tag ('TAGNAME1')) {     <p> TEXT1 tag TAGNAME1 </p>          ...      and so on (all different tags and text) But how to do it programmatically? Do not write the same each time the design elseif! Especially when the tag. Can not we all in the form of an array? $test = array ('TAGNAME' => 'TEXT', 'TAGNAME1' => 'TEXT1') And then to carry out the inspection on the tag, and the withdrawal of the text you want?


"the_excerpt" in loop just keeps repeating first post?

I'm trying to edit the loop in my `archive.php` template so that when I visit a category page, it only displays the post excerpt and uses the featured image as a thumbnail. When I add `the_excerpt()` to the loop it displays the excerpt of the first post, but then just keeps repeating it indefinitely? Here's the loop I'm trying to edit / modify:               // Start the Loop     while (have_posts())  {                          the_excerpt();         get_template_part('content', get_post_format());     }          // Display navigation to next/previous pages when applicable     if (theme_get_option('theme_bottom_posts_navigation')) {         theme_page_navigation();     }


Is it possible to debug plugins with Xcode?

I am mac user and I want to write a Wordpress plugin. Does Xcode work for me or do I need a different and specific IDE for this?


Are there any wordpress themes specifically designed for blogs on code?

I am using the syntaxhighlighter plugin, which is nice, but creates a horizontal scroll bar if the code is too "broad". I am thus looking for a theme with for wordpress which has much space in the horizontal direction (no sidebar, maybe). Secondary a "codish" look would be nice. I have looked at http://theme.wordpress.com/ but not found the right search phrase to get what I want. Any suggestion?


Remove the current item from a menu

I have a menu. It has two items:   * the first is a link ("Index", www.domain.com)   * the second one is a link to a category page I have the requirement to remove the first link when I'm on the index page and remove the second link when I'm on that category. Ideas?


Is it possible to setup Category wise Subsciption?

Is there any plugin in Wordpress, which will allow visitor to subscribe my WP Site category wise? Like when a user will enter his/her mail address to subscriber, (s)he will be asked to select categories on check boxes, so that he will only receive mail alerts for new posts on specific categories he selected.


How to make custom comment fields required and message field not required

I have a comment form that has `name`, `email`, `brief`, `detailed` and `rating` fields. The `name`, `email`, `brief` and `rating` need to be required, but the latter two are custom fields and I can only make them required through Javascript, but want to add proper WordPress/PHP validation to those fields. The detailed field is actually the `comment_field` which is currently required, but I want to removed the required for this field, but I don't want to do it via the WordPress settings as I still want `name` and `email` to be required.


wp_logout_url redirects to incorrect page because of pagination

Following a Wordpress Pagination tutorial, `wp_logout_url( get_permalink() );` no longer redirects to the correct page. Instead of redirecting to say `domain.com/page/2/`, it redirects me to one of the posts in the listed category. Is there a way to fix this?               global $wp_query;            $total_pages = $wp_query->max_num_pages;            if ($total_pages > 1){              $current_page = max(1, get_query_var('paged'));              echo '
';              echo paginate_links(array(             'base' => get_pagenum_link(1) . '%_%',             'format' => 'page/%#%',             'current' => $current_page,             'total' => $total_pages,             'prev_text' => 'Prev',             'next_text' => 'Next'           ));              echo '
';            }


How to get gallery images?

I have some images uploaded in wordpress posts (eg. post#1, and post#2). Now I've created a new post (eg. Post#3), and in this post I have inserted the WordPress 3.5 gallery, I did not upload any image in the post#3, instead I used the images from the post#1 and post#2. Now in the post#3, I would like to get the links to the images, but I can not seem to get. I am using the following code:               $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' =>'image') );         foreach ( $attachments as $attachment_id => $attachment ) {                 echo wp_get_attachment_image( $attachment_id, 'medium' );        }      It will show only the image if I upload in the post, but it won't show the image if I add from the other posts. So, how can I get the links to the images which are added in the gallery but not uploaded. Thanks for any help.


There's some way to add a wrapper around posted images?

I need to add a wrapper (I'll use `<figure>` in my example) around images posted through the editor, with a variable depending on the size image is being posted (thumbnail, medium, large, full), something like:               <figure class="$size">         <a rel="attachment" href="....>              <img... />         </a>     </figure>      I already solved the first step, adding the wrapper with a filter through `image_send_to_editor`, but I can't find a way to get the image size so I can add it to the class. Any clue?


Including post_type = 'wiki' in author archives

For a user with wiki-update permission only, I want to list their wiki articles in the author archive page. Currently, it comes back with "NOT FOUND Apologies, but ...". I am using the Twenty-ten child theme and created a custom loop-wiki.php but now have a block about how to proceed. Any ideas? Anyone? I've searched and found similar type discussion but nothing stands out. Thanks!


How can I modify RSS item titles to be either the title or a custom meta field?

I'd like to optionally replace some RSS item titles with a headline meta field I've added to certain post types. I have the post types showing up in the feed using:               function myfeed_request($qv) {       if (isset($qv['feed']) && !isset($qv['post_type']))         $qv['post_type'] = array('post', 'interviews', 'reviews');       return $qv;     }     add_filter('request', 'myfeed_request');      But I've searched around and can't figure out how to replace the title. Any ideas?


First wordpress blog, should I make my own theme for maximum customizability?

I am, although still extremely n00by, a semi-competent web designer and developer and I have decided to start a blog. I have heard all about this _WordPress_ phenomena and I am really excited to give it a try! Now, I really want my blog to stand out, and from what I can gather, installing WordPress locally gives me full customizability as I have the freedom to 'create my own theme' so to speak. Is that the correct terminology, first of all? Also, I've heard that by installing WordPress locally, it removes the limitations of having a 'paid' or 'free' version. This would make sense since it is on your own PHP server. How difficult is this to do? I'm assuming you create a design, and integrate the WP features through PHP?    Any suggestions are appreciated! Thanks!


Why doesn't YoastSEO allow me to set the title/description for the home page?

For some reason, YoastSEO set my home page to the first blog post. So the home page canonical, title, and description are set to the values of the first blog post. And when I tried to set the home page's title/description, I got this screen instead of the form fields to set the values of the title/description: ![enter image description here](http://i.stack.imgur.com/kgCXS.png)


How can I transition a site from using the Beta Tester plugin to a "normal" install?

I'm currently using the WordPress Beta Tester plugin on a site. Is there a "best" way to transition the site to a "normal" WordPress install? The plugin includes this notice: > Please note: Once you have switched your blog to one of these beta versions > of software it will not always be possible to downgrade as the database > structure maybe updated during the development of a major release.


Alert Email when any Post or Page is Changed

Is there a way to have Wordpress email me whenever a Page or Post is Published?


Wordpress 500 Internal server error when activating custom theme

Whenever I try to activate my custom built theme on the clients server, the website returns a '500 - Internal Server Error'. ![enter image description here](http://i.stack.imgur.com/PMaMF.png) The theme is working fine on my local machine, MAMP on my mac. I dont even know where to begin to solve this problem! As far as I am aware, the wordpress is a fresh install and I have no plugins that are activated. **Edit:** As requested, here is the structure of my theme:               > theme-folder       - 404.php       > assets         > css         > font         > images         > js         > sequence       - category-food-and-baking.php       - comments.php       - footer.php       - front-page.php       - functions.php       - header.php       - index.php       - page.php       - sidebar.php       - single-default.php       - single-food-and-baking.php       - single.php       - style.css      And the first section of my CSS is:               /*     Theme Name: OonaghsKitchen     Theme URI: http://www.hknudsen.co.uk     Author:H Knudsen     Author URI: http://www.hknudsen.co.uk     Description: The theme for Oonaghs Kitchen     Version: 1     License: GNU General Public License v2 or later     License URI: http://www.gnu.org/licenses/gpl-2.0.html     Tags: OonaghsKitchen      */


not all categories being displayed

I have created a child theme for a theme I purchased. The purchased theme is for restaurants wanting to display their menu. The theme accepts menu items as Posts, and groups them according to category. The theme only accepts 1 level of categories, not more complex menus with 2 levels of categories. The purchased theme is built for 1 level hierarchies. e.g:               >Menu     >>>Breakfast     >>>Lunch     >>>Dinner      However, the restaurant I am working for has a more complex menu:               >Menu     >>>Breakfast     >>>>>>Food     >>>>>>Sides     >>>>>>Drinks     >>>Lunch     >>>>>>Small     >>>>>>Large     >>>>>>Sides      My child theme aims to support two levels of categories. Here is the portion of code which might be causing me problems:               <?php $args=array(             'orderby' => 'slug',             'order' => 'ASC',             'include' => '4, 5, 6, 27',             //'exclude' => '3, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26',             'child_of' => $menuCat             );             $categories=get_categories($args);             foreach($categories as $category) {                     $catName = $category->name;                     $catName = strtolower($catName);                     $catName = str_replace (" ", "", $catName);                     $catName = str_replace ("&", "", $catName);                     $catName = str_replace ("é", "e", $catName);             ?>             <div class="menuSection section" id="<?php echo $catName; ?>">

<?php echo $category->name; ?>

                     <?php if($category->description){ ?>
<?php echo $category->description; ?>
                     <?php } ?>                          <?php $args=array(                     'orderby' => 'slug',                     'order' => 'ASC',                     'parent' => $category->term_id                     );                     $subcategories=get_categories($args);                     foreach($subcategories as $subcategory) {                                  $showPostsInSubCategory = new WP_Query();                             $showPostsInSubCategory->query('cat='.$subcategory->term_id.'&showposts=100');                     ?>     ...loop through display of subcategory      My child theme is an attempt to support 2 levels of categories. Here is the original theme's index.php. Even though I have hard-coded which categories to include, the website only displays Posts for 1 category - Lunch. **Why is Lunch the only category being displayed?**


Permalinks not working when bootstrapping from parent directory

I am trying to use WordPress from a subdirectory but access it from its parent. This is on order to try Capistrano deploys. I have the following directory structure               index.php     .htaccess     /wordpress      index.php contains the following to bootstrap the WordPress loader.               define('WP_USE_THEMES', true);          /** Loads the WordPress Environment and Template */     require( 'wordpress/wp-blog-header.php' );      .htaccess contains the following               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>     # END WordPress      Now, WordPress is loading the templates and showing in the contents of the themes index.php template so WordPress is working but not matching any URLS. it's also not matching any cookies so I can't access any URL/Rewrite debugging tools. Any thoughts?


wordpress wp_reset_query makes jquery tabs stop working

here is my code,the slider tab is working fine if i don't add wp_reset_query() but when i add it. it stops working.I tried all.Please any suggestion for this.               <?php                   query_posts(array(                   'post_type' => 'home_slider',                  'showposts' => 10                   ) );                    ?>

               <?php $j=1; while (have_posts()) : the_post(); ?>               <div id="fragment-<?php echo $j;?>" class="ui-tabs-panel" style=""> <img src="<?php  echo get_field('main_image');?>" alt="main banner" /> Inline HTML

                     <?php  echo get_field('main_text');?>

               <?php $j++;endwhile;  ?>               <?php rewind_posts(); ?>

                   <div class="lightbox_top col12" style="background:url(<?php echo get_field('main_video_background_image');?>);">

                     <iframe id="yplayer" wmode="Opaque" frameborder="0"                                                   src="<?php echo get_field('lighbox_link');?>?wmode=transparent&autoplay=0" >

 <?php echo get_field('light_left');?>

 <img src="<?php echo get_field('light_right');?>">
 <?php echo get_field('lightbox_right_text');?>

               <?php $i=1; while (have_posts()) : the_post(); ?>               <li class="row ui-tabs-nav-item" id="nav-fragment-<?php echo $i?>"><a href="#fragment-<?php echo $i;?>"> <img src="<?php  echo get_field('thumb_image');?>" alt="lexi thumbs" />

<?php echo the_title();?>
                                  <?php  echo get_field('thumb_text');?>
               <?php $i++;endwhile; wp_reset_query(); ?>


Creating a Blog with numerous categories

I'm creating a health conditions site where contributors will make posts. If I want to have multiple people with the "Author Role" be able to post about various categories, do I have to manually create the categories ahead of time...or is there a better way to do this? Do we increase Author Role permissions to be able to add Categories? Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category. And if I want all categories to show on the sidebar, how would I achieve that prior to there even being a post? Many Thanks!


Adding circles for recent posts under each post in the Spun theme

I am trying to add a snippet for a few recent posts under each blog post on my site with the Spun theme, but I think I need to somehow enable the some part of the theme's CSS code for it. So far I have added the following snippet to the single post php code,               <?php         $recentPosts = new WP_Query();         $recentPosts->query('showposts=5');     ?>     <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>                              <?php                             get_template_part( 'content', 'home' );                         ?>     <?php endwhile; ?>      but then I get a bunch of giant square thumbnails. Any ideas on what the next step would be to get the formatting right?


All the pages are blank

My friend website blog works well but all the pages show blank pages. I even look at the source code and I code nothing. It was empty. What can be causing this when the blog part of WordPress is still working? He is using WordPress version 3.6.1. Here are the plugins he uses:   * Akismet   * Categories to Tags Converter Importer   * ePub Export   * Facebook Fanbox Cache Widget   * Google Analytics for WordPress   * Google XML Sitemaps   * Jetpack par WordPress.com   * Quick Chat   * Responsive Add Ons   * Shareaholic | share buttons, analytics, related posts   * WP-Cumulus   * WP Facebook grabber With the plugins on I get these errors on the blog where does show:               Notice: Use of undefined constant wp_cumulus_widget - assumed 'wp_cumulus_widget' in /home/---/public_html/wp-content/plugins/wp-cumulus/wp-cumulus.php on line 375          Notice: register_sidebar_widget est dÃ©prÃ©ciÃ© depuis la version 2.8! Utilisez wp_register_sidebar_widget() Ã  la place. in /home/---/public_html/wp-includes/functions.php on line 2919          Notice: register_widget_control est dÃ©prÃ©ciÃ© depuis la version 2.8! Utilisez wp_register_widget_control() Ã  la place. in /home/---/public_html/wp-includes/functions.php on line 2919      This shows on the blank pages, again with the plugins on:               Notice: Use of undefined constant wp_cumulus_widget - assumed 'wp_cumulus_widget' in /home/---/public_html/wp-content/plugins/wp-cumulus/wp-cumulus.php on line 375          Notice: register_sidebar_widget est dÃ©prÃ©ciÃ© depuis la version 2.8! Utilisez wp_register_sidebar_widget() Ã  la place. in /home/---/public_html/wp-includes/functions.php on line 2919          Notice: register_widget_control est dÃ©prÃ©ciÃ© depuis la version 2.8! Utilisez wp_register_widget_control() Ã  la place. in /home/---/public_html/wp-includes/functions.php on line 2919          Parse error: syntax error, unexpected '<' in /home/---/public_html/wp-content/themes/ifeaturepro/page.php on line 15


Page downloads as file in Chrome

I'm looking to see if I could get pointers in where to look to solve this issue. ## Issue In Chrome, viewing the blog http://www.bitesizeirishgaelic.com/blog/ in Chrome v21, the page downloads as a file "download", rather than opening normally. The rest of the site on the same server loads fine in Chrome. All pages load fine in Firefox. ## Background I suspected that it was something to do with the APC caching for Apache, and/or WP Super Cache. However, after disabling both, and clearing my browser cache, the problem continues.


Stop wordpress automatically abbreviating the domain url

I'm trying to include webtrend js script in the footer template               <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/style/js/webtrends/webtrends.load.js"></script>       The problem is the "domain" turn into `..` automatically in the webtrends.load.js calling other scripts               { yt:{src:"http://mydomainname.com/wp-content/themes/mytheme/style/js/webtrends/webtrends.yt.js", mode:"automatic"}, }           { yt:{src:"../wp-content/themes/mytheme/style/js/webtrends/webtrends.yt.js", mode:"automatic"}, }


jQuery UI Autocomplete showing all results

I've built an Autocompleting search box for WordPress categories (it's actually a Custom Taxonomy), which works great (i.e it shows the categories when typed). However, when 1 key is typed, it will show all the results, regardless of the fact whether that string matches any of the categories. Here is my PHP code (autocomplete.php, in the root of my theme directory):               <?php     include_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php' ); // I know the traditional way to do it is loading admin_ajax but I read this was exactly the same and didn't increase the overhead to the server     if (isset($_GET['term'])) { // I suspect the problem is something to with this         $tradeList = get_terms('trade');         $tradeNames = Array();         foreach ($tradeList as $trade) {             $tradeName = $trade->name;             array_push($tradeNames, $tradeName);         }         echo json_encode($tradeNames);     }     ?>      and my Javascript code:               $(document).ready(function() {         $(".main-search-field").autocomplete({             source: "/wp-content/themes/local_directory/autocomplete.php",             minLength: 1         });      });      and finally HTML:               <input type="text" class="main-search-field" name="search" id="search">      I realise this might be badly coded, if it is feel free to re-do it. But what I really need to know is how to get the autocomplete suggestions to be relevant to the string that is typed in the search box. Thanks for any help :)


Wordpress Categories on post edit page

I am building a magazine style site with around 60 categories. When adding a new post, selecting its categories is a real pain with the default category tree. What I would like is for the Categories to be searchable & auto complete if possible. Anyone have any ideas or plugins they may know of? Cheers, Daniel


wp_query conditionally get posts

My wp_query gets posts starting at the 5th one, proceeding it is another loop for the first four, for styling reasons. How do I conditionally get the wrapper for these posts only if they exist? The only way I can get it working is to have the container 'right-hang' before and after the loop, obviously if I put it inside the loop it the markup it spits out is just two ul's.               <?php echo('
'); ?>                                          <?php $featuredPosts = new WP_Query(); ?>                                          <?php $featuredPosts->query('showposts=2&cat=6&offset=4'); ?>                                          <?php while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
                                     <a href="<?php the_permalink() ?>">                                         <?php the_post_thumbnail('extrathumb'); ?>                                         <?php the_title(); ?>                                                                                <?php                                             $category = get_the_category();                                              echo $category[0]->cat_name;                                             ?>
                                                 <?php endwhile; ?>                                    <?php echo '
'; ?>


Add gravatar to author list

I am using this code for listing out all authors on the site in my sidebar. It works, except I also need to pull in their Gravatar image. It's working in a loop on the homepage with this               <?php echo get_avatar( get_the_author_email(), '80' ); ?>      but is there a way I can add it to this list as well? Also.. I can't figure out a way to exclude the "Admin" account using this code, is that possible? Thank you!               <?php     $order = 'user_nicename';     $user_ids = $wpdb->get_col("SELECT ID FROM $wpdb->users ORDER BY $order"); // query users     foreach($user_ids as $user_id) :      $user = get_userdata($user_id);     ?>
<?php echo 'user_url . '">' . $user->display_name . ''; ?>

     <?php     endforeach;      ?>


A Specific Blog post to be assigned as the landing page of my wordpress blog

Is it possible for a specific blog post (in wordpress) to be the landing page? For example my domain name is _www.overflowingstupidity.com_ and I have this blog entitled post _"How to burn your house down in 3 easy steps"_ Whenever a user clicks or type in the url bar of the web browser my domain name, he/she will directed and landed on my blog post "How to burn your house down in 3 easy steps" instead of the default index.php file of my wordpress blog. Is that possible? IF YES, can you point out to me how?


get_results using wpdb

im trying to retrieve information on my wordpress database, i wanted to display all `pages` using this statement. but im getting a blank `ARRAY`               global $wpdb;     $result = $wpdb->get_results (             "             SELECT *              FROM  $wpdb->wp_posts              WHERE post_type =  'page'             "             );          echo $result; // display data      output:                 ARRAY      [EDIT] after changing below suggestions, im now using this. but i still dont get any results.               global $wpdb;              $posts = $wpdb->wp_posts;         $result = $wpdb->get_results( " SELECT * FROM  $posts WHERE 'post_type' =  'page' "  );              foreach ($result as $page) {                 echo $page->ID.'<br/>';              }


wp_enqueue_script not working?

Excuse me, I'm very new to PHP and WordPress, but I'm trying to link to an exterenal js file called **trans.js** , that relies on jQuery. Here is the code at the beginning of the header.php:                 <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/trans.js"></script>      and here is the enqueue within the functions.php               function twentytwelve_scripts_styles() {         global $wp_styles;              wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );          }          add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );          function my_scripts_method() {         wp_enqueue_script(             'custom-script',             get_stylesheet_directory_uri() . '/js/trans.js',             array( 'jquery' )         );     }          add_action( 'wp_enqueue_scripts', 'my_scripts_method' );      Yet it still does not link up with the **trans.js** — does anyone know why this is?


Display Meta Data with HTML?

Is it possible to display the custom field/meta data content with some html? Usually i would use the following to just display the content...               <?php echo get_post_meta($post->ID, '_cmb__description',true);?>      However, when there is actually meta content i want it to appear within some html, but i only want that html to appear when there is meta data to appear?               <?php echo get_post_meta($post->ID,<div class="box">. '_cmb__description'. </div>,true);?>      Is this possible? I'm not that up to scratch with it all, so wasn't sure if it was doable at all.


How to use classes declared in another plugin?

I'm developing a Wordpress Woocommerce plugin. On my local environment it works fine but I have problems when adding the plugin to a replica of the prod environment. I am new to wordpress and not very familiar with web dev (I'm a Java programmer). In the plugin file, I instantiate a class from the Woocommerce plugin package like this:               $coupon = new WC_Coupon($some_code);      In the local environment (php 5.4.10 , Woocommerce 2.0.13, Wordpress 3.6) it's fine. In the production environment (php 5.4.10 , Woocommerce 1.6.5.2, Wordpress 3.4.2) I have the following error:               Fatal error: Class 'WC_Coupon' not found      I have tried including the file where the WC_Coupon class is defined but then the error becomes               Fatal error: Cannot redeclare class WC_Coupon      So what is the proper way to use classes declared in another plugin? Note: upgrading is not an option at the moment.


Custom members area (interface/design) in Wordpress, is it possible and how?

Anybody can suggest tutorial or URLs where I can find information about how to create custom members area in WP ? I mean when member is logged in I would like to show him something that is different from standard WP members area interface (design).


User interfaces living in the Admin "back end" area

We're currently toying with the idea of building a user interface that lives in the Admin area ("back-end"), effectively meaning that those interfaces will be theme independent. The code that actually renders the user interface will live in a plugin (not touching WP core). To make this less vague, we are roughly looking to do the following:   * Users can belong to one or more Groups (custom post type). For each Group, we render a menu item in the left hand side "Admin menu".   * We render a page for each Group (accessed by clicking on the menu item) that shows Announcements (also a custom post type) for that Group as well as a calendar for that Group (also based on a custom post type). What does best practice and / or Wordpress development guidelines say about this though? Is it a good idea to have user interfaces in the back end, or a bad idea (and if so, why)? I'm trying to make a strong case either for or against this decision.


current_user_can not always working properly

I have a custom Wordpress theme that includes a members only section. In order to implement this, I have the following code at the top of my restricted pages.               <?php if ( ! current_user_can ('view_players_area') ) { header('Location: ' . wp_login_url( "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" ) ); } ?>      Most of the time, this works fine, however every so often it simply fails to work for NO reason at all. No error message, just when you log in, it redirects back to the login page continually. I originally used `is_user_logged_in()` and had a similar problem which is what caused me to use this code. If anyone has any suggestions what might be causing this I will be hugely appreciative - this has me tearing my hair out, as the members area needs to go live in the next couple of weeks. Regards Ben **_Edit_** Following advice from replies and some users in the chatroom, I have modified my code so the the redirect is not done in the template. Now in a `functions.php` include, I have the following:               <?php          function redirect_restricted_areas( $query )     {         if ( !is_admin() && $query->is_main_query() )         {               if ( ! current_user_can( 'view_players_area' ) && (                    $query->is_singular ('player-page') ||                    $query->is_post_type_archive ('player-page')               ) )                     header('Location: ' . wp_login_url( "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" ) );         }          }          add_action ( 'pre_get_posts', 'redirect_restricted_areas' );      Sadly, although this is good advice that makes my code simpler, it doesn't solve my problem. **_Further Edit_** So with some debugging, I can see that $current_user is not always being set, but I have no idea why. **_Another Edit_** Investigating this further, it seems to be something to do with the cookies. After learning a bit about the Wordpress authentication cookies I noticed the following. Using dBug (a prettier version of `print_r()`) I determined that according to PHP the Wordpress auth cookie didn't exist, yet if I open up Chrome inspector I can clearly see the cookie sitting there. Not quite sure what to make of this yet, but if anybody is able to point me in the right direction...


Checking if a file is already in the Media Library

I'm creating custom files in a plugin and adding them to the Media Library using the code provided in the Wordpress Codex for wp_insert_attachment. However, my plugin occasionally overwrites those files. I need to make sure that the files are not added again to the Media Library. Here is the current code:               $wp_filetype = wp_check_filetype(basename($filename), null );     $wp_upload_dir = wp_upload_dir();     $attachment = array(        'guid' => $wp_upload_dir['baseurl'] . '/' . _wp_relative_upload_path( $filename ),         'post_mime_type' => $wp_filetype['type'],        'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),        'post_content' => '',        'post_status' => 'inherit'     );     $attach_id = wp_insert_attachment( $attachment, $filename);     // you must first include the image.php file     // for the function wp_generate_attachment_metadata() to work     require_once(ABSPATH . 'wp-admin/includes/image.php');     $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );     wp_update_attachment_metadata( $attach_id, $attach_data );      I just need to check whether or not the file is already a part of the Media Library, and update it if it is. I do not have a post_id to work with, just the permalink and the guid. Thanks for your help.


how to filter post listing (in WP dashboard posts listing) using a custom field (search functionality) ?

despite the fact I googled a lot, I've not found the answer to a very simple question : I have some posts with a custom field (ie supplier_name). I would like to be able to search and filter my posts according to this custom field. In other words, in the admin posts listing, I would like to have a search box (named "Supplier name") where i can type in a value (ex. "IBM") and then, click on a search button that will give me back all the posts that have a custom field named "supplier_name" and, if so, the value of the custom field will be "IBM". How can i do this ?


Get Posts from Last 24 hours and Sort them via GD Star Rating

I am trying to sort the posts using GD Star Rating in the last 24 hours. I have two separate queries, but I don't know how to merge them.                         function filter_where($where = '') {                 //posts in the last 24 Hours                 $where .= "AND post_date > '" . date('Y-m-d H:i:s', strtotime('-24 hours')) . "'";                 return $where;               }             add_filter('posts_where', 'filter_where');             query_posts($query_string);      And > query_posts('gdsr_sort=thumbs&posts_per_page=10'); I have no idea how to sort the posts from the last 24 hours using GD Star, but these two queries work perfectly fine individually. Thanks!


Can't remove menu items added by plugin

I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just fine:               remove_menu_page('plugins.php');      I have a plugin, CW Image Optimizer, that adds a sub menu under the Settings menu. The php file the plugin uses is named cw-image-optimizer.php. If I use the following line to remove the sub menu it doesn't work:               remove_submenu_page('options-general.php', 'cw-image-optimizer.php');      Is there something specific I need to do to remove menu and sub menu items added by plugins?


Create custom links for excerpts with php dynamically

Good Day I am using excerpts in my wordpress theme. Now in wordpress's documentation, they say wordpress does not automatically add links for the excerpts, you have to manually add them like this: Original excerpts file
      <?php the_excerpt(); ?>
      Adding links
     <?php the_excerpt(); ?>     <a href="<?php echo get_permalink(); ?>"> Read More...
      Now what I would like to do is to link each excerpt to a different wordpress **page** , and not to its own excerpt. So for that, I would have to create a custom php function to create a unique link for each excerpt, pointing to a different page each. How do I do that? See my website where the excerpts are located - It is right below the main slider named: Pastor's Corner, Mother's Heart, Sermons etc... Thank you


Conditional get template part

My index page look like this...
google ad code goes here

My posts are goes here
      I use                   get_template_part('index')       in another page template. But I want index's posts only NOT google ads. Help me.. Thanks in advance..)


only show container with next/prev links if they exist?

hey guys, i know there is something like `if ( function_exists('')` is it possible to use that with `next_posts_link()` and `previous_posts_link()`. The reason I'm asking that is that I have something like

<?php next_posts_link('« older') ?>

<?php previous_posts_link('newer »') ?>

      In my case div.navigation has a colored background and a fixed height. So even there is no next or perv post this div.navigation appears. I wonder if I can only display this if there exists a next or prev post? Any idea how to do that?


Disable Other Plugins on my Custom Post Type?

I've created a plugin that lets users build super-simple landing pages for mobile devices. The pages my plugin creates are of a custom post type. I want to provide users with an option to "disable all other plugins on this page", to prevent things like tweetmeme, facebook like buttons, and other third-party plugin generated content from displaying inside my plugin's template. I've added an option that lets the user prevent the call to wp_head, but what about those that inject content elsewhere in the page, e.g. by flitering the_content? After typing this out, I'm thinking that a combination of supressing wp_head() plus a remove_all_filters('the_content') might do the trick, but I'll go ahead and post this question anyhow in case any of you have better suggestions. Thanks!


How can I remove links from the function "get term list"?

<?php echo get_the_term_list( $post->ID, 'people', 'People: ', ' ', '' ); ?>       returns something like this:               People: Person1, Person2, ...      How can I make it return the same thing without links like this:               People: Person1, Person2


Preventing index.php?category_name=something from redirecting

I'm trying to filter posts in a category by the year of the post's date. I also want to do this without being redirected to the year template so my ideal URL would be http://example.com/category/reports/2011/ which would load the template file category.php where I could then use query_posts to include only the posts that were published in 2011 and are in the reports category. Here is my rewrite rule code...               function filter_category_by_year_rewrite_rules( $wp_rewrite ) {         /* Creates rewrite rules for filtering category archives by year (/category/reports/2011/)*/         $new_rules = array(             "category/(.+?)/(\d\d\d\d)/?$" => "index.php?category_name=" . $wp_rewrite->preg_index(1) . "&year=" . $wp_rewrite->preg_index(2)         );         $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;         var_dump($wp_rewrite);     }     add_action('generate_rewrite_rules', 'filter_category_by_year_rewrite_rules');      My problem is WordPress automatically redirects `index.php?category_name=reports&year=2011` to `/category/reports/` with no trace of the year parameter. How can I intercept this redirect? I tried hooking in to the `template_redirect` action to no avail :(               function testing_redirect() {         global $wp;         if($wp->request['matched_rule'] == 'category/(.+?)/(\d\d\d\d)/?$') {             load_template( 'category.php' ); //TEMPLATEPATH .'/category.php';         }     }     add_action('template_redirect', 'testing_redirect', 1);


Does WordPress limit the length of slug names for Post Meta or Terms?

The WordPress Codex states the the Post Type Names and Taxonomy Names have a limit to the slug name.   * Register Post Type \-- max. 20 characters, can not contain capital letters or spaces   * Register Taxonomy \-- The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces) and not more than 32 characters long (database structure restriction). However, the WordPress Codex doesn't state whether or not Post Meta or Terms have a limit to the slug name.   * Add Post Meta \-- No slug limit?   * Insert Term \-- No slug limit? Can this be confirmed? Is there no slug name limit for Post meta or Terms?


Adding new sites to Multisite won't register in Dashboard

I am having a real issue here that I can't seem to find an answer to. I am using Plesk, and have setup a new subscription. I have all of the proper settings, using FastCGI, ownership of files, etc. On a fresh install of wordpress and allowing multisite I cannot seem to create a new site and have it show up in the admin dashboard, or under My Sites dropdown. However, they do actually register in the database and I can access them through the Sites tab. I am completely lost here as to why this is possible. In addition, when I try to activate my Gravity Forms Plugin and click on the Register settings link, I get the "You do not have sufficient permissions to access this page." If anyone can give me some insite here I would truly appreciate it so I can stop banging my head against a wall.


Post Type Description for 'Posts'

On the site I'm currently developing I am using 'Custom Post Type UI' to manage my custom post types. Within this I can manage the description for any of the new custom post types that I have created. How would I go about editing the description of the default 'posts' post type? I am outputting this description under the heading in each section. Thanks!


how to get a list of meta data fields assocaited with a custom post type

I am using a theme which has defined a custom post type-- Now, I am trying to retrieve the list of metadata fields used by that post type-- so that I can insert data via PHP code in form of that custom post--I just want the list of meta data fields(not the values of metadata fields for specific posts-- but the list of metadata fields for that type of custom post). How do I do this?


How to remove or replace the log-in link for comment replies?

I need to edit the function `get_comment_reply_link()` in `wp- includes/comments-template.php`. All I really wanna do is take out the "log in to reply" text is puts in every comment for logged out users which is disturbing to me. How can I do this the right way? Here's the function.               function get_comment_reply_link($args = array(), $comment = null, $post = null) {     global $user_ID;          $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'),         'login_text' => __('Log in to Reply'), 'depth' => 0, 'before' => '', 'after' => '');          $args = wp_parse_args($args, $defaults);          if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] )         return;          extract($args, EXTR_SKIP);          $comment = get_comment($comment);     if ( empty($post) )         $post = $comment->comment_post_ID;     $post = get_post($post);          if ( !comments_open($post->ID) )         return false;          $link = '';          if ( get_option('comment_registration') && !$user_ID )         $link = '' . $login_text . '';     else         $link = "comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text";     return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);     }