How to only list the child terms of a taxonomy and not their parents?

I'm creating an age select menu in the admin, populated from a taxonomy of `age`. The taxonomy is hierarchical as follows:   * 18-25 (parent, ID 183)      * 18 (child)     * 19     * 20     * 21     * 22     * 23     * 24     * 25   * 26-30 (parent, ID 184)      * 26     * 27     * 28     * 29     * 30 I would like to only list the children (18, 19 etc) and not the parents (18-25, 26-30) etc. Currently I am using `get_terms` with the `parent` argument, but it doesn't accept more than 1 parent ID. Here's what I have so far, which shows the children from 18-25.                   $ages = get_terms( 'age', array(             'hide_empty' => 0,             'parent' => '183',         ));      Here's what I want it to do, but isn't supported. I have also tried it with an array but it doesn't work either.                   $ages = get_terms( 'age', array(             'hide_empty' => 0,             'parent' => '183,184',         ));      I see there is a get_term_children function but I'm unsure of how to use this either as it looks like it only accepts one value also. Eg: In this example it would build an unordered list but I could modify for select menu.               <?php         $termID = 183;         $taxonomyName = "age";         $termchildren = get_term_children( $termID, $taxonomyName );              echo '
';         foreach ($termchildren as $child) {         $term = get_term_by( 'id', $child, $taxonomyName );         echo '
name, $taxonomyName ) . '">' . $term->name . '
';         }         echo '
';     ?>


wp_set_post_terms example?

My client has a post type that uses a lot taxonomies. I plan to put this script in a post meta box and hide the existing taxonomies. **Do you know of a greatwp_set_post_terms example?** I want to make this:   ![enter image description here](http://i.stack.imgur.com/ZbFEY.png) Look like this: ![enter image description here](http://i.stack.imgur.com/4VODQ.png) Related functions? wp_update_term


alphabetically order role drop-down selection in dashboard

The site I'm working on will have a very large number of unique user roles via a members plugin. Because of that, I'd like to have the Role drop-down selection on the Add New User page to display roles alphabetically, rather than descending order of creation. Is there any way to do this?


What's the opposite of required valid user in .htaccess authentication

I'm familiar with password protecting files and directories using apache authentication. I am working on a site where I have two WordPress installs on the same domain. One WP install is in the root /public_html/ another one is in a sub directory. We do NOT want to merge the user database this is why we are using separate WP installs. The issue is I want to password protect wp-login.php file on the main install, but not on the sub directory install. I went ahead and added the following code to my .htaccess file in my public_html directory.               AuthName "Admins Only"     AuthUserFile /path/to/passwd     AuthGroupFile /dev/null     AuthType basic          <Files wp-login.php>     require valid-user     </Files>      The issue is that this code blocks it for both the main WP site and the sub directory wp-login.php file. I was hoping if there is a way that I can add in my /folder/.htaccess which will keep the other WP install open for login by anyone. Let me know


Ascending order has strange effects on wordpress loop

I have a custom loop:               $args = array(         'post_type' => 'symposia_program',         'taxonomy' => 'days',          'term' => 'day-1',         'order' => 'ASC'     );          $query = new WP_Query($args);     if ( $query->have_posts() ) :         while ( $query->have_posts() ) :             $query->the_post();             .....(code)....         endwhile;      endif;     wp_reset_query();      For some reason, the `'order' => 'ASC'` parameter has strange effects on the output of the loop. Basically it doesn't render some of the posts, namely some recent ones. If I switch back to `DESC`, all the posts show up. Please help!


Style the archives/category sidebar widget via theme

I would like to change the appearance of the categories and archives widgets in the sidebar such that each category/month alternates the row color. The only way I know how to accomplish this requires modifying the PHP code in the core that generates the category and archives widgets (outputting alternating css styles depending on odd/even rows). I want to avoid modifying core files and instead do everything in the theme. Is there a way to accomplish this even/odd row styling for these widgets from within the theme or via CSS only?


Check if a different page has any attached images

I am trying to make a notification function for a user's account dashboard that displays if they have not added any images to their profile's gallery. I found this page, which is a function that checks if the CURRENT page has any attachments: Check if post/page has gallery? How can I change that to check by a specific post ID, i.e. a function that will check if post 2 has a gallery or not?


Which plugin gives me pretty html syntax in the editor/dashboard?

I'm looking for a plugin that gives me some on-the-fly syntax highlighting in the HTML editor of posts and pages. I swear I've seen it somewhere, but I can't find it, all the ones I find are for showing it nicely on the front-end of the post/page to users. In case it's not clear, I Would like to have my HTML editor tab show me stuff like this: http://i.stack.imgur.com/wdYvr.png


Custom disqus_identifier not properly changing default value

I have several pages that are all part of the same topic, and I would like them to use the same comment thread on Disqus. I am using the following code to pull the custom identifier from a custom field:               <?php         //Attempt to get identifier         $disqus = get_post_meta($post->ID, 'disqusid', true);         //if isset & not blank else use $post->ID         $disqus = (!empty($disqus)) ? $disqus : $post->ID;     ?>     <script type="text/javascript">         var disqus_identifier = '<?=$disqus?>';     </script>      The code is displaying the value from the custom field correctly, however, the Disqus plugin is still using the page ID as the identifier when I inspect the page code. Meaning each page still uses its own comment thread. I have tried placing the code in several different places: just before the comments_template(); code, in header.php in various places (before/after wp_head), and in footer.php in various places (before/after wp_footer). Everything I've read makes it sound as simple as adding the identifier code before the embed.js call for Disqus. I feel like I may be missing something special that needs to be done. Is it possible something else is interfering with it? Everything else is working as expected. Disqus WordPress Plugin: http://wordpress.org/extend/plugins/disqus-comment- system/ The site I'm working on isn't live until this issue is fixed, but I can set it live if viewing the whole site code will help.


Prevent wp_login_form() from redirecting to wp-admin when there are errors

I have made a login form on the front-end of my site using `wp_login_form()`. However, when the user types in an incorrect username/password they are redirected to the wp-admin login form. How can you instead display any error messages above the login form? Ideally, I don't want the user to ever have to see the Wordpress admin section. I have tried using the `redirect_invalid_login()` hook but this doesn't seem to work?


Remove date and category filters when editing custom post types

The answers to this question give excellent instructions for adding filters to the admin edit.php screen for custom post types. But they don't explain how to remove the existing filters on date and category. Does anyone know whether this is possible, and if so how to do it?


jQuery dialog prints HTML-Tags under Wordpress

i need some help. I am using wp_localize_script in my Wordpres_Plugin. Inthe documentready-function i use this Code to bring the Message up:               $('#button-setup-league').click(function()      {     $( "#dialog p" ).append('<span>'+wpslm_v_script_vars.delete_league+'</span>');                 $( "#dialog" ).dialog({                      modal: true                 });      });      The Situation is, that in Wordpress 3.4 it runs very well with no Problems. But under Wordpress 3.2 there are all the HTML-Tags like `<strong>` or `<br />` in the Messagebox visible. If i look in the Sourcecode, everything looks very good. WP 3.2 runs jQuery 1.4 and WP 3.4 runs jQuery 1.7. Does this maybe effect the outputs? Any help is very appreeciated. Thank you all


All post attachments in gallery grid to full screen slideshow?

Using the default wp gallery for displaying the attachments. All attachments for the specific post in full screen slideshow when click on image. I am using also Bootstrap frond end framework. Possible with carouse?


Moved WordPress to New Server, Now Tries to Download a File

Let me start by saying that I have moved dozens of websites from one server to another, without issue. I recently moved a website and when the URL is visited, a file named "download" with no extension and only a 1KB file size downloads automatically. I backed up all files and downloaded the databases using four different methods, just to make sure: BackWPup, BackUpWordPress and manually by zipping the files & downloading the files via FTP. The original website works perfectly on the original server. I used the method I've always used when moving to a new server. On the new server:   1. Create new DB, user and import database   2. Upload files and unzip   3. Edit wp-config.php with new DB name, user, password   4. Change the website URL using the functions.php method in the WordPress Codex, here - http://codex.wordpress.org/Changing_The_Site_URL I should also mention that I uploaded the site to three different servers (including a sub-domain on the original server), all with the same result. In addition to the methods mentioned above, I tried the following things to try to troubleshoot:   1. Changed the "plugins" folder name to see if a plugin was causing the error    2. Changed the active theme folder name to see if the theme was causing the error    3. Changed WP_DEBUG to "true" in wp-conig.php - But the site never loads, so no errors are displayed. Currently, the erroneous website is located at - http://cgdev.webworksplayground.com/ Thanks for the help.


Unable to add widgets to sidebars in custom theme

I'm trying to add a footer area to wordpress so I can drop widgets and things there. I see my footer area in the admin section, but if I add a text (or any other) widget and then save it, nothing shows up on the footer. If I refresh the page, the widget that I dragged to the right in my footer area is no longer listed there. I checked the network requests and there aren't any errors that I'm seeing. Did I miss a step? **footer.php** contains:               <?php     get_sidebar('footer_widget_area');     wp_footer();     ?>      **functions.php** contains:               // Register widgetized areas     function theme_widgets_init() {         // Area 1       register_sidebar( array (       'name' => 'Primary Widget Area',       'id' => 'primary_widget_area',       'before_widget' => '
',       'after_widget' => "
",         'before_title' => '
',         'after_title' => '
',       ) );              // Area 2       register_sidebar( array (       'name' => 'Secondary Widget Area',       'id' => 'secondary_widget_area',        'before_widget' => '
',       'after_widget' => "
",         'before_title' => '
',         'after_title' => '
',       ) );              // Footer       register_sidebar( array (       'name' => 'Footer',       'id' => 'footer_widget_area',        'before_widget' => '
',       'after_widget' => "
",         'before_title' => '
',         'after_title' => '
',       ) );     } // end theme_widgets_init          add_action( 'init', 'theme_widgets_init' );      **Update:** It's not just the new widget area I can't add widgets to, it's all of them.


Date archive permalinks for custom taxonomy

Is it possible to have date based permalinks for a custom taxonomy? ie http://www.blah.com/taxonomy/taxonomy-term/2011/08/08 TIA! d.


add post meta front end edit

I'm trying to allow users to add meta values in my posts but it doesn't seem to be adding it in my front end post edit
     <form id="edit_post" name="edit_post" method="post" action="">

Description
     <textarea id="description" name="description" ><?php echo $post_to_edit->post_content; ?></textarea>
          <fieldset class="data">               data               <input type="text" value="" id="data" size="60" tabindex="20" name="data"></textarea>     </fieldset>
<input type="submit" value="Edit" tabindex="6" id="submit" name="submit" />
     <input type="hidden" name="action" value="edit_post" />     <input type="hidden" name="pid" value="<?php echo $post_to_edit->ID; ?>" />     <?php wp_nonce_field( 'edit-post' ); ?>     </form>
     <?php          if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) &&  $_POST['action'] == "edit_post" && isset($_POST['pid'])) {     $the_post = get_post($_POST['pid']);                $the_post = array();      $the_post['post_content'] = $_POST['description'];     $the_post['data'] = array($_POST['data']);          add_post_meta($pid, 'rating', $the_post['data'], true);            $pid = wp_update_post($the_post);                  $link = get_permalink( $pid );       wp_redirect($link);     }     ?>      but I can't seem to get it to work for the front end editing I'm pretty sure I'm doing it wrong help...


Specific Days, Specific image on Front Page

Is there a plugin that will allow me to do the above? Basically I have a webcomic that updates twice a week with two different stories. http://www.lunarblade.com What I would like to be able to do is have it somehow automatically use image A for Tuesdays that'll tell people there's a new page of story A, and image B on Thursdays to show there's a new page of story B. So if anyone knows a solution, via plugin or scripts (I'm a novice scripter of CSS), I would be very appreciative. I would love to find something that sets a specific image for a specific day. Thank you for your time reading this! Anat.


How to Display Wordpress Plugins in Normal Website (Without Wordpress)?

Probably it can by reverse engineering, but is there any easier way of doing this?


Jquery in IE, fully messed up

I am using the nivo slider in one of my website, the slider looks perfect in Firefox, but in IE 7, 8 its height is increased upto 1006px, the slider works, but the height has increased a lot, I have deactivated all the plugins, still its viewing the same, but in my localhost it works in IE also, but I cant differentiate the actual problem in it, here is the site http://www.marqueehireauckland.net.nz/ Can anyone help me in this? My nivo slider code is this

                             <img src="<?php bloginfo('template_directory'); ?>/images/header.jpg" alt="" width="1002"/>                             <img src="<?php bloginfo('template_directory'); ?>/images/header1.jpg" alt="" width="1002" />                             <img src="<?php bloginfo('template_directory'); ?>/images/header2.jpg" alt="" width="1002"/>                             <img src="<?php bloginfo('template_directory'); ?>/images/header4.jpg" alt="" width="1002"/>                             <img src="<?php bloginfo('template_directory'); ?>/images/header5.jpg" alt="" width="1002"/>

      EDIT: I have fixed this. Thank you


How to change a meta value (of a published post) after X days.?

I have a custom field. I would like to change the text of that custom field after x days. I want something like this:               if ( published post is more than 90 days old ) {         echo "your post is more than 90 days old";      }     else {         echo "your post is less than 90 days old";     }      Can anyone help me to achieve this? Thanks.


Syncing content in Multisite. Possible?

I'm looking to setup Multisite and use the second site to show the same exact pages, accessing the same posts, and excluding those pages with a custom field that reads something like "Parent site only". Any idea on how to go about this?


is_active-sidebar loop

So I have 4 widgets which is in large-3 columns, when they're not active I place a placeholder as user guide so the user would know where to put what. I did manage to work out the is_active but it turns out to be a long code, I was wondering if there is a way to shorten it. Widgets from available-course-list-1 to -4               <?php if ( is_active_sidebar( 'available-course-list-1' ) ) : ?>

            <?php dynamic_sidebar( 'available-course-list-1' ); ?>

     <?php else: ?>

Available Course List #2

To add lists courses in this widget, please use the Available Course List widget panel.

     <?php endif; ?>      I tried something like this:               <?php if ( is_active_sidebar( 'available-course-list-1', 'available-course-list-2' ) ) : ?>

                <?php dynamic_sidebar( 'available-course-list-1', 'available-course-list-2' ); ?>
      but that didn't work.


Custom Field sort not working (WP 3.8.1)

I am trying to sort a custom wp_query using the date format YYYYMMDD (php: date('Ymd') ). This will not be regarded as date field, but rather as a numeric one stored in custom field. My WP-QUERY code is the following:               $today = date("Ymd", strtotime(current_time('mysql')));          $args = array(      "post_type" => "post",      "post_status" => "publish",      "posts_per_page" => -1,      "cat" => 13,      "meta_query" => array(       array(        "key" => "event-date",        'type' => 'NUMERIC',        'value' => $today,        "compare" => ">="       )      ),      'orderby' => 'meta_value_num',                                  'order' => 'ASC'      );      $eventsbody = new WP_Query($args);        var_dump($eventsbody->request);      upon the dump it produces the following code:               "SELECT wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) LEFT JOIN wp_icl_translations t ON wp_posts.ID = t.element_id AND t.element_type LIKE 'post\_%' LEFT JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (13) ) AND wp_posts.post_type IN ('post', 'page', 'attachment') AND (wp_posts.post_status = 'publish') AND ( (wp_postmeta.meta_key = 'event-date' AND CAST(wp_postmeta.meta_value AS DATE) >= '20140326') ) AND (t.language_code='el' OR t.language_code IS NULL ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date ASC "       The problem is, that it disregards the meta_value_num ordering and does the order by wp_posts.post_date. Is it a wp3.8.1 problem?


Where do I find "log in" and "register" link which are located on the top right corner?

My site has "log in" and "register" links on the top right corner of homepage and every page. Where do I find these in the source code?


How to hook in after user's registration email has been sent?

I want to redirect to a page **after the user's registration email has been sent**. What is the correct hook? `user_register` is too early, that is the user is entered into the database but the email isn't send. Thank you!


Change the default Category selection from a checkbox to an optionbox

Is there any way to transform the default "Category" taxonomy menu in the admin panel (once in a post) from a checkbox multi-option to a checkbox single option, or an option box. My aim is to prevent a user to add a content in more than one category. Thanks


Put an extra check box on "Page Attributes" widget

that will add `lang="ur"` attribute in page's main `<body>` tag. How I can do that? I try different plugin including polylang, but look not working. Please suggest plugin if you know or do some simple coding.


how can I query all wordpress users of a blog

How can I loop through all Wordpress users in a blog, and sort them in ascending order by their usernames?


WP Super Cache versus W3 Total Cache

I recently moved to a dedicated server and I've been having some problems with W3 Total Cache, server crashing, eating up a lot of RAM, back end interface becoming slow.. Everything appeared to work fine in shared hosting.. I am keen to try WP Super Cache. I am using a lot of plugins and I hope the combination of WP Super Cache and WP Minify would do the job better than W3 Total Cache. Any advice would be much appreciated as I have already spent a lot of research hours on the topic of caching but it seems that there is no clear answer as to the advantages and disadvantages of each option. I am now on a 12GB RAM server and have to serve about 500 visitors per day..


Efficiently loop over huge number of posts

I want to loop all posts to do some processing, but one of my concern is there are many posts and it might used up my memory, so I want to loop posts with `offset`, something like `paging`. e.g.               $posts = get_posts(array('post_status' => 'publish', 'posts_per_page' => -1));          foreach ($posts as $post) {       // Huge memory requirement as $posts might be huge     }      Any recommended way to do it?


How do I change the image from the default mysteryman in the WP Profile page

I work for a company that has recently added a plugin for WordPress. We have a company profile page, as the plugin owner, and we want to change the image from the the default mysteryman to a logo. I realize this is a small detail to most of you, but I am a tech. writer not a developer and am in need of some help. Thank you in advance. Yaacovg


Problems w/ ups shipping plugin

I am trying to get my site up and running but am having problems with my ups plugin. I can not get it to calculate shipping rates. im getting this error: [UPS] No rate returned for service code 03, Invalid Access License number (UPS code: 250003). I have checked the license # and it is correct. All products have shipping info.


Add a user to a specific blog when they register?

I've setup a WP MU site and I need to know how to sign up a user to a specific blog when they register. As it is now, if a visitor is visiting a specific site and they click the register button they are taken to the main network site and then they are given the option to register as a user or create their own blog. I can create my own registration page but I'm not sure how to add that user to a specific site. This is what I have so far:               $meta = apply_filters( 'add_signup_meta', array() );     $emailSent = wpmu_signup_user( $user_name, $user_email, $meta );


How can I hide tags on a child-category page, if that tag has not been used?

I have a section of my site where I'm using child-categories and tags to sort content. I'm have a tertiary navigation for the tags (templates/nav-tags.php):
             <?php               $tags = get_tags(                      array(                          'hide_empty' => true                         )                      );                 if ($tags) {                     foreach ($tags as $tag) {                         echo '
slug                              .'" href="" title="'                              . sprintf( __( "filter post by %s" ), $tag->name )                              . '" '                              . '>'                              . $tag->name                             .'
 ';                     }                 }             ?>
           The problem is, this lists ALL of the tags, even if `child-category-b` doesn't have any posts tagged in `tag-a`, it will list `tag-a` when on the `child- category-b` page. I need a way to hide tags/only show tags if they have been used in that child- category. Here is a screenshot of what I'm working with:   ![enter image description here](http://i.stack.imgur.com/ovNPDm.png)   _click to enlarge ⤴_ The `posts` template (templates/posts-easy-steps.php):
              <?php             $category = get_the_category();                              $args = array(                    'post_type' => 'easy_steps',                    'posts_per_page' => 4,                    'category__in' => ($cat),                 );                        $second_query = new WP_Query( $args );             if ( $second_query->have_posts() ):                while( $second_query->have_posts() ) : $second_query->the_post();                     $titlechars = 45; // Character Limit                $posttitle = get_the_title();                $modtitle = substr($posttitle, 0, $titlechars);                     $contentchars = 120; // Character Limit                $postcontent = get_the_excerpt();                $modcontent = substr($postcontent, 0, $contentchars);                  echo '
';         ?>              <?php                  if( get_field('image') ):                      $attachment_id = get_field('image');                 $size = 'customfeatins'; // (thumbnail, medium, large, full or custom size)                 $image = wp_get_attachment_image_src( $attachment_id, $size );                  echo '';         ?>              <?php else : ?>                  <?php echo '' ?>              <?php endif; ?>              <?php             echo '
' . $modtitle .'

' . get_the_date() .'

' . $modcontent . '… More ›

';         ?>              <?php                                           endwhile;             endif;             //wp_reset_postdata(); // to reset the loop         ?>
      And the `parent-category` and `child-category` template (category- easysteps.php):   _I'm using a function to force`child-categories` to use the `parent-category` template_
          <?php get_template_part('templates/masthead'); ?>     <?php get_template_part('templates/header-top-navbar'); ?>

Easy Steps                  <?php                 if ( is_category() ) {                     $category = get_category( $cat );                     echo ' -  '.$category->cat_name.' ';                     } else {                 } ?>
                      <?php edit_post_link('edit this entry', '
', '
'); ?>
                 <?php get_template_part('templates/easy-cats'); ?>
                 <?php get_template_part('templates/nav', 'tags'); ?>                  <?php get_template_part('templates/posts-easy-steps'); ?>
                      <?php if (hchw_sidebar()) : ?>                     <?php get_template_part('templates/sidebar', 'right'); ?>                 <?php endif; ?>

       I've been searching for a solution but I'm at a loss...


How to hook a function only when I need to delete permanently a post?

I need to hook a function only when I delete permanently a post from the database, I've tried the 'before_delete_post' hook, however, it's called both when it's trashed and permanently deleted. The wp_delete_post() function calls wp_trash_post() and should stop processing, but it looks like the wp_delete_post() is called again after the post is trashed. I've seen this question: Wordpress Delete hook with wp_delete_post function?. My need is exactly the oposite of it.


Frontend editing, Frontend user dashboard

I am creating a website so that users can submit their articles from the front end. I have quite a few things set up:   * The ability to submit custom post types from the front end   * Blocked from the back-end. I'd like to create a page (for logged in users) labeled "my posts" or my "submissions" that will show logged in users their own custom post post types and their status so that they know what's been published, what will be published in the future, pending, drafts (so they can go back and edit), and pending (so that I as Editor, know when an article is ready for my review). I'm guess I'm looking for a frontend user dashboard. I've tried WP User Frontend, but it clashes with s2member and won't show posts from s2member registered users. I just need something simple that will allow users easy access from the front end to manage their posts. I've been trying plugin after plugin and adding things to my short code creator but nothing works the way I need it to. It doesn't have to be pretty, just a simple code that a non coder (like me) update per by custom post types. To explain further, i'd like to have one code on a page shows the users all the deals they've submitted (and their status), and another code to show users all the articles they've submitted (and their status), etc. Any help would be very useful Thanks in advance!


How to change settings so I can upload images in Wordpress posts?

When I try to upload an image in a post on this WordPress site: http://richardclunan.com/ ...I get the message "Unable to create directory **__**. Is its parent directory writable by the server?" How do I change settings so I can upload images?


Problem Implementing parallax in header of bp-default theme

I'm trying to implement parallax in bp-default theme's header, but facing problem ....   1. The page getting glitches, the adminbar is centre aligned but the rest of the content of the page is getting left aligned , the below image show the example .... http://img822.imageshack.us/img822/1476/bpdparallax.jpg   2. Cannot change the default header from the **default.css** file , though I change the background image url under **#header** to a different file in different location , the page shows the **default_header.jpg** in every circumstances, even though I _hard-refresh_ the browser .... the codes I'm using are as follows : header.php within the `<head></head>` tag between the wp_head() and the end of the head tag I place ...                                          <link rel="stylesheet" type="text/css" href="http://localhost/swabandhab/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/parallax/reset-min.css">      and in the beginning of the `<body>` tag just after the `<div id="header">` I place

      and I use               #parallax {      width: 960px;      height: 200px;      position: relative;      overflow: hidden;      margin: 0 auto;     }      this css in default.css file inspite of these problems the parallax animation is working just fine ! What am I doing wrong ?


How to use stack flair on my site?

I want to add stack flair on my WordPress site. How can I use that? I want to put it in the right hand side column. Can anyone help me with this?


Force use of RSS 0.92 feed

Just wondering if there was an elegant way to force WordPress to use the RSS 0.92 feed at all? The reason I ask is that we have added some custom XML tags to a site's feed so that an accompanying iOS app can pull certain data from the feed - WordPress has recently deprecated RSS 0.92 in favour of RSS 2.0 and this is breaking the app, so reverting to RSS 0.92 as a short term fix would be ideal. I will very much look forward to any thoughts you might have! Alex


Uknown meta entries in wp_postmeta

I'm working on a site that has been running for few years and had different maintainers so it's kind of a mess. What I found weird is a lot of entries in `wp_postmeta` where all the keys are numeric and contain a string like this:               wpAjaxe17fbeda4c811052694cd66e93bf1868f720040882f22c2bba8432e030f010c8069596982baf4cc001345db989c7f98c      where `wpAjax` is the fixed part and the rest is a sequence of hexadecimal values (or so they seem). These entries are 1170 and the `meta_key` ranges from 45511 to 46788 and the last post (as in the one with the greatest ID) referred to one of these meta keys is dated almost three years ago, so I think they might have been created by some plugin which has been long forgotten now. Is there any way to find out if any plugin uses those kind of meta values? I did a search but found nothing. I'd like to know if they're safe to delete because they seem useless and also mess up the post creation page as they fill the custom field dropdown select (I had to modify the code to exclude numeric meta keys).


Multiple featured sizes / images / excerpts

Usually I google but I couldn't find an answer for my problem. Most entrys I found were dealing with adding extra featured image sizes, but not when it comes to having different featured image sizes displayed on the index site embeddeed within a custom div with an option to choose from. What I try to do is working with columns and give them different options when it comes to their featured image size and options for the excerpt. Because it is a bit difficult to explain what I try to achieve I added an image to illustrate what I try to do. Not with jmasonry though and not with plugins. I don't expect a solution for this here.. def not since it seems complex what I try to do. But if anybody has an suggestion what to look for or with what approach I could start and look at to solve this. I would def. be very thankful. To describe it a bit better lets say post box 1 is in
content
      ( which, lets say has a width of 600 px and height of 400px ) and post box 2 looks like this
content
      ( which has a width of 200 px and height of 400 px ) ![The image](http://www7.pic-upload.de/25.10.12/nqmxj6ot694l.png)


Leveraging browser caching issue

I am triying to obtain a good calification on Page Speed test, now I've obtained 85 points but I am still on the problem of "Leverage browser caching". This is the Page Speed test message about this problem:               Leverage browser caching     Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.     Leverage browser caching for the following cacheable resources:     https://cdn.syndication.twimg.com/…ollowing&lang=es&screen_names=lomasguapa (10 minutes)     http://platform.twitter.com/widgets.js (30 minutes)     https://apis.google.com/js/api.js (30 minutes)     https://apis.google.com/js/platform.js (30 minutes)     http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60 minutes)     http://pagead2.googlesyndication.com/pagead/osd.js (60 minutes)     https://oauth.googleusercontent.com/…e:rpc:shindig.random:shindig.sha1.js?c=2 (60 minutes)     http://stats.g.doubleclick.net/dc.js (2 hours)     http://www.google-analytics.com/ga.js (2 hours)      However I have seen in many source on Internet that this solution works for this case, the solution is a modification of .htaccess file. There is the first block.               ## EXPIRES CACHING ##     **<IfModule mod_expires.c>     ExpiresActive On     ExpiresByType image/jpg "access 1 year"     ExpiresByType image/jpeg "access 1 year"     ExpiresByType image/gif "access 1 year"     ExpiresByType image/png "access 1 year"     ExpiresByType text/css "access 1 month"     ExpiresByType text/html "access 1 month"     ExpiresByType application/pdf "access 1 month"     ExpiresByType text/x-javascript "access 1 month"     ExpiresByType application/x-shockwave-flash "access 1 month"     ExpiresByType image/x-icon "access 1 year"     ExpiresDefault "access 1 month"     </IfModule>**     ## EXPIRES CACHING ##          # REST OF MY .HTACCESS     # BEGIN Better WP Security     Options -Indexes          Order Allow,Deny     Deny from env=DenyAccess     Allow from all     SetEnvIF REMOTE_ADDR "^1\.234\.83\.77$" DenyAccess     SetEnvIF X-FORWARDED-FOR "^1\.234\.83\.77$" DenyAccess     SetEnvIF X-CLUSTER-CLIENT-IP "^1\.234\.83\.77$" DenyAccess     SetEnvIF REMOTE_ADDR "^211\.110\.140\.70$" DenyAccess     SetEnvIF X-FORWARDED-FOR "^211\.110\.140\.70$" DenyAccess     SetEnvIF X-CLUSTER-CLIENT-IP "^211\.110\.140\.70$" DenyAccess     SetEnvIF REMOTE_ADDR "^91\.200\.13\.45$" DenyAccess     SetEnvIF X-FORWARDED-FOR "^91\.200\.13\.45$" DenyAccess     SetEnvIF X-CLUSTER-CLIENT-IP "^91\.200\.13\.45$" DenyAccess     SetEnvIF REMOTE_ADDR "^200\.27\.231\.114$" DenyAccess     SetEnvIF X-FORWARDED-FOR "^200\.27\.231\.114$" DenyAccess     SetEnvIF X-CLUSTER-CLIENT-IP "^200\.27\.231\.114$" DenyAccess     # END Better WP Security          # 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          <IfModule mod_deflate.c>         # compress text, HTML, JavaScript, CSS, and XML (for more page speed)         AddOutputFilterByType DEFLATE text/plain         AddOutputFilterByType DEFLATE text/html         AddOutputFilterByType DEFLATE text/xml         AddOutputFilterByType DEFLATE text/css         AddOutputFilterByType DEFLATE application/xml         AddOutputFilterByType DEFLATE application/xhtml+xml         AddOutputFilterByType DEFLATE application/rss+xml         AddOutputFilterByType DEFLATE application/javascript         AddOutputFilterByType DEFLATE application/x-javascript     </IfModule>          # remove browser bugs (for more page speed)     BrowserMatch ^Mozilla/4 gzip-only-text/html     BrowserMatch ^Mozilla/4\.0[678] no-gzip     BrowserMatch \bMSIE !no-gzip !gzip-only-text/html     Header append Vary User-Agent     # END       The case is that solution does not work and the page speed is showing again the caching problem. I put all the .htaccess in order to give more information, may be some lines cause any king of problem.


Simple loop with shortcode rendering problem

The following loop is in a `single.php` template file. It works ok, but the shortcodes aren't rendered.   **the loop:**
           <?php if(have_posts()): while(have_posts()): the_post(); ?>
<?php the_title(); ?>
           <?php ik_mostra(the_content()); ?>                     <?php endwhile; endif; ?>
      **outputs:**   Some text I put **html works fine** , but `[shortcodes]` aren't rendering, any sugestions? edit: that `ik_mostra()` function is here:               function ik_mostra($secao) {         if ($secao != NULL) :         echo apply_filters('the_content', $secao);         endif;     }      A way I tried to render it.


get_the_title in edit post_link

Basically I would like to link to the edit post interface in Wordpress with the string to display being the post title. Cannot get it to work have tried any syntax that I could come up with, but I am also only 2 days into php. Here is what I came up with. It creates a link but does not display the post title.               <a href=<?php edit_post_link('<?php echo get_the_title($ID);?>'); ?> </a>      http://codex.wordpress.org/Function_Reference/edit_post_link http://codex.wordpress.org/Function_Reference/get_the_title


Style wordpress image captions in RSS

My WordPress site includes the full article in its RSS feed. This includes the text of the post and basic formatting. It also includes post images and their captions. The problem is that my captions are not formatted. They appear below my images, but they look like plain text. This makes it hard for a reader to see that they are associated with the preceding image. How can I change the formatting of the image captions in an RSS feed reader? I'd like to make the captions italic or to use a gray color to distinguish it from the other text.


Add filter function in media modal box

I'm trying to extend the media modal, but I cant' find any documentation / tutorials about it. I'm not a master of backbone too ;-) I want to add a select box for each taxonomy that is attached to the attachment post type. At the moment only one select box is shown. So this is what I came up with. It works great except that it replaces the default toolbar. * * * ## Code               /**      * Extended Filters dropdown with taxonomy term selection values      */     jQuery.each(mediaTaxonomies,function(key,label){              media.view.AttachmentFilters[key] = media.view.AttachmentFilters.extend({             className: key,                  createFilters: function() {                 var filters = {};                      _.each( mediaTerms[key] || {}, function( term ) {                          var query = {};                          query[key] = {                         taxonomy: key,                         term_id: parseInt( term.id, 10 ),                         term_slug: term.slug                     };                          filters[ term.slug ] = {                         text: term.label,                         props: query                     };                 });                      this.filters = filters;             }              });              /**          * Replace the media-toolbar with our own          */         media.view.AttachmentsBrowser = media.view.AttachmentsBrowser.extend({             createToolbar: function() {                      media.model.Query.defaultArgs.filterSource = 'filter-media-taxonomies';                      this.toolbar = new media.view.Toolbar({                     controller: this.controller                 });                      this.views.add( this.toolbar );                      this.toolbar.set( 'terms', new media.view.AttachmentFilters[key]({                     controller: this.controller,                     model:      this.collection.props,                     priority:   -80                 }).render() );             }         });          });      * * * ## Original ![enter image description here](http://i.stack.imgur.com/htUKB.png) * * * ## My result ![enter image description here](http://i.stack.imgur.com/zSQuZ.png) * * * ## What I want ![enter image description here](http://i.stack.imgur.com/mlA7Y.jpg) * * * ## Full code https://github.com/Horttcore/Media-Taxonomies


Multiple recent Custom Post Type (CPT) on homepage issue

I have created a homepage template which shows multiple `CPT's` on homepage and its working fine. I have limited these `CPT's` to show only 1 recent post on home page using this function.               function hwl_home_pagesize( $query ) {         if ( is_home() || is_post_type_archive( 'Books' ) || is_post_type_archive( 'gear' ) || is_post_type_archive( 'movies' )) {             $query->set( 'posts_per_page', 1 );             return;         }     }     add_action( 'pre_get_posts', 'hwl_home_pagesize', 1 );      Now the issue is that the regular `Post` also getting limited to 1 recent posts, while i want to show 5 recent posts from `Post`. Please guide me on this issue. Thanks in advance.


So here is the scenario. I have to build my client side and he want to grab some categories to display on his homepage with its thumb. So my route is, just find the first post of that categories and get its thumbnail, but I don't know how to do this. I have follow this code http://stackoverflow.com/questions/15607840/display-first-last-post-from-each- categories-in-wordpress, but it will show all categories andd I don't know how to pull just certain (chosen) categories. So The questions are:   1. Is my route correct or you can suggest me another route or method.   2. How to Grab first Image from some Chosen Categories Here is the code I use to pull some chosen category.               $categories = get_categories('hide_empty=0&orderby=id');     $include="";          foreach($categories as $category):         $cat_field = 'rockable_cat_' . $category->cat_ID;         if( //some argument return true )            $include .= '
term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'
';     endforeach;          if($include)     $include = substr($include, 0, -1); //Remove the last comma     return $include;      Solved..!! here is my full code   1. grab the category name from category chosen               function rockable_build_cat_exclude(){              $categories = get_categories('hide_empty=0&orderby=id');         $exclude="";              foreach($categories as $cat):         $cat_field = 'rockable_cat_' . $cat->cat_ID;         if( get_option($cat_field) and get_option($cat_field)=='false')             $exclude .= "" . $cat->cat_name . ",";               endforeach;                   if($exclude)         $exclude = substr($exclude, 0, -1); //Remove the last comma                   return $exclude;     }        2. Code to pull it in the front (index.php)              <?php     $exclude = rockable_build_cat_exclude();     $exclude_array = explode(",",$exclude);          foreach ($exclude_array as $value){         $cat_query = new WP_Query(array('category_name'=>$value,'showposts'=>1));         if ($cat_query->have_posts()):while($cat_query->have_posts()):$cat_query->the_post();              $category_id = get_cat_ID( $value );?>
             <?php the_post_thumbnail('home-thumb');?>             <a href="<?php get_category_link( $category_id );?>" title="<?php echo esc_attr( sprintf( __( "View all posts in %s" ), $value ) ) ;?>"><?php echo $value;?>
              <?php endwhile;         endif;     }          ?>      Please share your thought if you have some suggestion or have some better solution.


Permalinks not working with Vagrant

I am using Vagrant to build up a little Wordpress development VM. When I select permalinks (postname) then the page from an article doesn't load. However, when I select the standard link (i.e page id) all is working good. I've used the service PuPHPet to build the VM. My settings can be found here I am using Wordpress 3.9.1 and Apache2 I've enabled mod_rewrite be executing:               a2enmod rewrite      And my .htaccess file from Wordpress is as follows:               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /svisa/     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /svisa/index.php [L]     </IfModule>          # END WordPress      it has the following permissions and ownership:               -rw-rw-rw- 1 vagrant www-data   248 May 30 14:52 .htaccess      My virtualhost file for the site (`/var/www/svisa/`) can be found here. from my host computer, I browse to the site via adress: `http://wpdev- vm/svisa/` where `wpdev-vm` is the name of the vm. Does anybody know what I am missing to make the permalinks work?


Wp-Admin extremely slow!

I noticed my wp-admin became extremely slow so I installed a plugin called debug bar extender to get some more info and found this: ![http://glui.me/?i=mquiiute9joj3vp/2014-05-30_at_3.00_PM.png/](http://i.stack.imgur.com/r9wb3.png) Any idea what on earth could be causing such a slow down? This was taken loading `options-general.php` in wp-admin


Is there a way to publish links as we do on Facebook?

Posting links to Facebook is very convenient. Facebook automatically fetch an extract of the website you want to share and download a thumbnail. Do you know any way to get this behaviour for Worpdress ? I would like to post links on my wordpress in the way it's done on facebook. Thanks a lot !


Bulk img-rename images in gallery

I'm trying to add the content of some text-fields to the selected images of a gallery. I found out, how to create the input-fields. My problem is to get the content of the text-fields and write it to the selected images. http://i.imgur.com/80MLEvk.png To create the text fields I use add_filter( 'attachment_fields_to_edit' ...). Help appreciated.


update permalinks, sign out, sign in NIGHTMARE

Is there a secret workflow I don't know for developing Wordpress sites? I am constantly finding I have to either update permalinks or sign out and sign back in to see changes. Sometimes I have to do both. I am using MAMP and Coda 2 as my IDE. I'd love a list of tricks to make life better while developing for Wordpress.


get_term_children returns WP_Error for custom taxonomy

What I'm working on is a ajax based dropdown option form which returns child terms based on the option selected. When the option is selected, a function is fired using onchange, where the script grabs the term_id and taxonomy of the selected option, and sends both of those to the server. The server side script I created accepts `$_POST`, I have verified that the variables are properly assigned by echoing them back to the client and checking the console logs.               <?php     //Include wordpress     require_once( 'wp-config.php' );     require_once( 'wp-includes/wp-db.php' );     $wpdb = new wpdb( DB_USER , DB_PASSWORD , DB_NAME , DB_HOST );          if (isset($_POST)){         $taxID = $_POST[id];         $taxType = $_POST[tx];     }     else {         echo "Error: invalid data recieved. Please contact the site administrator.";         die();     }          $termchildren = get_term_children( $taxID, $taxType );          echo '
';     foreach ( $termchildren as $child ) {         $term = get_term_by( 'id', $child, $taxType );         echo '
name, $taxType ) . '">' . $term->name . '
';     }     echo '
';     die();     ?>      The goal of this script is to return some html that I can insert into another element.   \- The ID of the element causing issues is `4`, which contains a child with ID of `15`   \- The taxonomy of the element is `classifieds_categories`   \- Passing these values manually does not work either.   \- When I echo the `li` `a href` I get this error:   `Catchable fatal error: Object of class WP_Error could not be converted to string in ...` Does anyone have any suggestions? Because quite frankly I'm about to throw my laptop towards the nearest window at this point.


Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. `               jQuery(document).ready(function(){                jQuery("a.like:not('.voted')").live("click",function(){         heart=jQuery(this);         post_id=heart.data("post_id");     jQuery.ajax({     type:"post",     url:ajax_var.url, //--> "http://.../wp-admin/admin-ajax.php"     data:"action=post-like&nonce="+ajax_var.nonce+"&post_like=&post_id="+post_id,     success:function(a){           if(a!="already"){           heart.addClass("voted");           heart.parent().addClass("voted");           heart.parent().find(".vote-count").text(a);           heart.attr("data-original-title",a+" likes");           heart.find("i").removeClass("icon-heart-empty").addClass("icon-heart")         }         }        });         return false})});      ` and post-like.php                  function post_like()     {         // Check for nonce security         $nonce = $_POST['nonce'];              if ( ! wp_verify_nonce( $nonce, 'ajax-nonce' ) )             die ( 'Busted!');              if(isset($_POST['post_like']))         {             // Retrieve user IP address             $ip = $_SERVER['REMOTE_ADDR'];             $post_id = $_POST['post_id'];                  // Get voters'IPs for the current post             $meta_IP = get_post_meta($post_id, "voted_IP");             $voted_IP = $meta_IP[0];                  if(!is_array($voted_IP))                 $voted_IP = array();                  // Get votes count for the current post             $meta_count = get_post_meta($post_id, "votes_count", true);                  // Use has already voted ?             if(!hasAlreadyVoted($post_id))             {                 $voted_IP[$ip] = time();                      // Save IP and increase votes count                 update_post_meta($post_id, "voted_IP", $voted_IP);                 update_post_meta($post_id, "votes_count", ++$meta_count);                      // Display count (ie jQuery return value)                 echo $meta_count;             }             else                 echo "already";         }         exit;     }      My issue here is to understand how this post into post_like since the url is define to admin-ajax.php. Should i need to add an actin on admin-ajax.php. The problem is that my "a" variable on my jquery function is define with a entire html file which is not suppose to do that it is supposed to retry this $meta_count value. Can you help me with this? Thanks in advance.


Plugin's custom page

I'm making a plug-in changing default login page to custom login page. Assume that such page is laid to file `custom-login.php` in folder of plug-in. And two problems appear now: \- how to access WordPress functions? should I include some file? \- how to replace url of the page so that address does not show a plug-in directory? instead somewhat `page-based-on-wp.com/login- man.php`?


WP_Query and is_page_template() conditional

I have a custom query that goes looks like this:                       $temp = $wp_query;             $wp_query = null;             $args = array('posts_per_page' => 5, 'post_type' => 'gallery', 'post_status' => 'published', 'paged' => $paged);             $wp_query = new WP_Query($args);             if($wp_query->have_posts()):                 while($wp_query->have_posts()) : $wp_query->the_post();                     if(get_post_format()) {                         $post_format = get_post_format();                     } else {                         $post_format = 'standard';                     }                     get_template_part('/templates/parts/format', $post_format);                 endwhile;             endif; ?>      Inside post format that I call with `get_template_part('/templates/parts/format', $post_format);` I have conditional `is_page_template()`. This conditional isn't working. But when I use regular `WP_Query` without resetting the default one it does work. What can i do to make this work?


Template for Custom Post Type and its Category

I have created a custom post-type ( Testimonials ) and i have custom taxonomies for this post-type to separate the testimonials. Custom Testimonial Taxonomies are 1) Commercial 2) Residential Now, i am having issue when displaying them.. 1 ) When the user clicks the parent link testimonials ( we will show testimonials from all category) 2 ) When the user clicks Commercial or Residential ( we want to show testimonials from that specific custom taxonomy ) How to create template for the above scenario?


Remove query string except from google map api

I have an issue similar to many others in the web, but still with no solution so far. To remove query strings i've used the following code:               function _remove_script_version( $src ){         $parts = explode( '?', $src );         return $parts[0];     }     add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );     add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );      What i'ld like, is to know if someone believe to know how to set up a code to exclude googple map api query string from being removed. To fix the error below: > “The Google Maps API server rejected your request. The “sensor” parameter > specified in the request must be set to either “true” or “false”. Does anyone beleive to know how to fix this?


What are the advantages of using a custom post type archive?

I'm currently working on a theme that makes heavy use of custom post types to structure the content. To display a lot of the content I am using the respective `archive-$posttype.php` but this seems in many ways more cumbersome than using a page template. When using a page template to display the archive I can easily set or modify:   * a descriptive title   * a description   * the slug   * a header image for the page   * meta boxes for whatever added piece of information I might need   * the page can be easily integrated into the menu Unless I'm mistaken none of this can be done for the archive without modifying the template files. Theme settings might help with some of that but I haven't dealt with them yet and it's certainly more difficult than simply using a page template. The only advantage I'm seeing is less clutter when selecting a page template and maybe less hassle with the link structure when display single custom posts. There is probably a performance impact but I have no clue how large. Considering all that why should I use the custom post archive?


Multiple install for multilanguage. How to?

I (will) have a multilingual (3 lang actually) site. I used WMPL some time, but this plugine made me sad... Finally, I decided to install each language a part. How should it be done? I have my `/` So, should I install   `/en` `/fr` `/it` or   `/` \+ `/fr` `/it` is there some plugin that will help me to synchronize content?


How can I password protect a WordPress site without requiring users to log in?

I don't want people to have to log in, I just want to prompt them with a question and if they can answer it, they can access the site. All the solutions and plugins that I've found seem to be overkill for my needs. Does this kind of thing exist?


How to remove links generated by SEO-smart-links?

I tried seo-smart-links plugin and it linked all my posts to tags/categories and other posts. This looks stuffing and spamming to me so I uninstalled this plugin. Now the links are still there but the plugin author said links are created on the fly so they will be removed after uninstallation but it didn't. Kindly let me know how can I revert it and remove those links created by this plugin. You can have a look at technostall.com to see the situation.


Adding Plugin-specific Fields with wp_insert_post()?

_( **Moderator's note:** The original title was "wp_insert_post() and plugins")_ I use `wp_insert_post()` like this:                $my_post = array(      'post_title' => 'title',      'post_content' => $post,      'post_status' => 'publish',      'post_author' => 1,      'post_date' => date('Y-m-d H:i:s', $oldtime),      'post_category' => array(3,4)           );           wp_insert_post( $my_post );      Everything works fine, but I want to use plugins like _"All in One SEO Pack"_ I can't figure out how to save their custom fields. I tried this but it did not work:                $my_post = array(      'post_title' => 'title',      'post_content' => $post,      'post_status' => 'publish',      'post_author' => 1,      'post_date' => date('Y-m-d H:i:s', $oldtime),      'post_category' => array(3,4)      'aiosp_description' => 'description',      'aiosp_keywords' => 'keywords' // these (aiosp_) is from post edit page in WP (<input type="text" size="62" name="aiosp_keywords" value="keywords">)           );           wp_insert_post( $my_post );      How can I save these fields? Thanks for any help!!!


FeedWordPress duplicated posts problem

FeedWordPress is pulling in two, three, four, and as many as 15 copies of the same post when it updates (via manual cron triggers or via auto updates). It doesn't happen all the time, and it doesn't happen with every post. I also noticed that it occasionally says that a FWP post was "created locally on this site", even though it wasn't. Copies of that same post will sometimes say "local", and sometimes "syndicated". And one more strange behavior, it's actually posting stuff from one domain into another completely different domain, but it only seems to pull the post_title across, no content or categories. I'm on a WP Multi-site 3.0.1 install with FWP v2010.0905. I'm also using WP Super Cache if that might make a difference. Has anyone experienced any of this before? Does the duplicated posts FWP filter work properly? Thanks for your help, Dave Morris


How to enable category hierarchy for links?

It looks that by default WordPress had hierarchy only for page/post categories and not for links categories. How can I enable that?


RSVP form for Facebook events from a Wordpress post?

Is there a way to add a RSVP form to a Facebook event in a Wordpress post? (let's assume I have a website linked to a Facebook application and I want to publish public events I have published on a Facebook page also on my website, letting people RSVP from Wordpress and only from my FB page) thanks


Get posts by meta data OR title

I have a _working_ query that calls all my posts that have a certain meta value for one of two meta keys:               $term = $_GET['term'];     $args = array(         'post_type' => 'some_cpt_name',         'meta_query' => array(             'relation'      => 'OR',             array(                 'key'     => 'foo',                 'value'   => $term,                 'compare' => 'LIKE',             ),             array(                 'key'     => 'bar',                 'value'   => $term,                 'compare' => 'LIKE',             ),         )      );     $query = get_posts( $args );      I need to query all posts that have the `$term` as meta key "foo" or "bar" or as post title. Problem is _how to_ add the post title as additional possible key? > **Q:** How can I _also_ check if the `$term` maybe is in the `post_title`?


Custom admin post.php page

I'm working on a CPT but I need to have more control over the layout of the post/edit page (post-new.php and post.php). I thought hacking through admin_init would be the best option, but I can't get the script to work at all. Help?               function init_shelf_page() {         if (!current_user_can('edit_shelves') && $_SERVER['PHP_SELF'] == '/wp-admin/post.php') {             if (isset($_GET['post'])) {                 $postID = intval($_GET['post']);                 $post = get_post($postID);                 if ($post->post_type == 'shelf') {                     $post_type_object = get_post_type_object($post->post_type);                     if (!current_user_can($post_type_object->cap->edit_posts)) {                         wp_die(__('Cheatin’ uh?'));                     }                     include(dirname(__FILE__) . '/shelf-page.php');                     die;                 }             }         }     }     add_action('admin_init', 'init_shelf_page');


How to add php stylesheet to admin section instead of admin_head hook

how can we do the below code using separate file let say admin-style.php               add_action('admin_head', 'custom_admin_style');     function custom_admin_style() {        $bg_color = get_option('custom_color');        echo '<style>';        echo 'body { background: #' . $bg_color . '}';        echo '</style>;     }


Using custom field as custom post title

I've setup a custom post type with a series of custom fields using the WPAlchemy class. I'm trying to take the value of one of the custom fields and use that as the post title. So far, though, I've had no success. I've been browsing around and I've tried the following two different blocks of code:               function custom_post_type_title ( $post_id ) {         global $wpdb;         if ( get_post_type( $post_id ) == 'listing' ) {             $title = get_post_meta($post_id, 'listing_name', true);             $where = array( 'ID' => $post_id );             $wpdb->update( $wpdb->posts, array( 'post_title' => $title ), $where );         }     }          add_action('init', 'listing_save_post');     function listing_save_post( $post_id ) {             if ( ! defined( 'DOING_AUTOSAVE' ) && ! DOING_AUTOSAVE ) return;             add_action('save_post', 'custom_post_type_title', 100);             add_action('publish_post', 'custom_post_type_title', 100);     }      And.. (temporarily commenting out the nonce fields until I figure out how they work)               add_filter('wp_insert_post_data', 'change_title', 99, 2);     function change_title($data, $postarr)     {             // If it is our form has not been submitted, so we dont want to do anything         if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;              // Verify this came from the our screen and with proper authorization because save_post can be triggered at other times        // if(!isset($_POST['my_nonce_field'])) return;              // If nonce is set, verify it        // if(isset($_POST['my_nonce_field']) && !wp_verify_nonce($_POST['my_nonce_field'], plugins_url(__FILE__))) return;                 // Combine address with term         $title = $_POST['listing_name'];         $data['post_title'] = $title;              return $data;     }      In both cases, the results are the same:   1. On saving the new post, it reloads the page, says it worked, and all of the custom fields are empty. (Without either code set running, the custom post works just fine and the fields are saved).    2. On viewing the custom post type index, the posts aren't there. Any ideas? **UPDATE** To clarify, I am using a custom post _without_ the title support. I am trying to populate the title field nonetheless, though, using the value in the custom field.


Line breaks not showing up properly

I'm trying to have spacing show up between a paragraph and heading in the following excerpt: In my article series on handling extracurriculars, I coined the term Sovereign Zen philosophies. It builds off of Cal Newport’s Zen Valedictorian philosophy. Before you criticize this article as being a copycat, there are some subtle differences between both philosophies, namely the self-protective critical thinking components, and their applicability beyond schooling career.      # Definition **Zen Valedictorian:** A way of living to become less overloaded and less stressed without becoming less impressive However, the line break between career and definition isn't showing up properly even with two `<br`>`<br`>. How would you suggest dealing with this?Blockquote


Custom Metabox with Ajax in Edit Post - Stuck

I'm trying to create a custom meta box with multiple text fields. The idea is that there is initially one text box, then you can click the button 'Add New' and a another text box is added (using Ajax; no need to publish or update the post for the text box to be created). I'm using the following code (below), but it just doesn't work. I'm completely stuck; really need some help. I'm even willing to donate some cash if anyone can help me figure this out. http://pastebin.com/usRhiJJ4


upload featured image from front end using wordpress add media button

I want to submit custom post from frontend. i have made form to make this happened. But i want to upload featured image form add media button of wordpress. Code is               <?php     /*     Template Name: post submition Template          Description: Use this page template to hide the sidebar. Alternatively     you can simply remove all widgets from your sidebar to hide it on     all pages.     */     ?>          <?php get_header(); ?>     <?php           // Check if the form was submitted     if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] )) {          // Do some minor form validation to make sure there is content     if (isset ($_POST['title'])) {          $title =  $_POST['title'];      } else {          echo 'Please enter a title';     }     if (isset ($_POST['description'])) {          $description = $_POST['description'];      } else {          echo 'Please enter the content';      }          // Add the content of the form to $post as an array     $post = array(         'post_title'    => $title,         'post_content'  => $description,         'post_category' => $_POST['cat'],  // Usable for custom taxonomies too         'post_status'   => 'draft',         // Choose: publish, preview, future, etc.         'post_type'     => 'contast'  // Use a custom post type if you want to     );     echo $pid = wp_insert_post($post);  // Pass  the value of $post to WordPress the insert function              if ($_FILES) {     array_reverse($_FILES);     $i = 0;//this will count the posts     foreach ($_FILES as $file => $array) {         if ($i == 0) $set_feature = 1; //if $i ==0 then we are dealing with the first post         else $set_feature = 0; //if $i!=0 we are not dealing with the first post         $newupload = insert_attachment($file,$pid, $set_feature);         echo $i++; //count posts         }         }                //attachment helper function                         // http://codex.wordpress.org/Function_Reference/wp_insert_post         //wp_redirect( '/submit-2/' ); // redirect to home page after submit          } // end IF     // Do the wp_insert_post action to insert it     ?>          <form action="" method="post" enctype="multipart/form-data">
Titolo
             <input type="text" id="title" value="" tabindex="1" size="20" name="title" />

Testo
             <textarea id="description" tabindex="3" name="description" cols="50" rows="6"></textarea>
          Filename:     <input type="file" name="file" id="file">

<input type="submit" value="Invia" tabindex="6" id="submit" name="submit" />
                  <input type="hidden" name="post_type" id="post_type" value="domande" />         <input type="hidden" name="action" value="post" />         <?php wp_nonce_field( 'new-post' ); ?>     </form>          <?php get_footer(); ?>      and function is               function insert_attachment($file_handler,$post_id,$setthumb='false') {     if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK){ return __return_false();      }      require_once(ABSPATH . "wp-admin" . '/includes/image.php');     require_once(ABSPATH . "wp-admin" . '/includes/file.php');     require_once(ABSPATH . "wp-admin" . '/includes/media.php');          echo $attach_id = media_handle_upload( $file_handler, $post_id );     //set post thumbnail if setthumb is 1     if ($setthumb == 1) update_post_meta($post_id,'_thumbnail_id',$attach_id);     return $attach_id;         }


Add 'Creator' User Meta when adding user

I am creating a custom web using WordPress. I need to get information about who has created an account/user. The meta for example **`created_by`**. So that I can retrieve who are the users that created by user X and who are the user created by Y and so on.


How to hide menu on WordPress admin

I want to hide some menus on admin panel: Appearance, Plugins, and Tools. How to hide it without plugin? And how can I un-hide them later easily?


WooCommerce customer account multiple emails

Is there a function to have more than one email address for a user account? basically a customer who makes an order also gets sent a copy of the order to a different email address (cc/bcc)


Customizing wp-activate.php

Does anyone know how I can customise wp-activate.php? It wraps the content in `<div id="content" class="widecolumn">`, however in my theme the main wrapper is `<div id="main">` Presumably, I could just style `div#content.widecolumn` to be identical to `div#main`. But I am curious if anyone knows how to customise this file without editing it.


jQuery .change() Event Bubbling in WP Admin

Experiencing some very odd behaviour in WP Admin, specifically on widgets.php. I'm creating a custom widget, and am writing some simple JS. This is the hook I'm using to enqueue my JS:               /**      * Enqeue the admin-side JS.      */     function ni_list_products_scripts( $hook ) {         if( $hook == 'widgets.php' ) {             wp_enqueue_script( 'list_products_scripts', get_template_directory_uri() . '/assets/js/widget-list-products.js', 'jquery' );         }     }     add_action( 'admin_enqueue_scripts', 'ni_list_products_scripts' );      And the actual JS file (simplified just to show the issue):               jQuery(document).ready(function($) {         $("#ni_list_products_search").on('change', function(e) {             console.log('change');         });     });      My end goal is to filter a list of posts, based on the text inputs value, but the .change() event doesn't seem to fire at all. I've tried using .change() as well to no avail. I'm totally stumped. I know the selector is right, and I know the script is being run. In my debugging I tried to do some basic stuff to #ni_list_products_search, and `$("#ni_list_products_search").remove();` does nothing as well. Just so I cover all the bases, the input I'm trying to target: `<input class="widefat" id="ni_list_products_search" type="text">`. I have no idea where to go from here. Any help is greatly appreciated!


Disable a plugin's widget

I wonder if possible to disable a widget that belongs to a plugin that is currently active w/o touching the plugin code. For sample, I normally use a code like this to disable wordpress widgets,                unregister_widget('WP_Widget_Text');      Now, I want to also deactivate let's say for sample the widget called "The other Widget" is that possible? Thanks in advanced.


language support in a custom urdu theme

I am planning to start work on an urdu (language in pakistan) website theme. basically, it will be a newspaper themed website. Can anyone tell me how can i add urdu support in my theme. I dont want to change Admin UI language. Just whatever posts/pages I will insert should be in my native language. Any positive ideas will be appreciated. Thanks


Auto-remove custom field with no value on publish

I got some plugins that auto-generates custom fields. Does anyone know how to automatically remove empty custom fields from post when I press "publish"? A check I can put in my `functions.php` that does a check and removes the custom field if there is no value?


Custom Fields and W3 Total Cache

I've successfully setup WP + W3TC + Amazon s3 and everything is working fine except a little thing. I've a custom post type with about 10 custom fields with images/audio/video there. All attachments, css, js are being loaded from CDN but not custom field values. In case of attachments, I didn't have to do anything. Can you please if I miss any step? How can I solve the issue? Thanks.


Store comments that can be searchable and displayed

I am using a theme and plugin that allows you to create a listing of a business and then users can review it like Yelp. The review function works off the comments section and allows users to add a star rating. I was wondering if it's possible to be able to organize these comments on a separate page and have an ability to search them and filter through them? Essentially treating the comments like custom post types and organizing them in a taxonomy. Has anyone seen or heard of an implementation like that before?


Show only first child in dropdown

I have a dropdown showing a custom taxonomy with multiple levels (children). Below is the code for it. Can someone please explain how I can limit the children shown? For instance, at the moment it shows: > Parent -> Child -> Child of Child I only want it to show: > Parent -> Child Thanks! :)               function my_dropdown_categories( $taxonomy, $current_selected = '', $include = null ) {     // Get all terms of the chosen taxonomy     $terms = get_terms($taxonomy, array('orderby' => 'name'));          // our content variable     $list_of_terms = '<select id="location" data-placeholder="Choose your area..."  class="selectboxSingle" name="location">';          if ( ! is_wp_error( $terms ) ) foreach($terms as $term){              // If include array set, exclude unless in array.         if ( is_array( $include ) && ! in_array( $term->slug, $include ) ) continue;              $select = ($current_selected == $term->slug) ? "selected" : ""; // Note: ==              if ($term->parent == 0 ) {                  // get children of current parent.             $tchildren = get_term_children($term->term_id, $taxonomy);                  $children = array();             foreach ($tchildren as $child) {                 $cterm = get_term_by( 'id', $child, $taxonomy );                 // If include array set, exclude unless in array.                 if ( is_array( $include ) && ! in_array( $cterm->slug, $include ) ) continue;                 $children[$cterm->name] = $cterm;             }             ksort($children);                  // OPTGROUP FOR PARENTS             if (count($children) > 0 ) {             //     $list_of_terms .= '<optgroup label="'. $term->name .'">';                  if ($term->count > 0)                           $list_of_terms .= '<option class ="group-result" value="'.$term->slug.'" '.$select.'>' . $term->name .' </option>';             } else                 $list_of_terms .= '<option value="'.$term->slug.'" '.$select.'>'. $term->name .' </option>';             //$i++;                  // now the CHILDREN.                  foreach($children as $child) {               //   $select = ($current_selected == $child->slug) ? "selected" : ""; // Note: child, not cterm                  $list_of_terms .= '<option value="'.$child->slug.'" '.$select.'>'. $child->name.' </option>';             } //end foreach                  if (count($children) > 0 ) {                 $list_of_terms .= "</optgroup>";             }         }     }          $list_of_terms .= '</select>';          return $list_of_terms;     }


Escape current post from loop

I'm creating a search widget and for that I use a secondary loop via new WP_Query();               $query = new WP_Query('s=searchTerm');     if ($query->have_posts()){         while ($query->have_posts()){             $query->the_post();             //echo the post         }         wp_reset_postdata();     }     else {         echo 'No results';         die();     }      The problem is that the search query returns the posts that have the search term in their title or content + the current post/page I'm viewing. How can I avoid that ?


Best way to integrate existing php application into Wordpress

A client of ours has a web application written in PHP, but has commissioned us to develop the front end for the website but wants us to integrate the current PHP web application (a package tracking system) into the Wordpress site (our cohoice). What's the best practice to do this? Making the existing application into a plugin is that an approach? .. Right now the existing web application , requires login and then establishes a session with the user. Can this web app co-exist within Wordpress or do we just need to it in or just link to it as a separate app. are there any best practices for this sort of thing?


Submit Custom Postypes from frontend

I am attempting to create a form that submits data and creates a post with custom fields filled. What I would like to do in step form. 1) Create a custom posttype function called "pickups" (I do not know how to do this) 2) Inside Pickups I need a function to created 5 separate columns which will be populated from the post types custom field. 3) Build a Form that will populate those 5 columns as a new postype( _not sure if that is the correct term_ ) 4) Then I need to output this data I am assuming with short code to a page. Here is some code I have found, however parts of it will need to be modified and the postype function will still need to be built. **pickup.php**
     <form id="new_post" name="new_post" method="post" action="">
Name
     <input type="text" id="name" value="" tabindex="1" size="20" name="name" />

Address
     <input type="text" id="address" value="" tabindex="1" size="20" name="address" />

Phone
     <input type="text" id="Phone" value="" tabindex="1" size="20" name="Phone" />
     <?php wp_nonce_field( 'new-post' ); //Apparently needed for security ?>      </form>
          <?     if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] )) {              // Do some minor form validation to make sure there is content         if (isset ($_POST['name'])) {             $name =  $_POST['name'];         } else {             echo 'Please enter a name';         }         // Repeat this for each input field                   // Add the content of the form to $post as an array         $post = array(             'post_name' => $name,             'post_address'  => $address,             'post_phone'    => $phone,              );         wp_insert_post($post);  // Pass  the value of $post to WordPress the insert function                                 // http://codex.wordpress.org/Function_Reference/wp_insert_post         wp_redirect( home_url() );     } // end IF          // Do the wp_insert_post action to insert it     do_action('wp_insert_post', 'wp_insert_post');           ?>


How to find taxonomy parent id from child taxonomy page?

This site is in beta at: beta2.dixiestarkhome.com , the page for context is: http://beta2.dixiestarkhome.com/taxon/upholstery/sofas-settees/ my custom taxonomy is "taxon", sofas is a child of upholstery. I want to find the parent taxon, and then do a wp_list_categories on that parent. This is the code that runs the taxon listing:
      <?php      //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)          $taxonomy     = 'taxon';     $orderby      = 'name';      $show_count   = 0;      // 1 for yes, 0 for no     $pad_counts   = 0;      // 1 for yes, 0 for no     $hierarchical = 1;      // 1 for yes, 0 for no     $title        = '';          $args = array(       'taxonomy'     => $taxonomy,       'orderby'      => $orderby,       'show_count'   => $show_count,       'pad_counts'   => $pad_counts,       'hierarchical' => $hierarchical,       'title_li'     => $title,       'depth'        => '1'     );     ?>
     <?php wp_list_categories( $args ); ?>
                <?php      $term = $wp_query->queried_object;     //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)     $args2 = array(       'taxonomy'     => $taxonomy,       'orderby'      => $orderby,       'show_count'   => $show_count,       'pad_counts'   => $pad_counts,       'hierarchical' => $hierarchical,       'title_li'     => $title,       'depth'        => '1',       'child_of'     => $term->term_id          );     ?>
     <?php wp_list_categories( $args2 ); ?>
      If I am on the Uphostery page it works fine and shows the children. If I am on the sofa's page it just says "No Categories" To recap, I need to find the taxon parent and then list the child taxons... Ideas?


Shortcode Attribute

I want to assign a title to my column shortcode. Essentially, [column title="nameofcolumn"]content[/columntitle]. But I'm not quite sure what to do after the "=>" or after my div class of title. I've looked for tutorials but I can't find anything specific enough for me to understand.               function column_shortcode( $atts, $content = null ) {         extract(shortcode_atts(array(             'title' => 'WHAT DO I ENTER HERE',         ), $atts));        return '

DO I NEED SOME TEXT HERE?

' . $content . '
';     }          add_shortcode('one_third', 'column_shortcode');      EDIT: Also I'd like to set my 1/3 columns under a row div so I can clear: both. How can I accommodate that?


Setting a Master Menu on a Custom Post Type

I am currently developing a site for a car dealership to list their inventory. I have setup the car up as a custom post type. Each post will have children (gallery, features, accessories, etc). I want to have a nav on all of the pages like so:

Gallery
Features
Accessories
      It would be nice to just create a single template like single-car.php and then have the menu in there. The question is, how do I replace the first part of the menu (/ford-escape-lt) with the current page we are on? Is there any way to add classes to the current page item?


Display custom post counts for author , not default posts

<?php         global $wp_query;         $curauth = $wp_query->get_queried_object();         $post_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '" . $curauth->ID . "' AND post_type =     photoshop_tutorial' AND post_status = 'publish'");         ?>
Post Count: <?php echo $post_count; ?>
      I've tried with this codes & it shows the whole `photoshop_tutorial` posts count, but what I want is to display for individual author's posts, because I want to add it in author page. For example: > Smith posted `<?php $post_count; ?>` photoshop tutorials How can I do that?


Replace title column in post list with post meta value

I have created custom post type called booking. It have a meta `booking_first_name`, `booking_last_name`, `booking_email`, `booking_phone`, `booking_phone_contact`. Currently, I succeeded displaying email, phone and mobile phone. ![enter image description here](http://i.stack.imgur.com/VRpf8.png) However, i want to display my post title as `booking_first_name` \+ `booking_last_name`. How could I do that? Here is my current syntax :               <?php     /**      * Register custom admin field      */     add_filter('manage_booking_posts_columns', 'booking_table_head');     function booking_table_head( $defaults ) {         $defaults['booking_email']          = 'Email';         $defaults['booking_contact_phone']  = 'Contact Phone';         $defaults['booking_mobile_phone']   = 'Mobile Phone';         return $defaults;     }          /**      * Fill custom field value      */     add_action('manage_booking_posts_custom_column', 'booking_table_content', 10, 2);     function booking_table_content( $column_name, $post_id ) {            switch ($column_name) {         case 'title':           $first_name = get_post_meta( $post_id, 'booking_first_name', true );           $last_name = get_post_meta( $post_id, 'booking_last_name', true );           echo $first_name . ' ' . $last_name;           break;              case 'booking_email':           $email = get_post_meta( $post_id, 'booking_email', true );           echo $email;           break;              case 'booking_contact_phone':           $contact_phone = get_post_meta( $post_id, 'booking_phone', true );           echo $contact_phone;           break;              case 'booking_mobile_phone':           $mobile_phone = get_post_meta( $post_id, 'booking_phone_mobile', true );           echo $mobile_phone;           break;       }     }


Filtering more than one term in a taxonomy in WP

i have a custom post type called 'events', it has a taxonomy named 'category' structured this way:      hotels (parent)   -1 star (child)   -2 stars (child)   -3 stars (child)      location (parent)   -loc1 (child)   -loc2 (child)   -loc3 (child)      how do i filter, for example, only the events that belong to 1 star and, at the same time, to loc1 (basically the intersection of 1 star and loc1)?


Manage theme related custom posts

I want to manage some custom posts and custom fields that have been created by the theme I've installed. In particular I want to change the permalink they are using. There is a way to do so? For example letting WP Types to recognise already existing custom posts?


Activate short codes for all post queries?

I need to use shortcodes on widgets and various plugins. For widgets I simply used:               add_filter('widget_title', 'do_shortcode');     add_filter('widget_text', 'do_shortcode');      However I cannot figure out how to activate shortcodes for plugins. I noticed all of them get posts with WP_Query and then $post->post_content. Maybe there is a way to filter post queries? How can I activate shortcodes for all post echoes?


Return XML of Post Metadata

All of my posts in one category (i.e. Location) have two custom fields: latitude and longitude. I would like to return an XML or JSON of all those posts (title, latitude, longitude) for use as Google Maps markers. I can't simply call out to a stand-alone php file to return my data as I would like to access my data through $wpdb. What is the best solution?


How to specify width and height in the_content for image attachments

When the_content print attachment images (attachment template) it automatocally displays the picture. Is there a hook to specify the width and height of the image displayed?


Set Custom Post Type title to the Post's Date

I have a custom post type, called 'status' and I have disabled 'title' in the post type. Right now it's setting all posts to have the title "Auto Draft". I want to set up a way to set the title to be the post's date. I think I should be using 'wp_insert_post_data". Right now I am using the following code but it is not working:               function status_title_filter( $data , $postarr )     {          if ($postarr['post_type'] == 'status'){         $date = $data['post_date'];         $data['post_title'] = $date;     }     return $data;     }          add_filter( 'wp_insert_post_data' , 'status_title_filter' , '99' );      Thanks in advance for solving my simple problem. I'm a sort of novice when it comes to this kind of things.


Sidebar not visible after changing to new domain

I made a change of my existing domain to new domain. I took the backup of the database from old site and imported it into new database Used the search and replace widget to replace the old url with new url But i cant seem to see the sidebar widgets. I can see them on the admin panel but they are not visible on site. Any pointers on what could be the cause. I changed the theme to twentyten and the sidebar is visible


Using fallback language with polylang and using pagination in different language leads to page not found

Following scenario I am using this in my archive.php to fall back to german in case there are no translations: `if (is_category()) { $categories = get_the_category(); $category_id = $categories[0]->cat_ID; $deCatId = pll_get_term($category_id, "de"); query_posts(array_merge($wp_query->query, array('post_type' => 'post', 'lang' => 'de', 'cat'=>$deCatId))); echo var_dump(query_posts(array_merge($wp_query->query, array('post_type' => 'post', 'lang' => 'de', 'cat' => $deCatId)))); }` Now there are hundreds of posts in the default language which is german (de) but only like 3 posts in english. Now when I want to use pagination to the next page, when using english, I get a "Page Not Found" error. Obviously, because the system thinks there is no page 2 in english, since there are only 3 posts the system thinks there is only the main category page. But since I am using german as a fallback language, there is in fact, a page 2. Just with registered posts in german. Is there a way around this problem?


Author ID mismatch from database

The author->ID for one particular author is returning a different value than what exists in the database. The database has the author's id as 2, but when I query author->ID, it returns the value 11. So, if I try to use the author's id for any purpose, I get the wrong results. Other functions related to this author work fine. For all other authors, everything works absolutely fine. I am using the coauthors plus plugin.               foreach ( $coauthors as $coauthor ) {     $id = $coauthor->ID;     // some code to fetch author details using $id     }      Here the $id that I get is 11, though it should be 2. For all other authors, I get the right results. And when I add this author to a post, even at that time the dropdown(in the field that coauthor plugin uses to add authors) shows the id as 11. This is what I get with var_dump($coauthors);               array(1) {        [0]=> object(stdClass)#318 (14) {          ["ID"]=> string(2) "11"          ["display_name"]=> string(4) "User1"          ["first_name"]=> string(0) ""          ["last_name"]=> string(0) ""          ["user_login"]=> string(4) "user1"          ["user_email"]=> string(17) "email@gmail.com"          ["website"]=> string(0) ""          ["aim"]=> string(0) ""          ["yahooim"]=> string(0) ""          ["jabber"]=> string(0) ""          ["description"]=> string(0) ""          ["user_nicename"]=> string(4) "user1"          ["type"]=> string(12) "guest-author"      }       Here all values except the ID are correct. I could go ahead and delete this particular user and create a new one. But I have to be sure that it won't happen again. So I am trying to understand what could have caused this. I know this is a very vague question but any help would be great.


filter single_cat_title avoiding the breadcrumbs

I'm developing a simple plug in and I need to filter single_cat_title in category page adding some html in every category page. Just doing this:               function subtitleCategory ($title) {         return $title."

TEST1

";     }          add_filter('single_cat_title', 'subtitleCategory');      I get what I need. But I noticed that this filter also apply to the breadcrumbs (there is a call in `breadcrumbs.php`) and this means twice in the same page (not what I need). Do you know if there is a condition that can be applied to filter just the title and not the breadcrumbs? I tried `in_the_loop`, `is_category`, `is_archive`, `is_tax` etc etc without success. \--edit-- Yes, breadcrumbs.php is a theme file and you should not take it in consideration. I'm trying to achieve an admin panel where your can put some text (with html) for every category and this text will be displayed just after the title in the category page. I'm trying to do this with a plug in and, for this reason, this can't be coupled with any theme dependency.


Custom meta boxes in RSS feed

I've got a few custom meta fields I'd like to be displayed in RSS feeds. Right now they do not because they are not part of `the_content` I reckon. If anyone has any tips for getting this to happen, please let me know! Thanks!


WP / Facebook integration - recently read articles

Over the last few months I've seen stories popping up in my timeline from various newspapers and websites where people have read certain articles, for example somebody has read a story on yahoo or guardian etc... ( examples here ) Is there a WP plugin to achieve this or is this a standalone FB app that would have to be developed?


add meta box - custom field : which to choose?

i've just find out about the custom field, which makes it possible to add something near a post, but what is the difference between "add_meta_box" and "custom field"? Custom field is inside the "supports" line, when we register a post type, so : isn't it easier to create a custom field than a add meta box? or are there many differences between both?


Create own Wordpress shortcode gallery

How I can handle this shortcode:   [my_gallery]   img01.jpg   img02.jpg   img03.jpg   img04.jpg   [/my_gallery] I can't understand how to write a function, to handle image files name.


How to divide and display categories into two columns

I am using custom taxonomies. I have multiple categories and each category has multiple children. I would like to display the categories in two columns on my homepage similar to linkcentre.com. I tried using wp_list_categories but could not split its output into two columns. I tried this solution but it only works when there are no subcategories. Thanks


add featured image dialog box disappear

I have a test site here (with WordPress 3.2.1) Since I activate the multisite support, the **add featured image** disappear. I try to deactivate all the plugin and activate the **default theme** (twenty eleven with has add_theme_support ('post-thumbnail') by default) but nothing change. The post thumbnail show up normaly on the **front** but I can't edit them without this dialog box. Of course, I checked on the "option" tab and nothing appear too for the post thumbnail feature. * * * **When I use WP_DEBUG, I get:** Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/patricet/public_html/wp- testsite/academie-sophro-v2/wp-includes/functions.php on line 3382 Notice: has_cap is called with an argument which is deprecated since version 2.0! The use of levels of user extensions and themes now prohibited. Use roles and capabilities in place. in / home/patricet/public_html/wp- testsite/academie-sophro-v2/wp-includes/functions.php on line 3466 **In console (with Firebug) for .js I get:** The use of the property "nodeValue" of an attribute is deprecated. Use "value" instead * * * **I can create an editor account if you need** Do you have a solution, an idea? Thanks!


How do I escape a ']' in a short code?

How do I escape a right bracket in a short code? I'm working on a Google Map plugin that has encoded points. Sometimes the polygons have the ] in it, which makes WP think that it's the end of the shortcode. For example:               [my_shortcode latitude='36.93'  longitude='-72.98' encoded_points='ortlF~g]tM?cZEH`z]}|@DQfi]' ]      I've tried `]` which is isn't causing a problem for WP, but it is causing a problem for my Google map code. I could use Regex to replace ], but maybe there is a simpler way. Does shortcode have an escape character?


Exclude one item from wp_list_pages( $args );

I have a menu that is currently shown with `wp_list_pages( 'title_li=' );` This shows all the sub pages from all the pages in the menu. I want to exclude a page with id 56 from displaying its sub items. When I use `wp_list_pages( 'exclude=56&title_li=' );` the menu becomes huge and all over the page. When I use wp_list_pages( 'exclude=56' ); the menu gets messed up (vertical instead of horizontal (no li) and all of them are displayed. How can I fix this?


See some statistics about the comments

Is there a way or a plugin so that I can see statistics for may comments and commenters? Like top commenters, most commented post, etc. Thanks, Alex


AddThis Sharing Bar Not Displaying on Custom Page Template - JS conflict?

http://www.headcount.org/a-real-whodunnit-the-oil-spill-blame-game/ \- on the single posts the sharing bar displays. http://www.headcount.org/blog/ \- on the blog archive page it doesn't (even after choosing archive, category, index as options within the AddThis option, though I have not chosen excerpts at this point because that's not what we want). This page uses the_content, not get_the_content, and when I view the source, I can SEE the bar in the source below the post meta, but it's just not displaying. Any thoughts as to why it's not showing on this particular page? I've deactivated all the plugins and that didn't fix it. AddThis support suggests that it's then an issue with the JS in the theme itself, but javascript isn't in my strong skill set - I need help sorting that out. I've just started working with this client so I'm still learning my way around their installation.