title: How to add (css) classes to only one wp_nav_menu()?

text: ### Edit I removed the original Question as this Q has far above 1.000 views now - which means it's important to a lot of people - to show you something that works a) without a custom Walker & b) is easy. _Note:_ I only removed to original Q, because it was pretty unspectacular. ### The Task Add css classes to all nav menu items inside a specific Nav Menu that was added via (admin UI) Appearance > Menu. ### The function               function wpse4388_navmenu_classes( $items, $menu, $args )     {         // prevent crashing the appearance > menu admin UI         if ( is_admin() )             return;              # >>>> start editing                  // Nav menu name you entered in the admin-UI > Appearance > Menus (Add menu).             $target['name'] = 'Topnav';                  // A targeted menu item that needs a special class - add the item number here             $target['items'] = array( (int) 6 );              # <<<< stop editing              // filter for child themes: "filter_nav_menu_{nav menu name}"         // the nav menu name looses all empty spaces and is set to lower         // if you want to use the filter, hook your child theme function into 'after_setup_theme'         $target = apply_filters( 'filter_nav_menu_'.strtolower( str_replace( " ", "", $target['name'] ), $target );              // Abort if we're not with the named menu         if ( $menu->name !== $target['name'] )              return;              foreach ( $items as $item )         {             // Add the class for each menu item             $item->classes = 'classes for all items';                  // Append this class if we are in one of the targeted items             if ( in_array( (int) $item->menu_order, $target['items'] ) )                 $item->classes .= ' only for a single item';         }              return $items;     }     add_filter( 'wp_get_nav_menu_items', 'wpse4388_navmenu_classes', 10, 3 );      Was it helpful? Don't forget to vote up! :)


title: PHP mobile redirect Endless loop

text: I have a mobile version I'm building outside of Wordpress in a subfolder on the same server as my Wordpress install. I'm including the wp-load.php file to pull content from the WordPress database. If I turn this plugin on (http://wordpress.org/plugins/php-mobile-redirect/), it goes into an endless loop. I realize now by doing this I'm also calling all active plugins. Or at least I think I'm calling the redirect script which is causing the endless loop. If I go to the normal site, http://s168249.gridserver.com/ on a mobile phone or by spoofing the browser, endless loop. If I go to the mobile site, http://s168249.gridserver.com/mobile/index.php, on a phone, endless loop. If I turn off the redirect, I can go to the mobile site without a hitch. CURRENTLY ALL REDIRECTION IS OFF So I assume that the include of the mobile redirect script us wp_load.php in the mobile index.php file is what's causing the issue. Is there a way to exclude just this plugin? http://wordpress.org/extend/plugins/php-mobile-redirect/


title: Check to see if more than one post

text:
I am new to php. I want to use a certain div "case" in the below code if there is one post here . If there is more than one I want to use another div "case2"               <php>      $connected = new WP_Query( array(       'connected_type' => 'posts_to_pages',       'connected_items' => get_queried_object(),       'nopaging' => true,     ) );          if ( $connected->have_posts() ) :     ?>        <?php while ( $connected->have_posts () ) : $connected->the_post(); ?>

<?php the_title(); ?>
<?php the_excerpt(); ?>
         <?php endwhile; ?>          <?php      // Prevent weirdness     wp_reset_postdata();          endif;     </php>


title: Make Custom Metaboxes Collapse by Default

text: I've created some custom metaboxes for my post write screen. Is there any way to make some of them display collapsed by default? Just in case I'm not using the correct terms or not being clear in my question I will elaborate: The metaboxes on the post write screen have a toggle switch in the upper right hand corner of the box. If you mouse over this area, it shows a little downward arrow and the words "Click to toggle". When you click it, the metabox collapses, hiding the contents and only showing the metabox's title bar. I am not talking about the Screen Options which make the entire metaboxes disappear (only on the given account). I just want certain metaboxes to display in the collapsed mode by default for all WP users. **UPDATE:** After reading in Hakre's answer that they toggle state is stored for the user I wanted to add some clarification on how I'd like it to work. I'm not sure if this is possible but I'd like the metaboxes to default to collapased when the post is new, then as the user expands them they should expand, however I want those settings to stay local to the specific post, so when they create a new post all of the metaboxes are collapsed.


title: Disqus over the default commenting engine, what are some pros and cons?

text: As subjective as this question might sound, pros and cons in the technical sense is what I'm looking for as answers. I've been using Wordpress for about 2-3 weeks and 9/10 of the comments are spam, so I'm think it would be a lot better if I use a disqus because it's "more social" in the sense that it connects Facebook and Twitter accounts in it as well and I'm looking for a more cleaner interface. Am I thinking in the correct way? Am I missing something and should I stick with the default commenting engine? Please do give a reason or explanation for why you believe one is useful over the other. Also, what's Disqus' situation with the spam situation? Can I get some links to real WP blogs/sites with disqus running? **Edit:** Does disqus have a spam filter?


title: Creating menu and breadcrumb "sections" within Wordpress 3 being used as a CMS

text: I am implementing WP as a CMS for my church's website. This is the first WP install where I'm doing a lot of the custom coding myself instead of just finding plugins and a stock theme. As I am a bit unfamiliar with the new menu system, I have hit one snag that I cannot figure out. We have divided our site into "sections" via a customized top navigation (consisting of things like "About", "Religious Education", "Media", "Pastor's Blog", etc. We are creating custom menus in the admin for each of these sections. What I would like to is to have a left nav that "follows" the user through the sections. Example Menu: Section1 -> Page1-> Link to CategoryList1 -> Post23   Section2 -> Page4-> Link to CategoryList1 -> Post23 In both of these cases, I can get to CategoryList1 which would be the looper for all of the posts in a certain category. I could then get to Post23 from there. What I need, however, is for the left nav to still reflect what "section" (or top-level nav) I was in when I got to this list. I've thought of managing everything in pages and each page just containing shortcode to display what I want so that I could use custom page templates to always disply the proper menu, and that works fairly well (in my head) until I get to the actual post level. At some point, I always hit the "where did I come from?" wall at the category and post level. I know there are good plugins for breadcrumb management in this arena, but I've not found a plugin that allows me do this with menus. I know that WP does not natively support sessions, so I'm trying to figure out how this might be possible without enabling sessions, but that almost seems like the only option? With sessions, I could just get my theme to read a session variable and grab the custom menu based off the session value. No session value means you're on the home page or came directly to a category, archive, or post from the home page, so no menu would be necessary. If you went to a section, you would hit a page template from somewhere, and that page template would be "section-aware" and write the session variable. Are there any other ideas that anyone might have or any plugins I've missed that might cover this functionality? Thanks so much!


title: Orderby with menu_order and title

text: Since Wordpress native order system is a little dumb (ie: 1 banana, 10 bananas, 2 bananas,...) I needed to add a plugin that let me set the order for numerical titles. The thing is that when I set the `orderby=` with `menu_order title`, the menu is ordered like I've set them in the backend. But for those that their order is set to 0... I would like to fallback to the `orderby=title`. So in short, I would like that the `orderby=menu_order title` fallback to title if the order are set to 0. Plugin link for menu order : http://wordpress.org/plugins/term-menu-order/


title: WordPress file manager plugin

text: I would like to manage some files available for download from my WordPress page. Because the file should be attached to more pages I would like to define pages where file is avalable for file directly. I don't want define the same file for lot of pages in my application. Do you know some plugin which should help me with this?


title: WordPress Multiple Loop: Home/Archives Page, with pagination

text: I can not write English, and I'm using the google translator. I believe that pictures can say more than words. Please watch this. http://i.stack.imgur.com/99YKW.jpg is possible to do something? Please, help me. Thanks.


title: Setting limit to posts or page creation

text: This is regardging to On multisite installation and setting limit to content creation by sub-site admins. I want to set a limit for posts,pages or any custom post types for any sub- site admins. So that they could just create certain number of pages and not more than that. I don't know what filter could help to set limit in functions.php. Could any one help me with that? So that I could achieve it? Thanks!


title: Categorize post by month with date picker

text:
I want categorize by month with date picker For example:               -Months select-     jan ===-click-====>(show All post of january, and hide the other post.)     feb *     mar *     etc.. *     ————— *     *     <post of january only>      Of course, according only of datepicker value in the custom post type, Some ideas?                   <?php               $posts = get_posts(array(         'post_type'     => 'events',         'meta_key'      => 'date',         'meta_value' => array( 'december 01,2014',                                'december 02,2014',                                'december 03,2014',                                'december 04,2014',                                'december 05,2014',                                'december 06,2014',                                'december 07,2014',                                'december 08,2014',                                'december 09,2014',                                'december 10,2014',                                'december 11,2014',                                'december 12,2014',                                'december 13,2014',                                'december 14,2014',                                'december 15,2014',                                'december 16,2014',                                'december 17,2014',                                'december 18,2014',                                'december 19,2014',                                'december 30,2014',                                'december 31,2014',),         'orderby' => 'ASC'          ));          if($posts)     {         foreach($posts as $post)         {             ?>
            <img src="<?php the_field('image'); ?>" alt="">
             <?php the_field('date'); ?>
<?php the_field('title'); ?>

<?php the_field('place'); ?> - <?php the_field('city'); ?>

                       <?php         }     }           ?>       Is there is a better way to do this?


title: How to insert a clickable and fixed background

text: > **Possible Duplicate:**   >  How to fix clickable background with Wordpress theme and CSS I have a problem using a clickable adverting skin as background of my website. My site is this: http://www.tvindiretta.com. If you scroll down any page of my site you will see that the top of the background si notte fixed but float and mess all up... I think that I should add a white background in foreground. I really need your help, I'm a noob in CSS and programming.... I read about this parameters googling for...                 display: block; ??       text-indent: px; ??       overflow: hidden; ??       z-index:22 ???      ...but I don't know how to solve this problem... Here is my Wordpress theme CSS file http://www.tvindiretta.com/wp-content/themes/videoplus/style.css Thanks a LOT for any help in advance P.S. This site: IMPRONTALAQUILA.ORG in certain pages shows the same ad and also other similar skins without any bug or problem... how can I get the same result? I want the background to be fixed so that users see it browsing any part of the page.


title: Does changing 'WPLANG' in wp-config.php just effect the admin language or does it have other consequences?

text: I am curious to know if setting 'WPLANG' in wp-config.php just effects the admin language or does it have other consequences? I run a blog in a foreign language but use English in my admin. I initially set the WPLANG to the foreign language a while ago and used a plugin (admin in English) to keep the English admin interface whilst using an .mo file to translate the theme. I now use 'WPML' to manage the translations. I was wondering whether my WPLANG setting is still relevant and what it really means to the site? Thanks


title: What exactly is WordPress?

text: These are some very basic questions, so I apologize for asking them, but it's hard to understand exactly how some things work without spending dozens of hours experimenting with them. I'm more than willing to learn WP if it can do these things, but I just need some **yes / no / brief explanation** answers to know what WP is capable of.   1. I know WP is some sort of blogging system, but can I use it to create blog posts on my own domain?   2. If so, can only the web admin make them, or can any user of the site make them?   3. If WP can create a blog on my own domain, is it as easy as tossing some server-side script files into a directory on my site and then creating the blog posts from within my browser?   4. If so, will it manage blog accounts by itself, or do I have to create an account/login/password/etc system?   5. If WP can create a blog system on my domain that all users can use, is the CPU usage that WP will create going to end up costing me $100/mo if there are only about 20 active bloggers on my site, or will the CPU-usage bills caused by WP be insignificant?   6. Does WP have any forum-like functionality, or is it strictly blog posts + comments + facebook "likes" / Digg votes / etc.?   7. Does my web site's host (HostGator) have to support WP in any way (whether it be with server-side files that I can't myself put on the server [other than PHP and MySQL, which HG offers), or whether it be the case that some site hosts do not allow the use of WP, etc.)? I know HostGator does not allow warez, music sites, gaming, et al. sites, but they shouldn't have a problem with me using WP, right? Like I said, if it sounds like what I'm looking for, I'm more than happy to buckle down and learn it. I just need to know what WP "is." I apologize again for my profound ignorance.


title: Pull certain Wordpress posts on custom CMS instead and 301 wordpress to it?

text: Say a site has its main custom CMS on www. and a wordpress blog on blog. Up to now some really good reviews have been posted over years on blog. but believe now they would be best served on www. Is there a way to pull this content in all its glory and still use WP to power it behind the scenes but display on the www? Not only that but then have a 301 setup to move them all across and no longer show on the blog. subdomain? Appreciate anyone who could point me in the best direction to do this if its possible. Many thanks in advance.


title: How to redirect/rewrite all /wp-login requests

text: Is there any simple way to have wordpress, php or apache rewrite all urls which involve `/wp-admin` to `/admin`? I have added this entry to my .htaccess file:               RewriteRule ^admin /wp-login.php [L]      However although `domain.com/admin` will correctly show the login page all pages after you login show the URL as `/wp-admin` which I want to always show `/admin`. Any thoughts on this?


title: custom posts permalinks url rewriting

text: My permalinks are: /%postname% I currently use Custom Post Permalinks to rewrite my permalinks. It work well, but... I dlike to have some url like: **www.mysite.com/permalinks_of_my_custom_posts.php** >> **www.mysite.com/mario-games.php** If I use the plugin to do that I have to write _/%list-mario%.php_ and it's ok,slug is rewrite... Well ... not so much because if I write another custom posts and do the same way, for exemple : _/%list-firemen-games.php_ , it's ok, I have my **www.mysite.com/firemen-games.php** BUT, **www.mysite.com/mario- games.php** has became unaccessible. But, (many butt there sorry :D) If I write something before the slug, for example: _/test/%list-mario%.php_ , my url is ok and it work ... So I have **www.mysite.com/test/mario-games.php** and **www.mysite.com/firemen- games.php** and I want **www.mysite.com/mario-games.php** and **www.mysite.com/firemen-games.php** and other ... It s like when I want multiple url like **www.mysite.com/mario-games.php** a var is erased by another and only the last work. An other solution would be to have some page.php ... Thanks for your help !


title: How To Modify New Sub Blog Immediately When Super Administrator Creates It?

text: I want to trigger a function in a plugin when a new sub-blog is created in a multisite set up of WordPress. Is it possible? If so, to which action/filter should I hook? The motivation here is to modify the new sub-blog blog it has a preset arrangment of settings, theme, plugin options, plugin activations, content set up, etc. If there aren't action/hooks for this purpose are there any other ways to accomplish this?


title: How can I programmatically save data into custom fields that contain serialized data?

text: I purchased a theme from themeforest recently that has a custom post type. Here is a link to a page that's been created with the custom post type: http://bluepresley.com/farmerfinder/?dir-item=dance-relax The custom post type has approximately 20 different custom fields, but you can see from my array dump that the one one field has been saved as serialized data: (array dump using get_post_custom())               Array     (         [_edit_last] => Array             (                 [0] => 1             )              [_ait-dir-item] => Array             (                 [0] => a:20:{s:7:"address";s:51:"276 Canal Street, New York, NY 10013, United States";s:11:"gpsLatitude";s:17:"40.71958306715651";s:12:"gpsLongitude";s:17:"-74.0379810333252";s:14:"showStreetview";a:1:{s:6:"enable";s:6:"enable";}s:18:"streetViewLatitude";s:9:"40.719679";s:19:"streetViewLongitude";s:18:"-74.03797400000002";s:17:"streetViewHeading";s:18:"-151.8987176681924";s:15:"streetViewPitch";s:17:"5.196265482127373";s:14:"streetViewZoom";s:1:"0";s:9:"telephone";s:13:"044 802 52578";s:5:"email";s:19:"directory@email.com";s:3:"web";s:17:"www.aitthemes.com";s:11:"hoursMonday";s:9:"8am - 8pm";s:12:"hoursTuesday";s:9:"8am - 8pm";s:14:"hoursWednesday";s:9:"8am - 8pm";s:13:"hoursThursday";s:9:"8am - 8pm";s:11:"hoursFriday";s:9:"8am - 8pm";s:13:"hoursSaturday";s:6:"closed";s:11:"hoursSunday";s:6:"closed";s:18:"alternativeContent";s:33:"What goes in alternative content?";}             )              [_thumbnail_id] => Array             (                 [0] => 8159             )              [_edit_lock] => Array             (                 [0] => 1409208357:1             )              [slide_template] => Array             (                 [0] =>              )     )      Please note the key in question is _ait-dir-item. I noticed in the form itself all form fields were named `name="_ait-dir- item[address]"` (for example). If this is the case, how do I programmatically add items? Is this typical Wordpress and there is a way to handle this approach? I assume I'm not going to be able to use `add_post_meta( $post_id, 'mymetakey', $my_long );` or other approaches found here and here. ?


title: Wordpress links/site title won't work

text: I have one Wordpress installation at www.website.com, and a test site at www.website.com/test. The standard site works fine, but the links on my test site act weird. I use post title as permalink (www.website.com/test/example-post) , and the links look right when I click on them, but they will send me to the standard site (in root folder). So if I have a page with the same title there, I will end up there. If the standard site doesn't have that page title, I will get a 404 there. Also, the site title won't work, only the post titles (like, the browser title would be __ :blog entry name). I tried changing htaccess to the folder name of the test site (/test), but that screwed up the standard site (links there took me to the test site, which is not 'open' yet). Any ideas?


title: How to troubleshoot Sidebar not being generated

text:
I'm building a custom theme. My sidebar is not being generated at all. In functions.php, I have:               if ( function_exists('register_sidebar') ) {         register_sidebar(array(             'name' => 'Standard Sidebar',             'id' => 'sidebar-1',             'description' => 'Appears as the sidebar on standard pages',             'before_widget' => '
',             'after_widget' => '
',             'before_title' => '
',             'after_title' => '
',         ));     }      In sidebar.php, I have:               <?php echo '
You made it into the sidebar function
'; ?>     <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
             <?php dynamic_sidebar( 'sidebar-1' ); ?>
     <?php endif; ?>      In page.php, I have:               <?php     /**      * Page      */          get_header();          ?>     <?php while ( have_posts() ) : the_post(); ?>

             <?php if ( function_exists('yoast_breadcrumb') ) {                 yoast_breadcrumb('
','
');             } ?>

<?php the_title(); ?>

                     <?php the_content(); ?>

             <?php get_sidebar; ?>

          <?php endwhile; ?>          <?php get_footer(); ?>      I don't see "You made it into the sidebar function", and nothing appears in the source code of the page I am displaying. It is a normal Wordpress page, and I have no custom templates created yet, so it should be using page.php.


title: Get Posts by tag from a custom taxonomy

text: I have a custom post type called `product`, which have two custom taxonomies named as `product_tags` & `product_categories`. In My `Product Categories` archive page, I am listing tags. My requirement is, when any one will click on any tag, the products belongs to the tag will be listed. But condition is products will be only from the specific category or from the child category of that. Example: In `Men` Product category archive section, `Headwear` is a tag. When user clicks on the "Headwear" products from the `Men` or Child Cat of `Men` should be listed there, not from 'Women'.


title: Wp_editor doesn't send the required data

text: The `wp_editor` function is working fine concerning the displaying of editor and sending of information, except that the information is never sent as it is. In a template file responsible of updating posts from front end, var_dumping always shows differences betweeen the content coming from database and content sent by editor via POST variable, even the user changes nothing under the editor. One of the problems for instance, is that the string sent by POST variable is containing `"\` instead of `"`. In the website I am creating, I need to display the differences between the edits of a post using PEAR text_diff library. Application tells me that there is always difference between edits, even it is not the case, because even after `esc_attr`, and `strip_tags`, there are differences (double quotes for example). Can you please give me an insight on how to resolve such issue? Are there any techniques to make wp_editor works right? Or should I code my own editor?? Thank you very much for your time and assistance.


title: Replace meta_key _product_url

text: I have this 2 functions that replace the links in posts with an affiliate generated link . But it works only for posts and the links in the posts . I am running woocommerce and the link I would like to change is in post_meta, a meta_key with the name _product_url . I would like to change the functions to replace the links in the meta_key _product_url . I am stuck . here are the functions: ` function replace_links_posts() { global $wpdb; $post_ids = $wpdb->get_results( "SELECT ID FROM " . $wpdb->prefix . "posts WHERE `post_status`='publish' AND `post_type`='post' ORDER BY ID DESC", OBJECT ); $shorted_links = 0; foreach ( $post_ids as $p ) { $post = get_post( $p->ID ); // Replace link if ( false !== ($total = replace_links_post($post)) ) $shorted_links += $total; } return $shorted_links; } ` AND ` function replace_links_post($post) { global $wpdb; @set_time_limit( 90 ); @ini_set( 'memory_limit', '512M' ); $total_links = 0; if ( ! empty( $post->post_content ) && ! empty( $post->post_title ) ) { $content = $post->post_content; $post_title = $post->post_title; $links = get_html_links( $content ); $links = array_unique( $links ); $count_links = count( $links ); for ( $j = 0; $j < $count_links; $j++ ) { $check_advertiser = $wpdb->get_results( "SELECT advertiser_id FROM " . $wpdb->prefix . "ps_advertisers WHERE link='" . clear_url( $links [ $j ] ) . "'", OBJECT ); if ( isset( $check_advertiser[0] ) && 0 != (int)$check_advertiser[0]->advertiser_id ) { $shorten_link = shorten_link( $post_title, $links[ $j ] ); if ( false != $shorten_link ) { // Escape url $url = $links[ $j ]; $escape = array( '.', '/', ':', '-', '_', '?', '#' ); foreach ( $escape as $char ) { $url = str_replace( $char, "\$char", $url ); } // Replace Advertisers URLS $content = preg_replace( '/href="' . $url . '"/is', 'href="' . $shorten_link . '"', $content ); $wpdb->get_results( "UPDATE " . $wpdb->prefix . "posts SET `post_content`='" . $content . "' WHERE ID='" . $post->ID . "'" ); $total_links++; } } } } return $total_links; } ` help !?


title: How to add a quicklink to the Posts Admin Published|Scheduled|Trash menu

text: Here might be an interesting idea: is it possible to add a "quicklink" to the quick links at the top of the Post Admin page (e.g. above the Bulk Actions dropdown, where it says "All | Published | Scheduled | Drafts | Pending")? My idea is to add a links for: Today | Monday | Tuesday | Wednesday | Thursday | Friday Just adding "Today" would be useful, as it would trigger the filter that shows all the posts that were either published or are scheduled for today.


title: How to include file upload field in buddypress registration form?

text: I am using buddypress to make the social network of passed out students of my school.I have used Buddypress Xprofile Custom Fields Type for registration.I want to include "Add file"(Marksheet of student,will be a image) so that I can come to know that the student is fake or real.How can I add this field is there any plugin for that?


title: Disable "quick edit" only for non admin in functions.php

text: I have this in my functions.php               function remove_quick_edit( $actions ) {     unset($actions['inline hide-if-no-js']);     return $actions;     }     add_filter('post_row_actions','remove_quick_edit',10,1);      to remove the quick edit link in the backend when scrolling the list of published posts. It works like a charm but it disable it even for the admin role. Is it possible to keep it showing only for the admin while still diabling for the rest? Thanks! **SOLVED thanks to jfacemyer!** This is the full code to add in functions.php               function remove_quick_edit( $actions ) {     unset($actions['inline hide-if-no-js']);     return $actions;     }     if ( current_user_can('manage_options') ) {     } else {     add_filter('post_row_actions','remove_quick_edit',10,1);     }


title: Media Manager 3.5 custom options

text: I need to change the values and hide some of the default media manager Attachment Display settings. Like setting the "Link to" to none, and hiding it so that the registered user can't change it. It would also be nice if I could delete the "size" option "original size from the dropdown. I googled a bit and it seems to be very tricky to make changes to the new media manager, therefore I found no solution so far.. I hope you can help me with some insights. Thank you!


title: Pre-populate BuddyPress Member Profile Data in Gravity Forms

text: I am succesfully pre populating logged in user wordpress user meta into gravity forms, but I can't find a way how to prepopulate buddypress profile data into gravity forms. **Goal** I want to be able to pull from Buddypress Profile data for the logged in user to populate the fields in Gravity forms such as Phone, Address, Country, Province etc. **Conclusion** I hope that buddypress member profile fields works very similarly as wordpress user_meta does, I tried many combinations which I have found on the net and nothing works for me - (for example the name of one of the fields in buddypress profile fields is Phone - group_id=5&field_id=59 - this is the slug from edit profile page, which should say that Phone's fields number is 59 and group 5(I don't know if it is important): This is the code which should be pulling Buddypress xprofile fields which unfortunately doesn't work.               add_filter("form_field_value_phone", "populate_phone");     function populate_phone() {         $current_user = wp_get_current_user();         $current_user_id = $current_user->ID;         $phone = bp_profile_field_data( array('user_id'=>$current_user_id,'field'=>'Phone' ));         return $phone;     }      This is working "wordpress" user meta data fields in functions.php               // populate the field with "user_firstname" as the population parameter with the "first_name" of the current user         add_filter('gform_field_value_user_firstname', create_function("", '$value = populate_usermeta(\'first_name\'); return $value;' ));          // populate the field with "user_lastname" as the population parameter with the "last_name" of the current user             add_filter('gform_field_value_user_lastname', create_function("", '$value = populate_usermeta(\'last_name\'); return $value;' ));          // this function is called by both filters and returns the requested user meta of the current user             function populate_usermeta($meta_key){                 global $current_user;                 return $current_user->__get($meta_key);             }


title: Pass strings to plugin function

text: I have simple function to show an image:               function helloworld() {         echo '<img src="'.$link.'" alt=".$alt." />';     }      I would like to pass strings link and alt to the function something like that:               <?php helloworld('link=www.google.com&alt=picture'); ?>      How can I achieve something like that?


title: make Wordpress image captions responsive

text:
This webpage contains images inserted by Wordpress. The code used to insert the first image is:               [caption id="attachment_887" align="alignnone" width="604"]                                a Forest Legacy group[/caption]      This image is controlled by CSS:               #content .wp-caption a img {         width: 614px;         height: auto;     }      I want to make this image responsive. I've inserted the CSS:               @media (max-width:988px) {         #content .wp-caption a img {             width: 99.03225806%; /* 614/620 */             height: auto;         }     }      However, the DIV.wp-caption remains at 604px, as specified inside the Wordpress post. I've tried specifying this as a percentage (97.41935483%) but Wordpress reinterpreted it as 104px. **The inline CSS is overriding the CSS I insert into the stylesheet.**
      Any ideas on how I can make the .wp-caption responsive?


title: Wordpress permalink issue

text: If i try to access my wordpress page using the native url structure i.e. for instance: www.mywebsite.com/?p=123 I am redirected to my homepage. It doesn't seem to be an htaccess issue for I tried without it as well. This is also causing some of the ajax requests to fail. It works fine if I go back to the default url scheme.


title: the_posts hook, which set of posts?

text: I want to modify search results. Currently I hook to the_posts and check wp_query->is_search to determine if I am looking at the search results page. However, I noticed that the_posts is executed not only on the search results, but also on any excerpt list on the page (such as a listing of news items in the footer of the page.) How can I tell which the_posts call is which? Should I assume it's the 'first' one? or is there a better way?


title: get_query_var function not working at all

text: Yes, there are some similar topics about this function, get_query_var('paged') giving same result blog posts sorting doesnt work while using get_query_var I am using wordpress3.5, I have my `own` php mysql based system, and I need to integrated a blog function , and I just need to list the `latest posts` on a seprate php file `oreder by post-date`. Basicly, my requirements is simple:               list all of posts on a php file, suppose this file's name is blog_show.php      Because I will use wordpress's API, outside wordpress, I need to import wordpress first, you can find the way from here Integration Wordpress with your sites Here is some of my blog_show.php               define('WP_USE_THEMES', false);     require_once '../blog/wp-load.php';          global $wp_query;     wp_reset_query();          $current_page = (get_query_var('p')) ? get_query_var('p') : 1;          $query_args = array(         'orderby' => 'date',         'order' => 'DESC',         'post_type' => 'post',         'post_status' => 'publish',         'posts_per_page' => 2,         'paged' => $current_page,         //'add_args' => true          );     $lateset_posts = new WP_Query($query_args);               $paging_args = array(         'base'         => '%_%',         'format'       => '?p=%#%',         'total'        => 10,         'current'      => $current_page,         'end_size'     => 1,         'mid_size'     => 1,         'prev_next'    => True,         'prev_text'    => __('« Previous'),         'next_text'    => __('Next »')     );     $lateset_posts_paging = paginate_links($paging_args);      Everything is ok, I can use               $lateset_posts = new WP_Query($query_args);      to find out the posts what I want to. But I cannot use               get_query_var('p')      I always get the same value. And I found even I declare wp_query is gloable, it still cannot be used, almost every fields of wp_query is `null`. Becase of `get_query_var('p')` and `$wp_query` cannot be used, so my pagnation is also can not be used. As you see, the var `p` are only used in two places               $current_page = (get_query_var('p')) ? get_query_var('p') : 1;     $query_args = array(            //something            'paged' => $current_page,         );      and               $paging_args = array(             'base'         => '%_%',             'format'       => '?p=%#%', //P's here             'total'        => 10,             'current'      => $current_page,             'end_size'     => 1,             'mid_size'     => 1,             'prev_next'    => True,             'prev_text'    => __('« Previous'),             'next_text'    => __('Next »')         );      I have a test, even I changed `p` to `paged` or `anything else`, still get the same error. Where am I wrong, do I need to require some extra php files ? Thanks.


title: How To Display A List Of CPT Posts In A Meta Box On Menus Page?

text: Is it possible to display a list of the custom post type POSTS, not archive link, inside a meta box on the nav menus page? Currently, it displays each CPT post inside it's own metabox, but I would like to group them all into one box, so the user can check as many posts as they want and only have to click "Add To menu" once. I've seen a few plugins and code examples that allow you to display the CPT archive link in a metabox, but that's not what I'm looking for. I want to display the post that has been added under each parent CPT. Any ideas on how to achieve this? Hopefully that all made sense...


title: Mystery ghost page not appearing in Admin

text: I have a strange problem. I have a blog listing page like example.com/something but this page is no where to be found in the admin. It returns 200 OK http status so its there. But it uses a seemingly random template and looks broken. What can I do? How can I find it in admin? The usual tricks dont work.   * There is no id to be found in the HTML source (no shortlink etc)   * searching for the permaling slug in admin doesnt return anything What else could I try?


title: Gravity Forms, how to link form to amember pro signup

text: Trying to linkup a custom gravity form to my aMember Pro signup form and having difficulties. I have this for my in my functions file:               // Gravity Forms to aMember Pro Link Up          add_action("gform_after_submission_5", "after_submission", 10, 2); // Run these scripts strictly on Form ID 5     function post_to_third_party($entry, $form) {              $post_url = 'https://www.domain.com/amember/signup/index/c/cart/';         $body = array(             'name_f' => $entry['3'],             'name_l' => $entry['4'],             'email' => $entry['1'],             'login' => $entry['2'],             'pass' => $entry['5']             );              $request = new WP_Http();         $response = $request->post($post_url, array('body' => $body));          }      I have tried the post_url as 1. https://www.domain.com/amember/signup/index/c/cart/ 2\. https://www.domain.com/amember/signup/index/c/ and 3. https://www.domain.com/amember/signup/ with no luck. Wondering if anyone here has tried to link these 2 systems up. Found threads online but haven't been that helpful.


title: Show links to child pages on both parent AND child pages

text: I have a client who wants the following; They have a series of pages, each of which have children. On the parent pages they want to show links to all the children. For this I am currently using this query;               <?php         $args = array(             'post_type' => 'page',             'post_parent' => $post->ID,             'posts_per_page' => -1         );         $system_query = new WP_Query($args);         while ($system_query->have_posts()) : $system_query->the_post();     ?>              <!-- links to all this page's children -->          <?php endwhile; wp_reset_postdata();?>      This works fine for the parent pages, but now the client wants to show the same set of links to show on the child pages aswell... Is there a simple way to amend this query to allow that? Or will I have to write something else from scratch


title: Display formatted list of taxonomy terms with last seperator different

text: I am trying to display a list of event producers, which are stored as a taxonomy. For each event (custom post type) there can be anywhere between 1 and many producers, so I would like to list them, comma separated, with a "&" between the second to last one and last one. The below function does the job, except in the case of only having one producer. How would I make this work for 1 producer or many producers at the same time?               function the_producers($post_id = false) {         if ($post_id == false) {             $post_id = get_the_ID();         }         $producers = get_the_terms($post_id, 'producers');                 $prods = array();         foreach ($producers as $producer) {                 $prods[] = $producer->name;         }         $str = array_pop($prods);         if ($prods) {             $str = implode(', ', $prods).' & '.$str;             return $str;         } else {             return false;         }        }      I've tried counting the number of iterations and if there's only 1, just returning the single producer, but that doesn't seem to display anything for some reason:               function the_producers($post_id = false) {         if ($post_id == false) {             $post_id = get_the_ID();         }         $producers = get_the_terms($post_id, 'producers');                 $prods = array();                 $cnt = 0;         foreach ($producers as $producer) {                 $cnt++;                 $prods[] = $producer->name;         }         if ($cnt == 1) {             $str = $producer->name;         } else {             $str = array_pop($prods);             if ($prods) {                 $str = implode(', ', $prods).' & '.$str;                 return $str;             } else {                 return false;             }         }     }


title: Moving sidebar links to below the header menu

text: This is my first question on StackExchange. I'm using a Wordpress plugin that shows links to pages in the sidebar. Now my question is, how can I move them to below the top menu? example site: http://www.androidos.in/products/phone/sony-xperia-zr/ In the sidebar below the image you can notice some links, i want to make that like this: http://www.engadget.com/products/samsung/galaxy/s/4/ In the above site you can notice above the image some links i want to make it like that.               .gdpc-side {          float: left;          width: 182px;          margin-right: 20px;     }     .gdpc-side h2 {         clear: none;         font-size: 1.3em;         text-align: center;         line-height: 1.5em;         font-weight: bold;         color: #aa0000;         border-bottom-width: 2px;         border-bottom-style: solid;         border-bottom-color: #aa0000;         margin-bottom: 5px;     }     .gdpc-side .main-image {         border-width: 1px;         border-style: solid;         border-color: #999999;         padding: 10px;         margin-bottom: 10px;     }     .gdpc-side ul.gdpc-links {         margin: 0;         border-width: 1px;         border-style: solid;         border-color: #999999;         padding: 10px;         list-style: none;         margin-bottom: 10px;     }     .gdpc-side .gdpc-companies,     .gdpc-side .gdpc-taxonomies {          margin-bottom: 10px;     }     .gdpc-side .gdpc-companies h5,     .gdpc-side .gdpc-taxonomies h5{         margin: 0px;     }     .gdpc-side .gdpc-archive-link {         text-align: center;         font-size: 0.9em;         background-color: #eeeeee;         margin: 0 0 5px;         line-height: 1.8em;     }


title: Wordpress plugin page database connection not working

text:
I am working on wordpress plugin that has option to upload multiple images from wordpress backend and i a using this http://hayageek.com/examples/jquery/jquery-multiple-file-upload/index.php jquery plugin to for it and my problem is when uploading i try to insert databse query and it seems to be not working.. **my uploaded script**               <link href="https://rawgithub.com/hayageek/jquery-upload-file/master/css/uploadfile.css" rel="stylesheet">
Upload

                                               and this is my php code process after submit                   <?php     $output_dir = "uploads/silde/";          if(isset($_FILES["myfile"]))     {         $ret = array();              $error =$_FILES["myfile"]["error"];         //You need to handle  both cases         //If Any browser does not support serializing of multiple files using FormData()          if(!is_array($_FILES["myfile"]["name"])) //single file         {             $fileName = $_FILES["myfile"]["name"];             move_uploaded_file($_FILES["myfile"]["tmp_name"],$output_dir.$fileName);             $ret[]= $fileName;         }         else  //Multiple files, file[]         {           //$fileCount = count($_FILES["myfile"]["name"]);           $up_url="/wp-content/plugins/fxtsystem/uploads/silde/";           for($i=1; $i < 6; $i++)           {             global $wpdb;             $up_url.=$fileName;                  $query_to_hotel = "INSERT INTO tel_images (hotel_id,slide_id) VALUES (1,1)";              $wpdb->query($query_to_hotel);                   $fileName = $_FILES["myfile"]["name"][$i];             move_uploaded_file($_FILES["myfile"]["tmp_name"][$i],$output_dir.$fileName);             $ret[]= $fileName;                }              }                }      ?>


title: Moved Wordpress from /blog/ to root but pages under /blog/ are still visible

text: I installed Wordpress in the subdirectory /blog/ and I created all the website there, then instead of moving all the wp files in the root I followed http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory to have wp accessible from the root. The structure of my website is:   * mywebsite.com   * mywebsite.com/work/    * mywebsite.com/blog/    * mywebsite.com/food/  /work/, /blog/ and /food/ are 3 custom page templates that show a list of posts with a specific category. Everything works great, but I found out that the old website structure was still visible from google and even accessible:   * mywebsite.com/blog/   * mywebsite.com/blog/work/    * mywebsite.com/blog/blog/    * mywebsite.com/blog/food/  As you can see one of the section of my new website was blog, so I moved Wordpress from /blog/ to /wp/. The problem remains, in fact now if I type mywebsite.com/blog/ or mywebsite.com/wp/ I can see in both the link the homepage, but I want only the actual structure to appear. I created and sent via google webmaster tools the new xml sitemap but it seems that the old structure is still visible on google search, and I cannot delete the mywebsite.com/blog/... with Google URL Removal because it says to me that there's content in there. What could I do? Could one solution be to redirect mywebsite.com/wp/ to mywebsite.com? But there is still the problem of mywebsite.com/blog/ that I cannot redirect because one of my sections is /blog/, and /blog/work/, /blog/blog/ and /blog/food/ shouldn't exist anymore because I changed the folder in /wp/, instead I can see them... I'm sorry if a similar post exists, English is not my first language so maybe I haven't used the right words to search in google/stackexchange.


title: Template directory in plugin

text: I have a custom dashboard plugin with one of the sections containing useful links. One of them should directly point to the documentation that comes with a template. This documentation is in the theme directory. Now I've tried different ways to get the path using for example:               <?php get_theme_root_uri(); ?>/mytheme/documentation/index.html      or               <?php get_template_directory_uri() ?>/documentation/index.html      but it outputs a URL to the homepage (`http://127.0.0.1/documentation/index.html`) instead of full path to this file. Any advice?


title: Problem Wordpress redirection?

text: In my blogsite, we can view blogs from `example.com/blogs/`.   In each blog, all related tags are displayed from `example.com/blogs/tags/my_tag/`.   In tags page, there is pagination. If next is clicked in pagination, then `example.com/blogs/tags/my_tag/page/2` is appears. It displays all blogs?   Why?   Solution? I am using All in One SEO plugin for SEO and WP-PageNavi plugin.


title: Track logged in users with Universal Analytics

text: I am not versed in php, but I am attempting to setup google analytics to track logged in users based off user role. I found a few plugins that do it, but, from what I have found, its all based on ga.js. I setup a custom dimension with a scope of 'Visitor' in my analytics account. Now my code is as follows:               // making sure the session is started at wordPress initialization and destroying it at the logout step.     function gaStartSession() {        if(!session_id()) {         session_start();        }     }          function gaEndSession() {         session_destroy ();     }          add_action('init', 'gaStartSession', 1);     add_action('wp_logout', 'gaEndSession');          // Getting user role at login and saving it to the session     function gaGetUserRole($user_login, $user) {         $_SESSION['gaUsrRole'] = $user->roles[0];     }          add_action('wp_login', 'gaGetUserRole',10,2);          // echo the google custom variables to each page     function gaSetCustomVariables () {         echo "<script>var dimensionValue = '" . $_SESSION['gaUsrRole'] . "'; ga('set', 'dimension1', dimensionValue);</script>";     }          add_action('wp_footer', 'gaSetCustomVariables');      So my questions is, does this look correct? Is there a better way of accomplishing this? I have compiled this from different sources on the web. I'm not sure about `$user->roles[0];` because i believe its referring to the user levels that was deprecated. Correct me if I'm wrong. I am waiting at the moment for users of my site to login, and for analytics to report on recent activity. Any suggestion/code example is appreciated.


title: How do I display the post_title with get_permalink?

text: I want to display the post title instead of the link to it with get_permalink. `get_permalink($comment->comment_post_ID)` only shows the link to the post!


title: making the [...] clickable

text: Im creating my first blog using wordpress. LOCATED HERE. I have created a child theme for twenty twelve. In this child theme I have added a content.php and have copied and pasted the entire parent content.php and pasted it in to the child theme version. I have changed this line.               <?php if ( is_search() ) : // Only display Excerpts for Search ?>      with this one               <?php if ( is_search() || is_archive() || is_author() || is_tag() || is_home() ) : // Only display Excerpts  ?>      this reduces the post on my home page and added [..] to the end of it which is what I wanted it to do. however. what I want now is for the [..] to be click able. So that it goes to the full post. Just like it does when you click the title. please can someone advise me on how to do this? thank you.


title: How to achieve two different excerpt types on one WordPress site?

text:
Working on a client site that displays a blog excerpt on the blog page (which shows 5 posts per page) and the main home page (which shows the latest 3 blog posts). The trouble is I want different layouts for the excerpt. The client will always have an image/video in each post, so would like to grab this and display on the excerpt. Here is an image of the two layouts I am trying to achieve... https://dl.dropboxusercontent.com/u/94593656/excerpts.jpg The right layout for the blog page is fairly simple. I bring the image/video content into the excerpt by using the Advanced Excerpt plugin, however I am not sure how to achieve the left layout for the home page. Notice how the image/video and text is separated, so I cannot just call the_excerpt. Is there a way to bring the image/video and text in separately? What would be the best way to do this? To give you an idea, this is what I currently have for the markup for the home layout but the image is not yet dynamic, and the excerpt text is not there yet...               <?php $my_query = new WP_Query('showposts=1');               while ($my_query->have_posts()) : $my_query->the_post(); ?>
           <img class="block" src="<?php bloginfo('template_url'); ?>/assets/images/pic1.jpg" alt="">

                <time datetime="<?php the_time('Y-m-d') ?>"><?php the_date('jS F Y') ?></time>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
                <a href="<?php the_permalink(); ?>" class="viewp">View post →
         <?php endwhile; ?>      Any help would be greatly appreciated


title: How do I custom code the start page?

text: I'm pretty experienced in development in general, and also did some PHP coding to generate hmtl pages. I've also got a running WordPress blog with a number of posts. As a start, I want to "generate" the index page (the first page the user sees when coming to my domain). I can probably code that in PHP, but I'm not sure where to "put" this PHP code within my WordPress site. (I want to re-use the general design of the site.) Later, I want to have other "types" of pages that I generate in code (e.g. a user form and - based on the input - generated result pages). Probably a totally noob question ;-) but I'd appreciate any pointers (also blogposts, books etc.). Thanks!


title: Get user_meta values for a user for an array of meta_keys?

text: I would like to retrieve the `meta_values` for an array of `meta_keys` for a user. Is there a function in WordPress core that offers this functionality? Something that would work like this:               $array_of_keys = array( 'key_1', 'another_key' );          $values = get_user_meta_array( $user_id, $array_of_keys );      And values would maybe be an array like this:               array(         'key_1'       => 'some value',         'another_key' => 5,     );      I could easily write a custom function to do this, but I would rather do it 'the WordPress way' if there is one. Thanks.


title: WordPress Meta Query: Relation is not working correctly

text: I make a custom search box and let user do search. I have added required field to my editing panel by custom meta box. I have a post which have some meta data like London as place and 13021 as post code. I want result when `kawsar_pa_place` = london and `kawsar_pa_pc` = 13021. For that cause, i use `'relation' => 'AND'`. But i got **0 result found**. I made query by following argument:               $args = array(       'cat'=> '3',       'posts_per_page' => '4',       'orderby' => 'rand',       'paged' => $paged,       'meta_query' => array(           'relation' => 'AND',           array(             'key' => 'kawsar_pa_place',             'value' => 'dhaka'           ),            array(             'key' => 'kawsar_pa_pc',             'value' => '1362',             'type' => 'numeric',             'compare' => '='           )        )     );      If i set `'relation' => 'OR'`, it is working fine. But i want result if all are matched. I also tested with `BETWEEN`, it also work fine. Please help me. Thanks.


title: How to get the title of the item that is clicked on

text:
### Situation: I've created a custom post type for events, visitors can sign up via a form. The form pop's up inside of a modal when the attend button is clicked. As you can see, I'm using a hidden input field with the get_title() function to send with the form so I know what event the user is attending. The code for this added to this post. ### Problem I'm showing 4 events on the page. This code always echo's the title of one event, not the title of the event that is clicked on. For example: If I click on event1, it echo's the title of event3, if I click on event2, it also echo's the title of event3. ### Question How can I get the `get_title()` function, or something else, to echo the title of the event that is clicked on?
       <?php       query_posts('post_type=agenda&order=DESC&posts_per_page=2');       if ( have_posts() ) : while ( have_posts() ) : the_post();       ?>
                               <?php the_post_thumbnail('agenda-img', array('class' => 'fit')); ?>

<?php echo get_post_meta($post->ID, "_date", true); ?>

<?php echo get_post_meta($post->ID, "_month", true); ?>

<?php echo get_post_meta($post->ID, "_location", true); ?>

<?php the_title() ?>

<?php the_content(); ?>

       <?php endwhile; endif; ?>

       <?php       query_posts('post_type=agenda&order=DESC&posts_per_page=2&offset=2');       if (have_posts()) : while (have_posts()) : the_post();       ?>
                               <?php the_post_thumbnail('agenda-img', array('class' => 'fit')); ?>

<?php echo get_post_meta($post->ID, "_date", true); ?>

<?php echo get_post_meta($post->ID, "_month", true); ?>

<?php echo get_post_meta($post->ID, "_location", true); ?>

<?php the_title() ?>

<?php the_content(); ?>

       <?php endwhile; endif; ?>

             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
Attend

Call to action text
            <form role="form-horizontal" id="eventform">
                <input type="hidden" class="form-control" id="text" value="<?php the_title() ?>" name="text">

                <input type="email" class="form-control" id="email" name="email" placeholder="E-mailadres">
              <button type="submit" id="eventform" class="btn btn-primary btn-lg">Send</button>            </form>

Company name


title: Custom Menu Broken WP 3.8.1 Update

text: Custom menu has stopped working since upgrading to 3.8.1. When trying to add items from the left they do not show up as movable items as they should do under Menu 1, however the text changes to: "Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.". Clicking Save then takes me back to Screenshot 1 i.e. nothing is saved (See Screenshots 1 & 2) ![Before adding item](http://i.stack.imgur.com/JVRm4.png) ![After adding item](http://i.stack.imgur.com/Bx8cv.png) Things tried:   * Disabled all plugins   * Reinstalled WP from wp-admin/update-core.php   * Changed to default theme   * Repaired tables in PhpMyAdmin   * Deleting this menu and created a new one Solution: I'm not sure what was wrong with it but I previously upgraded from quite an old version? I did a fresh install of Wordpress and imported posts, pages, plugins etc. Working now, maybe the old structure screwed it?


title: How to add share buttons in single.php?

text: In Settings->Sharing, the admin of a site can decide what share buttons to add to every posts, ex: Facebook, Twitter, etc. I am coding single.php and I can't find what to insert to show those social media buttons...


title: wp_editor on input changes content

text: I have a text area using wp_editor On first input it works great. Save via text or visual it saves to mysql just fine this is what is in the text area before I save               Designed with a low arch, which promotes weight transfer by lowering the ride height at the rear of the vehicle.     Very high spring rate which aids in transferring weight quicker and planting the rear tires.      bringing it into the textarea I get curly quotes... text chopped (see alt tag).. ... picture does not load...               Designed with a low arch, which promotes weight transfer by lowering the ride height at the rear of the vehicle.          Very high spring rate which aids in transferring weight quicker and planting the rear tires.                 notice the extra lines and a hardspace and extra line also Then if save again and come back to double curly quotes.   notice the extra lines and a hardspace and extra line also Now and unless I fix everything and redo the picture it is no longer working. So you can't edit you have to redo So I am pretty sure it is changing when loading to the edit area so I have tried on the wp_editor call               wp_editor(html_entity_decode(stripcslashes($content)), 'content', $settings);     wp_editor(html_entity_decode($content), 'content', $settings);     wp_editor(stripcslashes($content), 'content', $settings);          $settings = array(         'tinymce'       => array(             'setup' => 'function (ed) {                 tinymce.documentBaseURL = "' . get_admin_url() . '";             }',         ),         'quicktags'     => TRUE,         'editor_class'  => 'frontend-article-editor',         'textarea_rows' => 25,         'media_buttons' => TRUE,     );      I have tnymce advanced installed. would those setting make this happen.


title: Execute a shortcode when clicking on a image

text: I asked this in stackovorflow under javascript and was informed not possible so I trying here I have a shortcode for a opt-in form and I want it to pop up when a image is clicked I tried the function in both the `Header Scripts` and my `functions.php` file.               <img src="someimage.png" onclick="executeShortCode()" />           <script>      function executeShortCode() {     <?php echo do_shortcode('[yourshortcode]'); ?>     }     </script>


title: Show recent posts thumbnail inside menu

text: I'm trying to develop a menu bar for a theme that, when the admin adds a category as a child on the menu, it displays the recent posts of that category. Example: I have a menu called "jobs" which has the submenu "industry" that displays the most recent posts (with thumbnails) on the right. Resuming, I want to create a menu like Business Insider. By now I have this code:   Category menu item and its last 10 posts as sub-menu I don't understand how to add thumbnails to that code and, most importantly, I can't realize how to change the style of the menu via that code.


title: Need help using a filter on the default Categories widget

text: I need to add the "All Categories" item to the default WP categories widget. I can see that there's a filter that I can hook into in the core (line 485 default-widgets.php).               wp_list_categories(apply_filters('widget_categories_args', $cat_args));       I've written the following function, but I must have something wrong as it's not adding the all categories item to the list.               // Add "All Categories" to categories widget     function add_all_categories_to_widget($cat_args) {         $cat_args['show_option_all'] = 'yes';         return $cat_args;     }     add_filter('widget_categories_dropdown_args', 'add_all_categories_to_widget');      Can anyone fill me in on what I've got wrong? Thanks!


title: Get term name from term ID?

text: I cannot figure out how to get the taxonomy term name if I have the taxonomy term's ID. This is my current code               // create a dropdown menu of the quantity taxonomy      wp_dropdown_categories(          array('taxonomy' => 'quantity_category', 'name' => 'productQuantity', 'hide_empty' => 0)     );           $quantityTerms = $_POST['productQuantity'];     $quantityTax   = 'quantity_category';      The value of `$quantityTerms` is not the "name" of the quantity but the ID of the quantity category. When it sets the object terms, it creates a new category called "ID#" and not inserting it into the category by name.               wp_set_object_terms( $post_id, $quantityTerms, $quantityTax, $append );


title: How do I make a shortcode?

text:
Learning as I go... I have this functionality built, but I need it as a shortcode. How do I do that?               $args = array( 'taxonomy' => 'product_cat' );     $terms = get_terms('product_cat', $args);          $count = count($terms); $i=0;     if ($count > 0) {         $cape_list = '
';         foreach ($terms as $term) {             $i++;             $term_list .= 'slug . '" title="' . sprintf(__('View all post filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '';             if ($count != $i) $term_list .= ' · '; else $term_list .= '
';         }         echo $term_list;     }


title: Why tinyMCE.editors doesnt work on tinyMCE

text: <?php      /*     Plugin Name: Taggr     Plugin URI: http://example.com/wordpress-plugins/my-plugin     Description: Premium plugin for image and photo tagging     Version: 1.0     Author: Tee Kai Yang     Author URI: http://wrox.com     License: GPLv2     */               add_action('init', 'register_tagging_post');          //create taggr post type           function register_tagging_post(){                 $tagging_args = array(                'public' => true,                'supports' => array(                    'title',                    'thumbnail'                     ),                 'query_var' => 'tagging',                'rewrite' => array(                   'slug' => 'taggr',                   'with_front' => false                ),                 'labels' => array(                 'name' => 'Taggr Albums',                 'singular_name' => 'Album',                 'add_new' => 'Add New Album',                 'add_new_item' => 'Add New Album',                 'edit_item' => 'Edit Album',                 'new_item' => 'New Album',                 'view_item' => 'View Album',                 'search_items' => 'Search Albums',                 'not_found' => 'No Albums Found',                 'not_found_in_trash' => 'No Albums Found In Trash'             ),                  'menu_icon' => plugins_url() . '/taggr/images/PhotoAlbum.png',                  'menu_position' => 80,                  );                 register_post_type('tagging', $tagging_args);                }              add_action( 'add_meta_boxes', 'taggr_create_meta' );      function taggr_create_meta(){               add_meta_box( 'taggrMeta', 'Upload and edit photos/images', 'taggr_meta_function', 'tagging', 'normal', 'high' );               function taggr_meta_function(){                    ?>                 <?php wp_editor("Enter your text", "my_editor"); ?>              <script>         window.onload = function(){             alert(tinyMCE.editors[0].getContent());         }         </script>                  <?php              }                   }               ?>       Above is my code, I created a custom post and a tinyMCE text editor inside a metabox. But why when execute `alert(tinyMCE.editors[0].getContent());` line, it doesnt work and does not shows the content of the editors. The firebug shows the error of `TypeError: tinyMCE.editors[0] is undefined`


title: Wordpress query_posts by tag doesn't work anymore(?)

text:
I had this code running fine forever. Some days ago it just started outputting nothing (just the `<ul></ul>`). No errors in logs:
     <?php query_posts('tag=pp&showposts=4'); ?>     <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?>
          <?php endwhile; ?>
      Of course there are posts with that tag.


title: Remove "show sharing buttons" metabox JetPack from custom post type

text: I have installed JetPack and now my custom post types feature a meta-box that says "Sharing: Show sharing buttons" with a checkbox. This is unnecessary for this custom post type and I would like to remove it altogether (not just hide it via screen options). I tried adding               add_action( 'init', array( $this, 'my_remove_filters_func' ) );          function my_remove_filters_func() {         remove_all_filters( 'the_content', 'sharing_display',19 );         remove_all_filters( 'the_excerpt', 'sharing_display',19 );     }      however it doesn't seem to be working


title: How to *disable* the post content editor

text: Any good ideas on how to _disable_ the post content editor? I don't want to hide it, remove it, or remove the page. The goal is to allow users with few permissions to view the edit screen so they can read the content, but not be able to make changes to the content. (I also need to figure out how to disable other elements on the page, but one step at a time). I've done this with Javascript already by just targeting the textarea and added `disabled`, but looking for a less flimsy method. Background for why I need this: https://github.com/post-forking/post- forking/pull/105


title: Photo gallery on profile page?

text: Is there a way, (or a plugin), that allows members to have their own photos on their profile page? I want to limit the amount of photos to perhaps 50. Any suggestions??? Thanks in advance!!!


title: What for is the table "wp_commentmeta" exactly?

text: I have been reading about the Database Description of Wordpress. I haven't understood the meaning to the use of the table `wp_commentmeta`. The documentation says: > Each comment features information called the meta data and it is stored in > the wp_commentmeta. I have a fair idea of what meta-data is. I know how the table `wp_postmeta` stores custom field, for example. But in the case of the comments, I don't understand:   * What kind of information would go in this table?   * Why wouldn't it be in the same `wp_comments` table?   * What is a practical example of how someone would use it, so that I could test it out and have a more graphic idea of how it works?


title: How can I allow users to make groupings of posts

text: I have a site with many research methods. I want to introduce the abilities for users to create groups of posts and save them for others to access, as a way to make the methods more meaningful for different types of people and applications. Any advice for achieving this. The site is http://www.designmethodsandprocesses.co.uk I want front end users to do it. The best analogy would be user-generated playlists.


title: Stop Attachment image names from taking top level permalink

text: I don't know why but images uploaded to my site in posts are getting a top level permalink. So if I upload an image into a post called "Apple" then it gets an attachment page at mysite.com/apple and that is a big problem for me. How can add a path between my top level and image attachment page name?


title: Fallback image size when using wp_get_attachment_image_src / full size compressed image

text: I am using ACF to pull images using ‘wp_get_attachment_image_src’ as such:               <?php $image = wp_get_attachment_image_src(get_field('image'), 'large'); ?>     <img src="<?php echo $image[0]; ?>" alt="" />      Whatever image size I enter (here it is ‘large’, but it could be a custom image size), if the image that has been uploaded was smaller than the set size, that size will not have been created and Wordpress will use the full, original, uncompressed image as a fallback. This is very undesirable, as the image will often have no compression and be a very large filesize unnecessarily. What are the workarounds for this? Can I make Wordpress create a full pixel- size, yet jpeg compressed image and make it use that as the fallback? Thanks in advance for your help!


title: Slider Issues using MetaBox Plugin

text:
I'm just now joining a previously launched project. The home page slider is a custom meta_box type from the MetaBox plugin. Here is the code to add the fields.               $meta_boxes[] = array(         'id' => 'homesliderimages',         'title' => 'Slider Images',         'pages' => $post_types,              'fields' => array(             array(                 'name'  => 'Slide Images',                 'desc'  => '940 x 412 images (jpg)

To adjust the link, click Edit and adjust the media information.',                 'id'    => "{$prefix}slideimagesnew",                 'type'  => 'image',                 //'force_delete' => true             ),             // Other fields go here         )     );      The images load into the slider fine. My issue is in the WP admin section. When the client tries to rearrange the sliders my dragging them, they appear to be reordered. But when the client hits update, the order goes back to the original order. **This is the a screenshot for when you're adding images in the admin section** **Before Reordering**   ![before reordering](http://i.imgur.com/YUSbsqs.png) * * * **After Reordering, Before Save** ![after reordering, before save](http://i.imgur.com/bStcZH5.png) * * * **After Reordering, After Save**   ![after reordering, after save](http://i.imgur.com/YUSbsqs.png) Also, as you'll notice in the images: there are lots of blank images. I can't I get an javascript alert that says undefined whenever I click 'delete' on the image. Any advice?


title: What files to keep after upgrading WordPress?

text: We were recently handed a few blogs/sites to support, that have started way back when wordpress was on v2.1.3 or even 2.0.4 After upgrading the sites to the latest versions (3.4.2 and 3.5) we found that there are files in the root directory as well as the /admin and /includes that are "leftovers" from the older versions or have been relocated in these recent versions. Here is an example of what I am talking about: ![updated installation - new installation](http://db.tt/GpLJr5P9) Some files state: _"This file is deprecated and only exists for backwards compatibility"_ So... What do you think? Should one just delete these files and go for a beer!!! Should they be left there? Any concrete/tested answers on the subject? PS: I am aware of the this post but not quite happy with the answers provided there. Especially when combining this present question with this one about dbdelta. So I am kind of reopening the issue (if I may do so) hoping for a more definite answer.


title: Sort post by last commented

text: I tried this :               <?php if ( have_posts() ) : query_posts(array('orderby_last_comment' => true)); ?>      But it's not working


title: How can I add a jQuery OnClick event to the Publish posts button?

text: I want to add a simple confirmation event to the Publish posts button, so when my client hits "Publish" it will ask him if he's sure, to which he clicks "Yes" or "cancel" and the post then publishes or doesn't. I'm new to WordPress...or at least I've only done theme and limited plugin programming. I did find the metabox code for the "Publish" button in `edit- form-advanced.php`:               add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', null, 'side', 'core');      But to accomplish this, I suspect I'll need to add the jQuery code elsewhere - preferably in my theme. For site-specific reasons, I cannot add new plugins to this installation so any changes need to be confined to my theme's `functions.php` file.


title: Plugin templates vs Parent Theme

text: I've been building a plugin using a WooCommerce like template system, where the plugin houses the default templates, but allows for overriding via a template folder in your active theme.   It just occurred to me that another option would be to use a base parent theme just for markup, and then build child themes with different styling options. I'm trying to figure out what the pros and cons of both approaches are for development and for the user – or if there are other options. The plugin is designed to be a self contained system, so I could see that being in favor of using a parent theme. But if it ever becomes a plugin that's distributed, I see how using a plugin template system could be more advantageous. How should I provide the templates needed for my plugin?


title: Pagination with custom query, custom search form, single and pages, ajax and no plugins

text: I've read a lot of posts here about pagination with custom queries and tried the suggested answers (like this one). It seems however that my situation is a little more complex, and in the existing questions people often mention pagination plugins which I don't want to use (if possible). I have a custom search form. The action URL and destination (results page) of the search form can be a page or one of several singular custom post type pages. This is all working as expected. The pagination works when I directly go to the results page, but it doesn't when I use the custom search form to input values. It does output the correct results though, because when I set `posts_per_page` to `-1` I can see the correct results. **The problem** The thing is that when I click a page number, the div where the page should be loaded (through AJAX) stays empty. **The code** On the results page I have a custom query, which uses input from the search form:               $query = my_function($v1, $v2, $v3, $v4);      The arguments for the query are defined in the function:               function my_function($v1, $v2, $v3, $v4) {              // The $v variables are used to create $args. It's a lot of code and there are several versions of $args. I'm not displaying this information here because the query itself is working like I've described above.               $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;              $args = array(             'post_type'         => 'events',             'post_status'       => 'publish',             'posts_per_page'    => 20,             'paged'             => $paged,             'meta_query'        => array($meta_query),             'meta_key'          => 'date_from',             'orderby'           => 'meta_value',             'order'             => 'ASC',         );              return new WP_Query($args);     }      Then on the results page, after $query is defined:               if($query->have_posts()):     while ($query->have_posts()): $query->the_post();        // Do stuff here     endwhile;          echo create_pagination($query);          endif; wp_reset_query();      The pagination function:               function create_pagination($query) {              $big = 99999999;              $args = array(             'base' => str_replace($big, '%#%', get_pagenum_link($big)),             'format' => '/page/%#%',             'total' => $query->max_num_pages,             'current' => max(1, get_query_var('paged')),             'show_all' => false,             'end_size' => 1,             'mid_size' => 2,             'prev_next' => true,             'prev_text' => '',             'next_text' => '',             'type' => 'list'         );              return paginate_links($args);          }      And to top things off and make this even more complex :-), the code to use AJAX on pagination:               $('.listcontent').on('click', '#pgn a', function(e){             e.preventDefault();             var link = $(this).attr('href');             $('.yt-listcontent').fadeOut(300, function(){                 $(this).load(link + ' .listcontent', function() {                     $(this).fadeIn(300);                 });             });         });      Please note: like I've described the query is working as expected, also when the using the custom search form. The pagination js above is also working. Like described for the query, the js works when I go to the results page and don't enter information into the search form. What happens is that when I enter information into the custom search form, the pagination is created (and the links also point to `example.com/thecurrentpage/page/pagenumberhere`) and shows up, even with the correct page links. But when a page link is clicked, the `.listcontent` div stays empty (fade effect is visible though). I think there's something wrong with my pagination settings and while I believe my form and query is right, the pagination is still a bit abracadabra to me. **UPDATE** After trying the code from this post as was suggested, the problem is still the same. The solution there uses the search query (hence the `global $wp_query`) so I think the problem has to with the custom query.


title: Daily class register with monthly invoicing

text: I'm about to take on the task of creating a daily class register the features of which I have listed below. I am mostly a novice when it comes to wordpress development and I can do some PHP programming but combining the two I'm finding difficult to understand where to start this task. could anyone at least let me know everything I would need to do this, whether free plugins exist to accomplish the task or whether there are tutorials I can follow to do this myself and how I can lay it all out. Thanks   * Protected area (staff only)   * 2 class rates (1 to 1 (charged hourly) and group (charged daily)) with ability to edit the price of each rate   * add/remove/edit class members   * Staff enter the number of hours each person attended that day and at which rate to charge each person   * over-time is charged at minimum of half an hour if more than half an hour then person charged for full hour   * at the end of each month a printable invoice is created for each person based on the daily register detailing the dates and the total monthly charge payable


title: Detect 404 before headers are sent

text: I've a piece of code that shows a banner the first time a user visits, then sets a cookie, which prevents it showing again. However, if the page has a 404 error, the 404 page of the requested resource sets the cookie and the banner is not shown. Checking `is_404()` on the init hook does not avoid this situation. So how do I correct this problem and detect the 404 on the init hook?


title: How can I update custom database table in woocommerce after the successful payment

text: I am not sure with this. I want every quantity of each order to have equivalent voucher code in custom table TIA!               add_action('woocommerce_checkout_order_processed', 'update_vouchercode');          function update_vouchercode($order_id) {            $order = new WC_Order( $order_id );            $limit = count( $order->get_items() );                 $data = array(            'order_id' => $order_id,        );                 $update = $wpdb->update('tbl_voucher' , $data, "WHERE order_id ='0' LIMIT $limit");      }


title: set cookies for my whole site is not working

text: I'm trying to set the cookie to my site to **hide a div on click action**. Description of the problem.   1. I wanna set the cookie for the whole site not for particular page. I'm setting the cookie `on click` the div by  > jquery-cookie.js   1. when I'm clicking the div on home page the div is invisible throughout the site. but if I'm trying to remove my div on other page it is not invisible throughout the site.   2. I've tried the following functions of the **wordpress codex** `site_url()` `get_site_url()` `home_url()` `get_option('home')` by these methods I've named the **domain** but it is not working. I've also tried `/` for the domain name it is also not working. these all are not working for me. please suggest me some other method to do that. My plugin site consist of 4 pages url as follows               site/wordpress/     site/wordpress/contact-us-2/     site/wordpress/sample-page/     site/wordpress/test-page/


title: How to split existing blog into Wordpress Multisites without breaking links?

text: I am going to split an existing Wordpress blog with a lot of posts in different languages into multisites which get all posts of one language each. The multisites will be available under different subdomains then. For example `en.example.com`, `de.example.com` and `fr.example.com`. So the URL of all existing articles will change. This is an issue because the old links are indexed by Google and linked by other pages. Does the multisite feature handle old links e.g. `www.example.com/an-english- article` by redirecting to the new article e.g. `en.example.com/an-english- article`? It would be great if the server could send `301 Moved Permanently` responses so that Google can update their index accordingly. How is this handled by Wordpress multisite, and if it isn't properly, how can I set up 301 codes and redirects to the new article by a plugin or even by hand?


title: Is there a way to measure server resource (CPU) usage by WP plugins?

text: I have a website who is having a high CPU usage. The only way I know of it, is the information I get from the support people of the hosting company. Is there any other way for me to become informed of the resource usage done by my website? (specifically the plugins, but not only them) Thanks.


title: Conditional for a Single Post That Belongs to a Category?

text: I have categories like `gaming` and `movies` on my website and when a user visits any of these categories the content in the sidebar is displayed depending on the category they are in. So gaming content for the gaming category, movie related content for movies. When a user selects a post in either of these categories, I have it defaulting to the sidebar that displays on the home page since I don't know how to keep the sidebar displaying the same content that is on the category pages. The closest I could get would be something like `<?php if ( is_single() ) : ?>`. How would I add `is_category( 'gaming' )` so it can target a `single page` (single.php) that belongs to the category `gaming?`


title: Fetching full size featured image to insert in RSS Feed

text: I am trying to fetch a full size Featured Image (or first image) of the post to appear within my RSS feed. See here I am using the following code               function firstImg( $post ) {         $matches = array();         $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches );         if ( isset( $matches[1][0] ) ) {             $first_img = $matches[1][0];         }              if ( empty( $first_img ) ) {             return '';         }         return $first_img;     }     add_filter('the_excerpt_rss', 'firstImg');      However, this is only fetching a 200x200 thumbnail size of the image. I want to use the full size which is 600px width. What's missing in the code? Thanks


title: Exclude pages in archives results

text: So, i got a custom post type applied to different posts and also a page. When i display this page, it shows some content (text), and at the bottom a link to get the list of the products related to this page (thanks to the CPT also applied to the page). The link is called like this:               echo get_the_term_list( $post->ID, 'prod-cate', 'Products of the cateogry: ', ', ', '.' );       When i hit this link, it displays an archives page with the products but also the page i'm comming from. The question is, how not to display this page in the archives results?


title: free web host for wordpress blog

text: I like to host a wordpress blog via free hosting services. **Is there any frre web hosting site host the wordpress blog. Please help me.** Thanks in Advance...


title: Invision + Wordpress integration

text: I'm trying to integrate Invision Power Board into our website, Wordpress by using IPB Website Integration (IPBWI). I have used the script sometime before on a static website, but I'm having trouble with the integration in Wordpress. The script is actually working as intended in Wordpress, but I am getting a lot of warning-messages throughout the site, like this:               Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsFields() should not be called statically in [path]\wp-includes\plugin.php on line 220     Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsJoin() should not be called statically in [path]\wp-includes\plugin.php on line 220     Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsOrderby() should not be called statically in [path]\wp-includes\plugin.php on line 220     Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method RCCWP_Query::FilterCustomPostsFields() should not be called statically in [path]\wp-includes\plugin.php on line 220      It is mainly where I have custom queries I get these warnings This might be beyond the scope of support witch this board gives, but hopefulle someone might know some solutions.


title: Creating external apps Wordpress / How they work

text: I was wondering how does external app works for `wordpress.com` or `wordpress.org`. Directly connecting to the wordpress database seems a bad idea to me. Questions   * How can I create an app or get / post data from the wordpress database?   * Is there a JSON API or XML API format so that I can easily exchange data between the two?


title: Does WP, php, or a current framework (woofoo / genesis, etc). Offer a way to schedule text / bg color changes?

text: I would like to build a site for a religious group that follows a Church calendar year that highlights seasons by different colors. Is there a way with existing WP / php / css / framework to schedule a different color profile for a theme based on the date? casey


title: How to change the CSS in one file?

text: Should I go to many files to change the appearance of Wordpress? Isn't it possible to change it form one file? And what should I learn from CSS to be able to modify Wordpress easily? I mean should I reach to an advanced level?


title: Setting up a members area

text: I am trying to set-up a members area on a site, I have already come up with one solution but was wondering if anyone one knows of an easier or better way to go about it. The problem is the user doesn’t log into WordPress, they are sent to a separate product for bookings and such. The way I have accomplished this is having two separate themes the guest theme, which blocks all category posts aside from one and only has links to a couple of specific pages and the members theme has access to everything. Once a user logs into the separate product all the links link back with a theme switch using (site.com/?wptheme=memberstheme) with a one hour time limit which resets to the guest theme, thus logging them out after one hour. Is there a better way to go about accomplishing this?? or a good plugin?? Thanks


title: wp-admin - save options without refreshing?

text: I have my own plugin options page, but when users hit "Save" button the whole page refreshes. Is there a way of changing my script below to something that will for example popup yellow box saying "settings saved" WITHOUT page refresh? So the data will be passed trough ajax call or something like that. I've seen something like that before, but can't recall for what plugin.               add_action('admin_menu', 'my_plugin_menu');          function my_plugin_menu() {              add_menu_page('My Plugin Options', 'Plugin Options', 'manage_options', 'my-unique-identifier', 'my_plugin_options');           }          function my_plugin_options() {            if (!current_user_can('manage_options'))  {         wp_die( __('You do not have sufficient permissions to access this page.') );       } ?>          <form method="post" action="options.php">     <?php wp_nonce_field('update-options'); ?>     (...)     <input type="hidden" name="action" value="update" />     <input type="hidden" name="page_options" value="option1,option2,option3,etc." />     <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />     </form>


title: How can I reduce the amount of files loaded/included per plugin?

text: I have a Wordpress site that uses several plugins, namely 8. Most of these plugins include a lot of their own JS and CSS files, some even include so much as 3 separate CSS files. One can imagine that this does a number on the amount of HTTP requests and thus the load time. Many of these plugins also only get used on certain pages, yet the JS or CSS is still loaded on pages where they are not used. All of theses files are included automatically in the through WP_head();. Is there a way I can manually include these files and then load them conditionally? Preferably without having to adjust the plugin code itself? Are there other common practices regarding the many files included by a bigger number of plugins?


title: How to move wp-admin login page to another location?

text: It can be another layer of security..


title: Post loop created via shortcode not displaying shortcode in content

text:
I've been racking my brain on this. Here is a shortcode loop I've created to display a specific post type:                   function faq_shortcode($atts, $content = NULL) {             extract(shortcode_atts(array(                 'faq_topic' => '',                 'faq_tag'   => '',                 'faq_id'    => '',                 'limit'     => '10',             ), $atts));             $faq_topic = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $faq_topic);             $faq_tag = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $faq_tag);                 $faqs = new WP_Query(array(                     'p'                 => ''.$faq_id.'',                     'faq-topic'         => ''.$faq_topic.'',                     'faq-tags'          => ''.$faq_tag.'',                     'post_type'         =>  'question',                     'posts_per_page'    =>  ''.$limit.'',                     'orderby'           =>  'menu_order',                     'order'             =>  'ASC'                     ));                 $displayfaq= '
';                     while ($faqs->have_posts()) : $faqs->the_post();                     $displayfaq .= '
';                     $displayfaq .= '
'.get_the_title().'
';                     $displayfaq .= '
'.get_the_content().'
';                     $displayfaq .= '
';                     endwhile;                 wp_reset_query();                 $displayfaq .= '
';             return $displayfaq;             }          add_shortcode('faq','faq_shortcode');      within one of those loops there is a post that has a shortcode being used               function emailbot_ssc($atts, $content = null) {             extract( shortcode_atts( array(             'address' => '',                 ), $atts ) );             ob_start();             echo ''.$atts['address'].'';             $email_ssc = ob_get_clean();             return $email_ssc;             }     add_shortcode("email", "emailbot_ssc");      the FAQ loop (code item #1) isn't parsing the shortcode. It just displays it raw.


title: Custom Taxonomy Taxonomies of Same Name point to first created URL

text: I created a Custom Post type and in that custom post type have a hierarchical taxonomy (categories). Here's an example of the categories I made:               Hats      - Mens      - Womens          Shoes      - Mens      - Womens      The problem is that when I go to the "Mens" sub-category of the "Shoes" Main category it goes to the Mens category of the "Hats" category, i'm guessing it's because the URL of the two is the same. What is the best way around this problem?


title: Is there any sort of theme dependency management?

text: I'm developing a Wordpress theme with a few other individuals and am running into a problem where I add a plugin and then I have tell the other developers about the plugin I installed and the settings I set for the plugin so that the theme works. I was wondering if there's a way to associate plugins with a theme, so that when an individual receives the theme, the theme knows which plugins it needs and can automagically install them and their correct versions. I suppose I'm looking for some sort of dependency management for Wordpress themes. Is there something like that out there?


title: Showcase your wordpress themes

text: I want to know is there any place on the web where a wordpress theme developer can showcase his/her created wordpress themes for free. Actually I want some place where one can upload one's wordpress themes. There is one page where all his themes are showcased and when some body want to check any of the themes, he simply clicks on any one of them and a separate page open where the theme will be showcased like an active site. Any help in this regard will be highly appreciated.


title: How can I prevent the post_modified column in wp_posts from being updated?

text: On my site, I display each post's Last Updated date instead of its Published date in order to let visitors know how recent the post is. I'm currently developing a new theme, and some of the features I'm building will require me to make edits to almost every post's featured image and custom fields. I'd like to prevent the Last Updated date from being changed when I do these updates, as I'm not really updating the content. Any way to do this? My current idea is to simply change the names of the post_modified and post_modified_gmt while I do the update - will this break anything, since WordPress will be trying to update columns that technically don't exist?


title: How to make Wordpress search prioritise page titles?

text: The standard search for Wordpress works, but doesn't seem too clever. If I search for 'tomato' and I have a page whose title is 'Tomato' I would expect that to come first in the results. However the results seem to be ordered by date published. So if a page/post mentions 'tomato' somewhere in the text, it will be first in the results if it was just published. How would I make Wordpress prioritise page titles in the search? (I'm using the Starkers theme)


title: WordPress plugin isn't loading completely

text: i m running a blog and having problems with some plugins. When I installed them they were running fine, but after few weeks-- I think after I updated my WordPress to 3.1.1, these plugins stopped working. Maybe jQuery isn't loading or conflicting or something else. Please kindly help me to solve this issue.


title: Asynchronous Javascript Loaders

text: I'd like to take advantage of loading my scripts while the page is loading. ie. Yepnope, head.js etc... But I also want to be able to enqueue the script so other plugins don't try adding their own. (a la jquery) Does anyone have any suggestions? Thanks in advance...


title: Hide Category from Blog?

text: I am using the Boldy theme from Site5 on a v3.1.2 site. The way this theme works, is that there is a portfolio, (which I am using as a case studies gallery) that pulls in posts from a specific category you define under the themes settings _(id=98)_ This is fine if you also set the blog up as per the Boldy instructions, where all blog posts come under a category called blog, but this wasnn't going to give me the slugs I wanted, so I adopted to use a static page called blog to show my posts on. This all works fine, apart from the fact that the posts I create for my portfolio/case studies gallery (category = case studies) now appear in my blog as well. Is there a way to hide posts within a specific category within the blog, but for it not to have the same affect in my case studies gallery? **\--EDIT--** With some help from Wyck via the comments, made _some_ progress. Here is a txt version of my themes default index.php file. If I insert the following onto Line 2:               <?php query_posts($query_string . '&cat=-98'); ?>      = This results in no posts being shown on my Downloads page, but all posts still appearing on my Blog page. I need the vice versa of this. I am sure I am close, but perhaps I need to modify which line I put this on? **\--EDIT x2--** Now using the download monitor for my downloads gallery. But using the portfolio for my case studies. So some of the links above have changed, but the problem is exactly the same.