title: Tabbed navigation in widget backend

text: I have just created a widget and i am trying to implement a tabbed navigation in the wp backend but it just seems more difficult than writing all the php code! The categories metabox is an example of what i am trying to achieve: https://docs.google.com/file/d/0BwQTBas8n_7iOFllSG5QOFg5MTQ/edit?usp=sharing


title: Location of theme options page menu icon

text: Hi this may look a little silly question but can someone let me know where is the location for theme_path? is it inside my own theme or very top level of the directory?               'menu_icon'  => theme_path . '/images/product-icon.png',       **A** : www.awebsite.com/images/product-icon.png   **B** : www.awebsite.com/wp-content/themes/mytheme/images/product-icon.png


title: woocommerce-how can i get all products by their groups!

text: i have a wordpress site that uses woocommerce as an online shop plugin. what is want is listing all products in my woocommerce site grouped by their categories, how can i do this? i want the list sorted ASC and i want all empty categories hidden! thanks in advanced!


title: Double slash in upload URLs

text: Wordpress is automatically adding a trailing slash to my custom upload folder in Settings » Media. This is causing upload URLs (for example, for images uploaded through the Media Uploader) to get a double slash, as in example.com/files//myfile.jpg Here's what happens:   1. I go to Settings » Media   2. Under **Uploading Files** in the field labeled **Store uploads in this folder** , I type in `files`, with no trailing slash. (This is consistent with the example listed next to the text field: `Default is wp-content/uploads`)   3. Hit "Save Changes"   4. The page reloads, and the upload folder is now `files/`, with a trailing slash. I have tested other URLs (`files/myfiles`, `uploads`), and Wordpress always adds a trailing slash when I hit save. I have **Organize my uploads into month- and year-based folders** unchecked. What gives? How do I fix this? I am on 3.3.1, but this was happening in 3.2 as well.


title: Contact form 7 post loop

text:
I am using contact form 7. It says to use the following               [contact-form-7 id="23" title="Contact form 1"]      In my post or page, I have placed it in my post. Now I am using this code to grab the post a spit it out on my custom-page.php file. However it just spits out the title of the page the date, and the content "posted in" No form to be seen. Also what's the best way to put a contact form on a page and be able to move it around with css and such with contact form 7.                      <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
                 <?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?>
        <?php the_content(); ?>
                 <?php endwhile; else: ?>
Sorry, no posts matched your criteria.
                 <?php endif; ?>


title: How to gain access to each menu item in wordpress?

text: I have some menu items in a menu at location "main-menu". By using `wp_nav_menu( array( 'theme_location' => 'main-menu' ) );` , i get all the 13 items in a div. Now i just need to show 10 menu items in present div and the remanining in other div (say id="new") just adjacent to it. Again if the div with id "new" has 10 menu-items in it, again a new div will be created and the remaining items are shown in it. So is there a way to access the array that contains these menu-items? Please help.


title: Getting posts from some categories plus some individual posts

text: I want to display list of all posts under a couple of categories and some individual posts. If I use the following code, it does not return anything, as it looks for those individual posts in the categories.               query_posts( array ( 'category__in' => array( 28, 34 ), 'post__in' => array( 8200, 3581, 38, 1562, 7613 )) );       How can I get list of all posts under a couple of categories plus some individual posts found under other categories?


title: How activate custom plugin in WordPress on virtual box “host only adapter” and no internet connection?

text: I'm running WordPress in Virtual Box CentOS 6.5 on a laptop without an internet connection. I am able to get the CMS in a web browser by running the virtual box using a "host only adapter". However, when I try to activate my plugin, it throws an error:               WordPress could not establish a secure connection to WordPress.org      Why does it even need to connect to WordPress.org? How do I stop this error and activate my plugin? It appears to have activated the plugin if I go back to the main CMS page. But why does the error occur at all?


title: jQuery is not defined, working on local server but not online

text: here's my problem: Chrome console:                   Uncaught ReferenceError: jQuery is not defined jquery-ui.min.js:6         Uncaught ReferenceError: jQuery is not defined slider.js:1         Uncaught ReferenceError: jQuery is not defined functions.js:1         Uncaught ReferenceError: jQuery is not defined menu_mobile.js:1         Uncaught Error: Bootstrap's JavaScript requires jQuery       I enqueue my scripts before wp_head() in header.php:               <?php             function frontEnd_scripts() {                 wp_enqueue_script("jquery");                 wp_deregister_script('jquery.mobile');                 wp_register_script('jquery.mobile', ("//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"),array('jquery'));                 wp_enqueue_script('jquery.mobile');                 wp_register_style('jqm_css',('//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css'));                 wp_enqueue_style('jqm_css');                  }             add_action('wp_enqueue_scripts', 'frontEnd_scripts');          ?>         <?php wp_head(); ?>         <!-- My custom scripts here -->      I tried to enqueue my custom scripts with no results. js files wrapped like this:               jQuery(document).ready(function($j){         // Do some stuff     });      Everything works fine on a local MAMP server but it does not work on web server and the only way I can make it work is to hardcode the jQuery script tag before the wp-head(). Is it possible that my online version of wordpress don't have jQuery included or removed ? Thanks !


title: Assign classes to Custom fields

text: I have a post with 4 custom fields, and I am using `the_meta( )` to display these.   I want to add an image to the list items, but a different image for each item eg. key "Client" will have a small image of a person, key "Date" will have an image of a calendar... The only way I can think of doing this is to somehow give each key a class and then use CSS to add a background image to the list-item. How should I do this?


title: Where is the WP_Query instance instantiated (when working with themes)?

text: This may be a very basic question, but I could not find the answer. The following documentation http://codex.wordpress.org/Class_Reference/WP_Query shows the code               // The Query     $the_query = new WP_Query( $args );      but when I look at `wp-contents/themese/twentytwelve/index.php` I see calls to `have_posts()` and `the_post()` inside the loop with no reference to `$the_query` as though `index.php` was included from inside a `WP_Query` instance. Can someone please explain what is happening here? Thanks.


title: is_tax() function not working as expected

text: I'm facing an issue with the is_tax() function. I'm a class method that fetches a specific custom post types. These custom post types have taxonomy related custom fields (among other custom fields). If in these custom fields I find, for instance, a value for the category term "discografia", I want my method to return this custom post type if I'm currently seeing the archive page /category/discografia. This is an excerpt of my code:               // The Query     /** @var $query WP_Query */     $query = new WP_Query($query_args);          $results = false;     // The Loop     if ($query->have_posts()) {         if (!is_home() && !is_front_page()) {             $posts = $query->get_posts();             foreach ($posts as $post) {                 $add = false;                 //ServiceBoxes::getBox returns the $post object as Array_A                 //and adds a new key "meta" with the custom fields I want to use                 $box = ServiceBoxes::getBox($post->ID);                 if (is_archive()) {                     if (isset($box['meta'][self::$prefix]['taxonomies'])) {                         foreach ($box['meta'][self::$prefix]['taxonomies'] as $tax => $terms) {                             if ($terms) {                                 if (is_tax($tax, $terms)) {                                     $add = true;                                 }                             }                         }                     }                 }                 if ($add) $results[] = $box;                  }         } else {             $results = $query->get_posts();         }              return $results;     }     return false;      Some clarification about what happens here: 1. $box['meta'][self::$prefix]['taxonomies'] actually returns an array with "category" as key and an array of terms (including "discografia") 2. The url /category/discografia/ actually returns a series of posts 3. is_tax($tax, $terms) returns false 4. Also is_tax('category', 'discografia') returns false I suspect that the instance of WP_Query inside my method is overriding the global query, but I don't see why: it's a new instance, there is no reason for is_tax() to get confused. However, with some step-by-step debugging here's what happens in is_tax when called as `is_tax('category', array('discografia'))`:   * `$wp_query->is_tax( $taxonomy, $term )` is called by `is_tax()`   * in `$wp_query->is_tax()`, `if ( !$this->is_tax )` returns false I've been able to reach this point: after that, I don't know what else I can do to understand why the is_tax property is not set as expected. With the debugger on and some variables in the watch list, here is what I can see when calling "/category/discografia/" (an archive page that, I repeat, returns posts): http://www.evernote.com/shard/s6/sh/88f05447-edff-40c7-9670-902f0a92bc62/b50a28d39c9e55c7d404f912175975a4


title: Sub 'Page' Child Menu Order

text: I cannot seem to get the order of my sub-page Menu items in the correct order. They will only display in alpha or numerical order - even if I specify the menu order. To be clear - I am not referring to the 'Admin' page order but the order of the drop down page menu. The issue with numbering when you go over 9 items is the 10 appears under 1 (i.e. 1,10,11,12,13,14,15,16,17,18,19, 2,21, 23 etc). ![Menu Order](http://i.stack.imgur.com/WWtrU.jpg) Can anyone advise please as I have several instances of where this needs to be fixed up! Thanks. Jon


title: 404 Error Problems with sCategory Permalink plugin

text: Seems throughout the day my blog seems to show 404 page errors with no pattern. I have to manually change the permalinks from /blog/%scategory%/%postname%/ to default, then back to /blog/%scategory%/%postname%/ in order to fix the permalink issue. This has been a problem for us for the past six months, and our site gets 10k views a day. While that is not a lot, it does give us a huge problem when at certain periods of the day we have a huge issue where none of our Posts work, yet Pages continue to work fine. I have extensive conversation on this issue at this post (http://stackoverflow.com/questions/3506130/wordpress-permalinks-not-staying) where I have narrowed a few things down, and at this point I believe the sCategory Permalink is the issue. I need help understanding what is causing this issue, and more importantly fixing this so it never happens again. ANY help would be greatly appreciated.


title: Custom Post Type Rewrite Rule for Author & Paging?

text: I'm using WordPress 3.0.1 and I have made custom post-type called `'dienasgramatas'`. My plugin also makes custom rewrite rules for displaying all posts from this post type and even custom permalink structure to query posts with this post type coming from defined author, but I can't create rule for pagination: This is the one that works:               $new_rules['dienasgramatas' . '/([^/]+)/?$'] =        'index.php?post_type=dienasgramata&author_name=' . $wp_rewrite->preg_index(1);      It gives this rewrite rule:               [dienasgramatas/([^/]+)/?$] => index.php?post_type=dienasgramata&author_name=$matches[1]      But this one:               $new_rules['dienasgramatas' . '/([^/]+)/page/?([0-9]{1,})/?$'] =        'index.php?post_type=dienasgramata&author_name=' . $wp_rewrite->preg_index(1).        '&paged=' . $wp_rewrite->preg_index(2);      Outputs this (faulty) rewrite rule:               [dienasgramatas/([^/]+)/page/?([0-9]{1,})/?$] =>        index.php?dienasgramata=$matches[1]&paged=$matches[2]      As you can see, `post_type` is ignored and this rewrite rule does not work as it should. Can someone tell me why it's not working or how to make it right? filter for funcion:               add_filter('generate_rewrite_rules', 'add_rewrite_rules');      Full function is as follows:               function add_rewrite_rules($wp_rewrite) {          $new_rules['dienasgramatas' . '/([^/]+)/?$'] = 'index.php?post_type=dienasgramata&author_name=' . $wp_rewrite->preg_index(1);     $new_rules['dienasgramatas' . '/([^/]+)/page/?([0-9]{1,})/?$'] = 'index.php?author_name=' . $wp_rewrite->preg_index(1) . '&paged=' . $wp_rewrite->preg_index(2) . '&post_type=dienasgramata';          $wp_rewrite->rules = array_merge($new_rules, $wp_rewrite->rules);     return $wp_rewrite;      } Basic need is that i want to go to               www.example.com/dienasgramatas/admin/page/2      and get posts by 'admin' with post_type = 'dienasgramata' and second page (e.g. 10 post offset). Rewrite rule without page/2 works fine. Maybe it's a regex issue or query vars issue or how rewrite rules are assigned. live site example: `http://dev.fiicha.lv/jb/dienasgramatas/juris/` - works ok `http://dev.fiicha.lv/jb/dienasgramatas/juris/page/2/` - does not work at the bottom there are all rewrite rules and query vars


title: What are all the Properties of the WordPress Post Object?

text: _( **Moderator's note:** Title was originally "What are all the variables in the wordpress post object?")_ Does anyone know the variables that are stored in the WordPress Post object?


title: Force Cron to run only on one server

text: Given a site running on server A and server B with a load balancer, shared database/etc, and a regular wp-cron task, how would I make sure that wp-cron only runs on server A, never on server B?


title: horizontal menu / 4-level depth

text: I need a 4-level horizontal menu. which is the best way to build, organize and style it? "Active" tabs should be highlighted.               <?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>      Or:               <?php wp_list_pages('include=137,693,139,147&title_li='); ?>      I am new to using `wp_nav_menu();`. I have built 2-level `wp_list_pages();` menus.


title: Checking return with WP Error

text:
I've seen other people with similar problems, and I know that I need to check the return when calling for the child items in my custom taxonomy "hhie_artists". I'm not sure how to `echo` my output to incorporate `wp_error`. Here is my code:               <?php     $taxonomyName = "hhie_artists";     //Call top layer terms only (by setting Parent to 0).     $parent_terms = get_terms($taxonomyName, array('parent' => 0, 'orderby' => 'slug', 'hide_empty' => true));        echo '
';     foreach ($parent_terms as $pterm) {     //Get the Child terms     $terms = get_terms($taxonomyName, array('parent' => $pterm->term_id, 'orderby' => 'slug', 'hide_empty' => true));     foreach ($terms as $term) {     echo '
name, $taxonomyName ) . '">' . $term->name . '
';       }     }     echo '
';     ?>      From what I've found out, this is due to an empty taxonomy field being found. I've yet to populate all my custom taxonomy fields, so I'm not surprised by this error, I just need to solve it. Thanks.


title: Replicate network plugins without having to configure it for each subsite?

text: I was wondering if there is a simple way to replicate my configurations for all the subsites once i have activated a network plugin without having to go thru each and configure it manually ?   * Upgrade a set or single network plugin(s) with the same configuration to all subsites


title: How to get the clean permalink in a draft?

text: When I use `the_permalink` or `get_the_permalink` in a draft or scheduled post, the URL provided is not the "final" permalink—it is the unpretty `?p=xxxxx` version. How can I get the final, "clean" permalink to show up in a draft or scheduled post? I could do something involving `$post->post_name`, but I'd need the path as well, and that varies from post type to post type and depends on permalink structure. Is there a "universal" way to do this?


title: Creating WordPress Admin Themes

text: Is there any way to create our own admin theme rather than the default one. or do we have to override the default style sheets to get the desired look??


title: After adding add_role to functions.php and creating a user, can not login into admin

text: I'm trying to add a specific role to manage my custom post types and I'm stuck at the very beginning. I've added `add_role()` to the functions.php file as following:               add_role('resourcerer', 'Resourcerer', array('read_internal_jobs'));      and created a user with that role. However, when I try to login with a new user I would get an error `You do not have sufficient permissions to access this page.` I can't figure out what I'm doing wrong here :S When registering my Custom Post Type I've got the following settings:               'capability_type' => array('internal_job', 'internal_jobs'),     'map_meta_cap' => true,      which, if I understand the register_post_type() Codex correctly, by specifying `capability_type` the `capabilities` strings will be constructed respectively using the strings specified in the `capability_type`, for example: edit_internal_jobs, publish_internal_jobs and so on. I would really appreciate any help!


title: Posting via email, where do I start troubleshooting?

text: I host a site for a person that does everything via blackberry and wants to email posts to the site. She has sent one post to the designated mailbox, but 24 hours later the post is still not showing. Where do I start checking what is going wrong in the process?


title: How to prevent plugin, theme installation failures on Wordpress?

text: I didn't know this site exists. So, I asked it on WebApps I didn't get a solution still. :-( * * * I am unable to install any theme/plugin to my WordPress 3.0               Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…         Unpacking the package…         Installing the plugin…         Could not copy file. /public_html/blog/wp-content/plugins/contact-form-7/languages/wpcf7-lt_LT.po         Plugin install failed.          Downloading install package from http://wordpress.org/extend/themes/download/piano-black.2.2.zip…     Unpacking the package…     Could not create directory. /public_html          Downloading install package from http://downloads.wordpress.org/plugin/contact-form-7.2.3.1.zip…     Unpacking the package…     Could not create directory. /public_html/blog/wp-content/upgrade/contact-form-7.tmp/contact-form-7      I get similar messages everytime. Is there any solution?


title: Existing Ecommerce plugins with Custom Post Types

text: I am developing a solution which is selling a service (can not be categorized as product) I have developed custom post types and taxonomies but I do not want to re-invent the wheel by adding payment gateways just for this purpose. Is there any way I can customize the "Product" post type in any existing ecommerce plugin available. Thanks for your support


title: Plugin action hook fires when it should not (unrelated admin screen)

text: I maintain a plugin which generates a PDF of a page or post when an icon or link is clicked. PDFs may be cached, and as such, when a page or post is edited, we refresh the cache by regenerating the PDF. In the admin section of the plugin, we do the following:               if (is_admin()) {     add_action('admin_init', array(&$this, 'on_admin_init'));     add_action('admin_menu', array(&$this, 'on_admin_menu'));     add_filter("plugin_action_links_" . WPPTOPDFENH_BASENAME, array(&$this, 'action_links'));     register_activation_hook(WPPTOPDFENH_BASENAME, array(&$this, 'on_activate'));     add_action('pre_post_update', array(&$this, 'on_pre_post_update'));     add_action('post_updated', array(&$this, 'generate_pdf_file'));     } else {     add_action('wp', array(&$this, 'generate_pdf'));     add_filter('the_content', array(&$this, 'add_button'));      } Oddly, when saving menus, we get triggered to refresh the cache, which leads to a:               Warning: Creating default object from empty value in /home/{site root}/public_html/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php on line ###.      I've implemented a rather ugly (I think) workaround, as I am at a loss to figure out why we get triggered when saving on the menu page:               if (is_admin()) {     add_action('admin_init', array(&$this, 'on_admin_init'));     add_action('admin_menu', array(&$this, 'on_admin_menu'));     add_filter("plugin_action_links_" . WPPTOPDFENH_BASENAME, array(&$this, 'action_links'));     register_activation_hook(WPPTOPDFENH_BASENAME, array(&$this, 'on_activate'));             // Ugly workaround to keep from firing when navigation menus are saved        $screen = get_current_screen();        if ( !empty( $screen ) && $screen->id != 'nav-menus' ) {            add_action('pre_post_update', array(&$this, 'on_pre_post_update'));            add_action('post_updated', array(&$this, 'generate_pdf_file'));        }     } else {     add_action('wp', array(&$this, 'generate_pdf'));     add_filter('the_content', array(&$this, 'add_button'));     }      Because screen.php is not yet loaded, earlier in the file we include it so that get_current_screen() is available:               require_once(ABSPATH . 'wp-admin/includes/screen.php');      Surely, there must be a more elegant solution? TIA Lewis


title: Query a Custom Post Type to another CPT via Metabox

text: I apologize in advance, I searched for an answer before posting this question but didn't see it, I saw some variations but couldn't quite figure it out. I have 2 custom post types: Buildings and Apartments. I would like to assign a building to every apartment via a metabox dropdown. This is what I have in my function.php file:               function get_myposttype_options( $query_args ) {          $args = wp_parse_args( $query_args, array(         'post_type' => 'buildings',     ) );          $posts = get_posts( $args );          $post_options = array();     if ( $posts ) {         foreach ( $posts as $post ) {             $post_options[ $post->ID ] = $post->post_title;         }     }          return $post_options;     }      This is my Metbox                $meta_boxes[] = array(     'id' => 'buildingdetails',     'title' => 'Add to Building',     'pages' => array( 'property' ),     'context' => 'normal',     'priority' => 'high',          // List of meta fields     'fields' => array(              array(     'name' => '',     'id' => $prefix . 'test_select',     'type' => 'select',     'options' => get_myposttype_options(),         ),               )     );      ![Apartment with building metabox](http://i.stack.imgur.com/6f2aa.png) Any help would be immensely appreciated.


title: Create a Static HTML Site from WordPress

text: A friend of mine is investigating the use of WordPress for a dynamic site with some hierarchy. Really, at the moment he just wants "nothing fancier than photos and links between pages," but knowing him, it's going to get more complex from there. The tricky requirement, though, is that he needs to be able to archive the site. As in, output a static HTML version with embedded resources (photos) to a CD for manual distribution from time-to-time. I'm pretty sure this is possible with WP, since that's actually how several caching systems work. But I don't know of any plugins that give you a simple "export site to disc" function. Is there such a plugin?


title: Moved WP into new folder. How to fix image links in posts?

text: I moved from Wordpress.com to my own Wordpress.org hosting. I had no problems importing all my posts over, and the images were all linked up fine. Since the import, I decided to move my WP install from the root of HTML_public, to a new folder called Wordpress. The posts are all still fine, but the picture links are still pointing to: http://www.dekhoforum.com/wp-content/uploads/2010/12/father-christmas-raymond- briggs.jpg   When they should be pointing to:   http://www.dekhoforum.com/wordpress/wp-content/uploads/2010/12/father- christmas-raymond-briggs.jpg I am assuming I must have missed out a step and should have not been so hasty in moving things around. Is there an easy way to automatically update all pics in all posts to point to the new URLs? i.e. Add the new wordpress folder into each of the link URLs dekho.com.au/blog/


if If i switch my current wordpress blog theme with a new one, will i lose the SEO i have built up for my site?


title: Category page doesn't use category.php, instead it redirects to homepage

text: I am currently modifying a theme. This theme doesn't had a category.php I needed a custom category page. So, I made one. It works on my local server, but when I uploaded it to a real server, this page doesn't work. It always redirect to frontpage. It has a front-page.php and other pages include archive.php, index.php, Some custom page template, single page templates, taxonomy-custom_cat.php etc. I mean everything is pretty normal. Everything else works fine, but on the main server category doesn't work anyway. Isn't it violating template hierarchy? By the way, the main server is wordpress multisite. I had to enable the theme in network admin and then use it in the current site. Thanks in advance. Edit: I found out something interesting. It redirects to frontpage or uses 404 page in the following condition No. not all 404 urls redirect to the front page. I am giving you a general idea               www.example.com/category/category-name -> redirects to front page     www.example.com/category/xxxxx         -> redirects to front page     www.example.com/xxxxx                  -> redirects to front page     www.example.com/xxxx/xxxx              -> goes to 404 page      *xxxx means garbage url It actually use 404 page, but not all the cases and by the way I'm using wpmudev


title: Multiple loop to display specific post at start of a list

text:
I'm currently querying the following posts:               <?php      $args=(array(     'post_type'=>array( 'premium_content', 'post'),        'posts_per_page' => 3,     'orderby' => 'PREMIUM_CONTENT_FIRST!',     'meta_query' => array(     array(         'key' => 'feature_it_on_homepage',         'value' => '1',         'compare' => '=='         )     )     ));          $home_slide = new WP_Query( $args ); ?>          ?>      And this is how i wish to render the above:               <?php while ( $home_slide->have_posts() ) : $home_slide->the_post(); ?>
Premium_content Specifc Custom Post Type Item

Normal Post Item

Normal Post Item
          <?php endwhile; ?>          <?php wp_reset_postdata(); ?>      So essentially 3 items, with the first one always being a post from the custom post type "premium_content" I believe a multiple loop would be a good way to approach this? Any input is appreciated :)


title: Is it possible to have a custom post type with feed but without the archive?

text: In Wordpress 3.9.2 I couldn't find the way to have a custom post type which would have the feed permalink like this: > example.com/custom-post-type/feed/ But **didn't** show the archive (show 404) for: > example.com/custom-post-type/ Just for the sake of completeness it should display the single post: > example.com/custom-post-type/post-1 The relevant `$args` I've tried to change:                   $args = array(             'capability_type'     => 'post',             'has_archive'         => true,             'rewrite'             => array('slug' => 'custom-post-type', 'feeds' => true, 'feed' => true),      My research shows that when the `has_archive` is set to `false`, the feed doesn't work.


title: NextGen Gallery + GalleryView by John Brien Plugins

text: I've installed the NextGen gallery plugin (http://wordpress.org/extend/plugins/nextgen-gallery/) and also the galleryview plugin by John Brien (http://wordpress.org/extend/plugins/wordpress-nextgen-galleryview/) and wondered if anyone has used these plugins together. I've got my thumbnails running in a row underneath my main image and happy with this, but the plugin adds next and previous arrows to the left and right of the thumbnails (see image below) and I want to get rid of these and can't find a way of doing this. ![Next and Previous arrows to the left and right of thumbnails](http://i.stack.imgur.com/vey12.jpg) Can anyone point me in the right direction? I've looked through the css file and can't see anything in there.


title: How to add <button> to wp menu using bootstrap 3 framework

text:
I need to figure out a way to add a `<button></button>` element to a link inside of the wp menu I currently have this markup:               $defaults = array(         'theme_location'  => '',         'menu'            => 'main-nav',         'container'       => 'ul',         'container_class'    => 'nav navbar-nav',         'before'          => '<button class="btn btn-warning">',         'after'           => '</button>',         'menu_class'      => '',         'menu_id'         => 'menu',         'echo'            => true,         'fallback_cb'     => 'wp_page_menu',         'link_before'     => '',         'link_after'      => '',         'items_wrap'      => '
%3$s
',         'depth'           => 0,         'walker'          => ''     );     wp_nav_menu( $defaults );      Here is an example of my site With the current structure in place above, it seems like the links work fine for chrome except for firefox and ie Any suggestions would be great!


title: Source of Pingbacks

text: I've replaced the default comments in WordPress with Facebook Comments plugin.      But I'm still getting comments in the form of Pingbacks my in wp-admin > Comments (http://mydomain.com/wp-admin/edit-comments.php).      How can I know the source of these pingbacks ?


title: How can I get RSS feed for a custom page?

text: I have a custom page on my blog that doesn't display RSS feed. You can see the code here for the custom page. I am not sure what I need to do to make rss feed for each individual post on that page. I am not much in php myself so any help is appreciated.


title: Is there an upper limit for users in WP?

text: Right now I use a single WP table to feed several sites. We have about 72K users and I have started noticing that to see the "Users" page it takes about 30 seconds on our otherwise pretty fast server. Are there any scalability issues I should worry about and anything I can do to get the user functions working quicker? Extra Info: The user table is added to each night using employee data. There is nothing writing to the user table. We do allow users to edit some extra fields that get put into the metauser table. However there is no sign-up or registration. All of the sites simply define the user/meta tables in the config.


title: error in getting post id

text: I am making a voting system The problem is that the post id Is returning blank I am sure that post id is returning blank Bcoz when I put a real post id value there it seems working For example               update_post_meta(123, "votes" , $newvotes)      Is Working properly But                update_post_meta($postid, "votes" , $newvotes)      isn't working properly here is the code                 add_action("wp_ajax_add_votes_options", "add_votes_options");        add_action("wp_ajax_nopriv_add_votes_options", "add_votes_options");       function add_votes_options() {     if (!wp_verify_nonce($_POST['nonce'], 'voting_nonce'))         return;          $postid = $_POST['postid'];     $ip = $_POST['ip'];          $voter_ips = get_post_meta($postid, "voter_ips", true);     if(!empty($voter_ips) && in_array($ip, $voter_ips)) {         echo "null";         die(0);     } else {         $voter_ips[] = $ip;         update_post_meta($postid, "voter_ips", $voter_ips);     }             $current_votes = get_post_meta($postid, "votes", true);     $new_votes = $current_votes + 1;     update_post_meta($postid, "votes", $new_votes);     $return = $new_votes>1 ? $new_votes." votes" : $new_votes." vote";     echo $return;     die(0);         }      AND ALSO I TRIED THIS               add_action("wp_ajax_add_votes_options", "add_votes_options");     add_action("wp_ajax_nopriv_add_votes_options", "add_votes_options");     function add_votes_options() {     if (!wp_verify_nonce($_POST['nonce'], 'voting_nonce'))         return;          $postid = $_POST['postid'];     $ip = $_POST['ip'];          $voter_ips = get_post_meta($_REQUEST["post_id"], "voter_ips", true);     if(!empty($voter_ips) && in_array($ip, $voter_ips)) {         echo "null";         die(0);     } else {         $voter_ips[] = $ip;         update_post_meta($_REQUEST["post_id"], "voter_ips", $voter_ips);     }             $current_votes = get_post_meta($_REQUEST["post_id"], "votes", true);     $new_votes = intval($current_votes) + 1;     update_post_meta($_REQUEST["post_id"], "votes", $new_votes);     $return = $new_votes>1 ? $new_votes." votes" : $new_votes." vote";     echo $return;     die(0);         }      But none of this codes are working EDIT#1 calling my action at jQuery               $("#vote").not(".disabled").click(function() {         var el = $(this);         el.html('');         var nonce = $("input#voting_nonce").val();         var data = {             action: 'add_votes_options',             nonce: nonce,             postid: '<?php echo $post->ID; ?>,',             ip: '<?php echo $_SERVER['REMOTE_ADDR']; ?>'                     };


title: Is there any way to tell when wp_postmeta has been updated?

text: I have a website for a client, where users can vote up or down certain things on a leaderboard. The up vote is stored within wp_postmeta as a field. What I'd like to be able to do is see what the league table looked like at a certain date & time, but as far as I can see there is no date/time stamp within that table to show when it was last updated. Am I missing something, or is there no way of telling when that field was amended? thanks Rob


title: Query Vars for the Homepage?

text: I'd like to make the homepage accept query vars for year, month and date while still keeping the custom permalink structure for the rest of the site. Basically the homepage needs to display several different links that are managed via custom posts. So my hope is that http://mysite.com - will display the links set for the current day but then also enable http://mysite.com/2013/08/10/ - will display the links associated from that day as a type of archives. I need these as variables so I can do several different queries to display the relevant info. Is this even possible, or am I attacking this the wrong way? Will this mess up other pages trying to use the permalink structure? I've attempted to set my own query vars                   add_filter( 'query_vars', 'wpse12965_query_vars' );     function wpse12965_query_vars( $query_vars )     {         $query_vars[] = 'a_year';         $query_vars[] = 'a_month';         $query_vars[] = 'a_day';         return $query_vars;     }          add_rewrite_rule(          '^/([^/]*)/([^/]*)/([^/]*)/?',          'index.php?page_id=5&a_year=$matches[1]&a_month=$matches[2]&a_day=$matches[3]',          'top');      My vars are recognized but it always redirects to the 404 not found page. Any suggestions would be greatly appreciated. Edit So anyone else who may be checking this out I'll just mention that using the date.php template sorted this out and then I am easily able to retrieve the needed date vars like so               $day = (get_query_var('day'));     $year = (get_query_var('year'));     $monthnum = (get_query_var('monthnum'));


title: How to change wordpress post title?

text: How to change just wordpress post title but not menu items.               add_filter('the_title', 'wordpress_title');     function wordpress_title(){       return 'New title';     }      ![enter image description here](http://i.stack.imgur.com/UtVPI.png)


title: How to finish this loop?

text: I had already asked a question of how to get only get the child pages of a parent page that belonged to a certain taxonomy. A very helpful user gave me the answer to this, however, I was not provided the code to go either side of the loop so that I could get: the title, featured image and excerpt. The code I was given is this:               $child_ids = $wpdb->get_col(     "SELECT ID FROM $wpdb->posts WHERE post_parent = $post->ID AND post_type = 'page' ORDER      BY menu_order"     );           $args = array(     'post__in' => $child_ids, // Only retrieve taxonomy posts that are children of this page     'tax_query' => array(         array(             'taxonomy' => 'top5',             'field' => 'name',             'terms' => $post->post_title         ),     ),     );      So if anyone could tell me how to use this to pull the title, excerpt and featured image that would be great thank you very much in advance!


title: trying to Change to wp_register_sidebar_widget

text: I got this in my theme:               register_sidebar_widget(array('Sidebar Login', 'widgets'), 'widget_sidebarLogin');      i want to change this to the updated Command aka               wp_register_sidebar_widget      But i seem to miss something cuz the widget doesent load after the change.. I tried this:               wp_register_sidebar_widget(     'SidebarLoginId',        // your unique widget id     'Sidebar Login',          // widget name     'widget_sidebarLogin',  // callback function     array(                  // options         'description' => 'Some description'     )      What am i missing? is that "widgets" in the original 'register_sidebar_widget' array has a meaning othere then description ?


title: WP_Query $gallerypage->the_post() giving Undefined offset: 0

text: When I do               $gallerypage = new WP_Query(array(         'post_type' => 'post',         'pagename' => 'gallery'     ));          $gallerypage->the_post();      the last line `$gallerypage->the_post();` is giving me errors. Why is that? It seems correct?               Notice: Undefined offset: 0 in /site/url/wp-includes/query.php on line 2719     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3491     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3493     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3495     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3496     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3503     Notice: Trying to get property of non-object in /site/url/wp-includes/query.php on line 3514     Notice: Trying to get property of non-object in /site/url/wp-includes/post-template.php on line 30     Notice: Trying to get property of non-object in /site/url/wp-includes/post-template.php on line 30      wp-includes/query.php line 2717 onwards               $this->current_post++;          $this->post = $this->posts[$this->current_post]; // error here?


title: Orderby custom field meta value ASC and then by date DESC

text: I need to allow post ordering in certain categories. One of the sorting options is a custom field meta value. First problem is that not all posts have that meta assigned and i need to order these by date (default). Another problem is that meta field should use ASC order and the rest DESC. My code so far In Template File:               $request = $_REQUEST;     global $query_string;     parse_str( $query_string, $qs_arr );          switch ( $request['sort'] ) {              case 'title':             $qs_arr['orderby'] = 'title';             $qs_arr['order'] = 'ASC';             break;         case 'publisher':             $qs_arr['meta_key'] = 'discography_publisher';             $qs_arr['orderby'] = 'meta_value';                  add_filter( 'posts_orderby', 'sort_posts_orderby' );             add_filter( 'get_meta_sql', 'sort_get_meta_sql' );             add_filter( 'posts_where' , 'sort_posts_where' );             break;     }          if ( isset( $request['sort'] ) ) { query_posts( $qs_arr ); }      functions.php               function sort_get_meta_sql( $meta_sql ) {         $meta_sql['join'] = " LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'discography_publisher') ";         return $meta_sql;     }          function sort_posts_where( $where ) {         //here i remove the last statement "wp_postmeta.meta_key = 'discography_publisher' " so query return all posts in category          $explode = explode( 'AND', $where );         array_pop( $explode );         return implode( 'AND', $explode );     }                    function sort_posts_orderby( $orderby ) {         $orderby = 'COALESCE(wp_postmeta.meta_value, wp_posts.post_date) DESC';         return $orderby;     }


title: Best tools for preparing and styling a table

text: What are the best tools for preparing and styling a table in Wordpress easily? Update: I want to prepare and publish the tables in any page or post. So I think it might be easier if they can be prepared with an easy to use shortcode.


title: Comments do not respect display_name setting, how to make plugin to overcome this

text: When I post something on Wordpress, it's posted with my display name. However if I change my display name, posts posted by me will be updated with the new author. Comments will stay with the old name. Since in my wordpress site comments are available only for registered users, and the display name field is hidden - they have custom profiles, I would like to overwrite the display_name used (it should always match first_name + last_name). So I've tried the the_author hook with no luck. Looking at the source code, I found that the name of the author in author_link is generated as follows:               function get_comment_author( $comment_ID = 0 ) {         $comment = get_comment( $comment_ID );         if ( empty($comment->comment_author) ) {             if (!empty($comment->user_id)){                 $user=get_userdata($comment->user_id);                 $author=$user->user_login;             } else {                 $author = __('Anonymous');             }         } else {             $author = $comment->comment_author;         }         return apply_filters('get_comment_author', $author);     }      This means that if the comment_author is written to the database, I cannot use it in any way. If not - the current user_login of the comment author will be passed to the get_comment_author hook, where I could query the DB to get the row and hence the first and last name. I don't like that new query will be needed, but I can live with this if it's the only way. But what steps I should perform to get it working. Right now the comment_author is always written to the database.


title: Wordpress ajax problem need wordpress expert?

text:
i want to call a function using wordpress ajax and i have done a code for that also. but when i fire a ajax call it always retrun -1. i dont know what is the problem can any body help me to solve. Here is my code function.php                function my_AJAX_processing_function(){        //echo  $getLetter = $_GET['post_id'];        print_r($_GET);        exit;         global $wpdb;         global $post;              $result = $wpdb->get_results('SELECT * FROM wp_posts where post_title LIKE "'.$getLetter.'%" AND post_status = "publish" AND post_type="post"');         while($row = $result)         {           echo '' . $row['post_title'] . '
';         }         die();     }     add_action('wp_ajax_nopriv_download_track_resources', 'my_AJAX_processing_function');      footer.php                         Html code               <a href="javascript:void(0);" title="Download <?php the_title(); ?>" class="downloadtrack" name="<?php echo $post->ID;?>"><?php the_title(); ?>	      Thanks


title: Always display a picture even if the link is broken?

text: What I would like is to have a sort of fall back photo so I don't get red Xs.. Something like "photo unavailable please come back later" Is there a way to check if the image path is valid and if not display another photo. (I really only need the "link is valid" bit.. I can figure the rest out)


title: Optimize apache for WP use

text: Greetings, I have a WP site with over than 150k pageviews /day. It's running on a Intel Core i5 CPU 760 @ 2.80GHz, with Centos and 4 GB of RAM. The problem is WP consumes too much RAM and after a while serve gets overloaded and RAM runs out. I've tried many Apache tweeks but nothing seems to work. After I restart Apache site will run smoothly but after an hour or two it will get overloaded again. Do any of you guys have any tip that will help me? BTW, I'm using WP-Super Cache. **UPDATE: Aditional info** Here's my list of plugins:   * Akismet   * Contact Form 7   * Domain Mirror   * Faster Image Insert   * IntenseDebate   * Role Manager   * SexyBookmarks   * Smart Youtube   * Star Rating for Reviews   * Thumbnail For Excerpts   * WP-Polls   * WP-SWFObject   * WP Super Cache As for the tweeks, I've tried some tips from here My settings are:                <IfModule prefork.c>        StartServers       8       MinSpareServers    5        MaxSpareServers   20        ServerLimit      256        MaxClients       200        MaxRequestsPerChild  1000      </IfModule>                         <IfModule worker.c>        StartServers       2        MaxClients         150       MinSpareThreads     25        MaxSpareThreads    75       ThreadsPerChild     25       MaxRequestsPerChild  1000      </IfModule>                          Timeout 120 KeepAlive On      MaxKeepAliveRequests 100      KeepAliveTimeout 2      Also here's my my.cnf               [mysqld]     set-variable=local-infile=0     datadir=/var/lib/mysql     socket=/var/lib/mysql/mysql.sock     user=mysql     # Default to using old password format for compatibility with mysql 3.x     # clients (those using the mysqlclient10 compatibility package).     old_passwords=1          # Disabling symbolic-links is recommended to prevent assorted security risks;     # to do so, uncomment this line:     # symbolic-links=0          [mysqld_safe]     log-error=/var/log/mysqld.log     pid-file=/var/run/mysqld/mysqld.pid      **UPDATE** Here's my current memory usage               ps -ylC httpd --sort:rss          S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD     S   504  8446  8444  0  78   0  7884 59507 554050 ?        00:00:00 httpd     S   504 29164  8444  0  78   0 13380 87043 -      ?        00:00:00 httpd     S   504 29268  8444  0  75   0 13396 87043 429493 ?        00:00:00 httpd     S   504 29294  8444  0  75   0 13396 87043 -      ?        00:00:00 httpd     S   504 29255  8444  0  75   0 13400 87043 -      ?        00:00:00 httpd     S   504 29269  8444  0  76   0 13400 87043 387946 ?        00:00:00 httpd     S   504 29256  8444  0  75   0 13404 87043 -      ?        00:00:00 httpd     S   504 29265  8444  0  75   0 13404 87043 -      ?        00:00:00 httpd     S   504 29288  8444  0  75   0 13404 87043 429493 ?        00:00:00 httpd     S   504 28644  8444  0  75   0 13484 87043 -      ?        00:00:00 httpd     S   504 29293  8444  0  75   0 13484 87043 semtim ?        00:00:00 httpd     S   504 27280  8444  0  75   0 13496 87043 -      ?        00:00:00 httpd     S   504 28332  8444  0  75   0 13500 87043 -      ?        00:00:00 httpd     S   504 27762  8444  0  75   0 13504 87043 -      ?        00:00:00 httpd     S   504 28645  8444  0  75   0 13504 87043 -      ?        00:00:00 httpd     S   504 29242  8444  0  75   0 13508 87043 -      ?        00:00:00 httpd     S   504 28199  8444  0  75   0 13512 87043 429493 ?        00:00:00 httpd     S   504 28195  8444  0  75   0 13528 87043 -      ?        00:00:00 httpd     S   504 28197  8444  0  75   0 13528 87043 429493 ?        00:00:00 httpd     S   504 27245  8444  0  75   0 13536 87043 -      ?        00:00:00 httpd     S   504 28196  8444  0  75   0 13536 87043 -      ?        00:00:00 httpd     S   504 27756  8444  0  75   0 13540 87043 -      ?        00:00:00 httpd     S   504 27969  8444  0  75   0 13540 87043 -      ?        00:00:00 httpd     S   504 27074  8444  0  75   0 13544 87043 -      ?        00:00:00 httpd     S   504 27279  8444  0  75   0 13544 87043 -      ?        00:00:00 httpd     S   504 27926  8444  0  75   0 13548 87043 -      ?        00:00:00 httpd     S   504 28191  8444  0  75   0 13548 87043 semtim ?        00:00:00 httpd     S   504 28673  8444  0  75   0 13548 87043 -      ?        00:00:00 httpd     S   504 27089  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd     S   504 27825  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd     S   504 27974  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd     S   504 28330  8444  0  75   0 13552 87043 -      ?        00:00:00 httpd     S   504 26051  8444  0  75   0 13556 87043 -      ?        00:00:00 httpd     S   504 28343  8444  0  75   0 13556 87043 -      ?        00:00:00 httpd     S   504 26822  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd     S   504 27975  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd     S   504 28662  8444  0  75   0 13560 87043 -      ?        00:00:00 httpd     S   504 24949  8444  0  75   0 13564 87043 -      ?        00:00:00 httpd     S   504 28639  8444  0  75   0 13564 87043 -      ?        00:00:00 httpd     S   504 24924  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd     S   504 27826  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd     S   504 28192  8444  0  75   0 13572 87043 -      ?        00:00:00 httpd     S   504 28683  8444  0  76   0 13572 87043 -      ?        00:00:00 httpd     S   504 19032  8444  0  75   0 13576 87043 -      ?        00:00:00 httpd     S   504 26832  8444  0  75   0 13576 87043 -      ?        00:00:00 httpd     S   504 28186  8444  0  75   0 13580 87043 -      ?        00:00:00 httpd     S   504 24940  8444  0  75   0 13584 87043 -      ?        00:00:00 httpd     S   504 27883  8444  0  75   0 13584 87043 -      ?        00:00:00 httpd     S   504 27962  8444  0  75   0 13588 87043 -      ?        00:00:00 httpd     S   504 28331  8444  0  75   0 13588 87043 -      ?        00:00:00 httpd     S   504 18521  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 24291  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 24307  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 26503  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 26510  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 27100  8444  0  75   0 13592 87043 -      ?        00:00:00 httpd     S   504 27248  8444  0  75   0 13592 87043 429493 ?        00:00:00 httpd     S   504 28344  8444  0  75   0 13592 87043 429493 ?        00:00:00 httpd     S   504 24952  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd     S   504 26588  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd     S   504 27065  8444  0  75   0 13596 87043 -      ?        00:00:00 httpd     S   504 27102  8444  0  75   0 13600 87043 -      ?        00:00:00 httpd     S   504 27104  8444  0  75   0 13600 87043 429493 ?        00:00:00 httpd     S   504 27474  8444  0  75   0 13600 87043 429493 ?        00:00:00 httpd     S   504 27763  8444  0  75   0 13600 87043 -      ?        00:00:00 httpd     S   504 23657  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd     S   504 24311  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd     S   504 24790  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd     S   504 25731  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd     S   504 27087  8444  0  75   0 13604 87043 -      ?        00:00:00 httpd     S   504 24473  8444  0  75   0 13608 87043 -      ?        00:00:00 httpd     S   504 27976  8444  0  75   0 13612 87043 -      ?        00:00:00 httpd     S   504 28163  8444  0  75   0 13620 87043 -      ?        00:00:00 httpd     S   504 29266  8444  0  75   0 14204 87043 -      ?        00:00:00 httpd     S   504 17701  8444  0  75   0 14392 87043 -      ?        00:00:00 httpd     S   504 27881  8444  0  75   0 14408 87043 -      ?        00:00:00 httpd     S   504 26593  8444  0  75   0 14412 87043 -      ?        00:00:00 httpd     S   504 27072  8444  0  76   0 14428 87043 -      ?        00:00:00 httpd     S   504 17704  8444  0  75   0 15028 87043 -      ?        00:00:00 httpd     S   504 28674  8444  0  75   0 17076 87299 -      ?        00:00:00 httpd     S   504 23649  8444  0  75   0 17180 87299 -      ?        00:00:00 httpd     S   504 21484  8444  0  75   0 17232 87299 429493 ?        00:00:00 httpd     S   504 24034  8444  0  75   0 17240 87299 -      ?        00:00:00 httpd     S   504 24941  8444  0  75   0 17248 87299 -      ?        00:00:00 httpd     S   504 27058  8444  0  75   0 17256 87299 -      ?        00:00:00 httpd     S   504 24766  8444  0  75   0 17272 87299 -      ?        00:00:00 httpd     S   504 28333  8444  0  75   0 17284 87299 semtim ?        00:00:00 httpd     S   504 20565  8444  0  75   0 17296 87299 semtim ?        00:00:00 httpd     S   504 25462  8444  0  75   0 17296 87299 -      ?        00:00:00 httpd     S   504 28201  8444  0  75   0 17296 87299 -      ?        00:00:00 httpd     S   504 28202  8444  0  75   0 17316 87299 -      ?        00:00:00 httpd     S   504 27968  8444  0  75   0 17328 87299 -      ?        00:00:00 httpd     S   504 27973  8444  0  75   0 17328 87299 -      ?        00:00:00 httpd     S   504 24091  8444  0  75   0 17336 87299 429493 ?        00:00:00 httpd     S   504 28329  8444  0  75   0 17344 87299 -      ?        00:00:00 httpd     S   504 27885  8444  0  75   0 17352 87299 -      ?        00:00:00 httpd     S   504 21556  8444  0  75   0 17356 87299 semtim ?        00:00:00 httpd     S   504 24121  8444  0  75   0 17356 87299 429493 ?        00:00:00 httpd     S   504 24929  8444  0  75   0 17356 87299 -      ?        00:00:00 httpd     S   504 27918  8444  0  75   0 17356 87299 -      ?        00:00:00 httpd     S   504 24778  8444  0  75   0 17360 87299 -      ?        00:00:00 httpd     S   504 27075  8444  0  75   0 17360 87299 -      ?        00:00:00 httpd     S   504 20603  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd     S   504 24031  8444  0  75   0 17364 87299 429493 ?        00:00:00 httpd     S   504 24791  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd     S   504 26509  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd     S   504 27249  8444  0  75   0 17364 87299 -      ?        00:00:00 httpd     S   504 24148  8444  0  75   0 17372 87299 -      ?        00:00:00 httpd     S   504 24777  8444  0  75   0 17372 87299 -      ?        00:00:00 httpd     S   504 24472  8444  0  75   0 17392 87299 semtim ?        00:00:00 httpd     S   504 24789  8444  0  75   0 17432 87299 429493 ?        00:00:00 httpd     S   504 27066  8444  0  75   0 17432 87299 429493 ?        00:00:00 httpd     S   504 27106  8444  0  75   0 17452 87299 -      ?        00:00:00 httpd     S   504 26508  8444  0  75   0 17472 87299 -      ?        00:00:00 httpd     S   504 24168  8444  0  75   0 17488 87299 -      ?        00:00:00 httpd     S   504 22355  8444  0  75   0 17492 87299 -      ?        00:00:00 httpd     S   504 23656  8444  0  75   0 17844 87555 -      ?        00:00:00 httpd     S   504 27088  8444  0  75   0 17888 87555 -      ?        00:00:00 httpd     S   504 28198  8444  0  75   0 17900 87555 -      ?        00:00:00 httpd     S   504 26694  8444  0  75   0 17960 87555 -      ?        00:00:00 httpd     S     0  8444     1  0  78   0 20276 87043 -      ?        00:00:00 httpd     S   504 27271  8444  0  75   0 28796 90883 -      ?        00:00:00 httpd     S   504 19949  8444  0  75   0 28888 90883 -      ?        00:00:00 httpd     S   504 25736  8444  0  75   0 29840 91395 -      ?        00:00:00 httpd     S   504 27086  8444  0  75   0 29848 91395 -      ?        00:00:00 httpd     S   504 26606  8444  0  75   0 29856 91395 429493 ?        00:00:00 httpd     S   504 24159  8444  0  75   0 29876 91395 -      ?        00:00:00 httpd     S   504 26821  8444  0  75   0 29876 91395 -      ?        00:00:00 httpd     S   504 26815  8444  0  75   0 29932 91395 -      ?        00:00:00 httpd     S   504 27418  8444  0  75   0 29940 91395 -      ?        00:00:00 httpd     S   504 27426  8444  0  75   0 29944 91395 semtim ?        00:00:00 httpd     S   504 27468  8444  0  75   0 29948 91395 -      ?        00:00:00 httpd     S   504 26587  8444  0  75   0 29952 91395 -      ?        00:00:00 httpd     S   504 24486  8444  0  75   0 29956 91395 semtim ?        00:00:00 httpd     S   504 24951  8444  0  75   0 29956 91395 429493 ?        00:00:00 httpd     S   504 24180  8444  0  75   0 29960 91395 -      ?        00:00:00 httpd     S   504 24305  8444  0  75   0 29972 91395 -      ?        00:00:00 httpd     S   504 24467  8444  0  75   0 30008 91395 -      ?        00:00:00 httpd     S   504 26507  8444  0  75   0 30032 91395 semtim ?        00:00:00 httpd     S   504 24460  8444  0  75   0 30056 91651 -      ?        00:00:00 httpd     S   504 23669  8444  0  75   0 30076 91395 -      ?        00:00:00 httpd     S   504 26580  8444  0  75   0 30088 91651 -      ?        00:00:00 httpd     S   504 23112  8444  0  75   0 30172 91395 -      ?        00:00:00 httpd     S   504 26607  8444  0  75   0 30192 91395 -      ?        00:00:00 httpd     S   504 24772  8444  0  75   0 30212 91395 -      ?        00:00:00 httpd     S   504 24942  8444  0  75   0 30216 91395 -      ?        00:00:00 httpd     S   504 24167  8444  0  75   0 30220 91395 -      ?        00:00:00 httpd     S   504 26478  8444  0  75   0 30228 91395 -      ?        00:00:00 httpd     S   504 24184  8444  0  75   0 30260 91395 429493 ?        00:00:00 httpd     S   504 27425  8444  0  75   0 30292 91395 -      ?        00:00:00 httpd     S   504 22348  8444  0  75   0 30388 91651 -      ?        00:00:00 httpd     S   504 26605  8444  0  75   0 30396 91651 -      ?        00:00:00 httpd     S   504 22678  8444  0  75   0 30420 91395 -      ?        00:00:00 httpd     S   504 24489  8444  0  75   0 30452 91395 153384 ?        00:00:00 httpd     S   504 24296  8444  0  75   0 30480 91395 -      ?        00:00:00 httpd     S   504 24095  8444  0  75   0 30600 91651 -      ?        00:00:00 httpd     S   504 23085  8444  0  75   0 30688 91651 -      ?        00:00:00 httpd     S   504 19586  8444  0  75   0 30768 91395 -      ?        00:00:00 httpd     S   504 24182  8444  0  75   0 30768 91395 -      ?        00:00:00 httpd     S   504 18511  8444  0  75   0 30820 91395 -      ?        00:00:00 httpd     S   504 26594  8444  0  75   0 30836 91395 -      ?        00:00:00 httpd     S   504 13358  8444  0  75   0 30856 91651 -      ?        00:00:00 httpd     S   504 17681  8444  0  75   0 30988 91395 -      ?        00:00:00 httpd     S   504 22336  8444  0  75   0 31016 91651 -      ?        00:00:00 httpd     S   504 15690  8444  0  75   0 31040 91395 -      ?        00:00:00 httpd     S   504 22718  8444  0  75   0 31072 91651 -      ?        00:00:00 httpd     S   504 19043  8444  0  75   0 31080 91395 -      ?        00:00:00 httpd     S   504 12815  8444  0  75   0 31108 91651 -      ?        00:00:00 httpd     S   504 23301  8444  0  75   0 31112 91395 -      ?        00:00:00 httpd     S   504 24183  8444  0  75   0 31164 91395 -      ?        00:00:00 httpd     S   504 22670  8444  0  75   0 31180 91395 -      ?        00:00:00 httpd     S   504 22327  8444  0  75   0 31216 91651 -      ?        00:00:00 httpd     S   504 21489  8444  0  75   0 31220 91395 -      ?        00:00:00 httpd     S   504 21474  8444  0  75   0 31284 91395 -      ?        00:00:00 httpd     S   504 21596  8444  0  75   0 31296 91651 -      ?        00:00:00 httpd     S   504 22690  8444  0  75   0 31448 91395 -      ?        00:00:00 httpd     S   504 26595  8444  0  75   0 31452 91651 429493 ?        00:00:00 httpd     S   504 20312  8444  0  75   0 31476 91651 429493 ?        00:00:00 httpd     S   504 24313  8444  0  75   0 31592 91397 -      ?        00:00:00 httpd     S   504 24179  8444  0  75   0 31696 91395 -      ?        00:00:00 httpd     S   504 22369  8444  0  76   0 31732 88329 -      ?        00:00:00 httpd     S   504 13373  8444  0  75   0 31768 91395 429493 ?        00:00:00 httpd     S   504 17667  8444  0  75   0 31960 91651 429493 ?        00:00:00 httpd     S   504 18517  8444  0  75   0 32012 91651 -      ?        00:00:00 httpd     S   504  7793  8444  0  75   0 32040 91651 -      ?        00:00:00 httpd     S   504 17658  8444  0  75   0 32116 91395 -      ?        00:00:00 httpd     S   504 27272  8444  0  75   0 32224 91395 -      ?        00:00:00 httpd     S   504 13901  8444  0  75   0 32784 91395 -      ?        00:00:00 httpd     S   504 15366  8444  0  75   0 33168 91651 -      ?        00:00:00 httpd     S   504 24577  8444  0  75   0 33256 88085 -      ?        00:00:00 httpd     S   504 14330  8444  0  75   0 34192 91651 -      ?        00:00:00 httpd     S   504 15155  8444  0  75   0 34296 91395 -      ?        00:00:00 httpd     S   504 16312  8444  0  75   0 34496 91395 -      ?        00:00:00 httpd     S   504 28194  8444  0  75   0 36996 88848 -      ?        00:00:00 httpd     S   504 24776  8444  0  75   0 43720 92169 429493 ?        00:00:00 httpd     S   504 20584  8444  0  75   0 44224 92169 -      ?        00:00:00 httpd     S   504 22331  8444  0  75   0 44636 91913 -      ?        00:00:00 httpd     S   504 24033  8444  0  75   0 45496 91664 -      ?        00:00:00 httpd     S   504 22375  8444  0  75   0 46320 91664 -      ?        00:00:00 httpd     S   504 22378  8444  0  75   0 50064 91664 -      ?        00:00:00 httpd     S   504 24481  8444  0  75   0 53836 93968 -      ?        00:00:00 httpd     S   504 22354  8444  0  75   0 62124 93962 -      ?        00:00:00 httpd      Doest that change what you would recommend me?


title: wp-custom-menu filter removes the current_page_item class

text:
After adding wp-custom-menu-filter plugin - to hide some menu items for not- logged in users, the current_page_item class disappeared from my menu. `$item->classes` in the walker is an empty array, instead of usual `page- item-$id`, `current_page_item`. I've looked at the source, but it does not modify the classes array, so I don't know what's going on. Here is the relevant part of the code.               function wps_custom_nav_menu_items( $args ){         global $wpcmfp_settings;              $nav_item_db_id = $args[1]->ID;         $nav_menu = wp_get_object_terms( $nav_item_db_id, 'nav_menu' );         $menu_id = $nav_menu[0]->term_id;              // Get the class to exclude         if ( !is_user_logged_in() ) {             $exclusion_class = $wpcmfp_settings[ 'menu-' . $menu_id . '-loggedout' ];         }         else {             $exclusion_class = $wpcmfp_settings[ 'menu-' . $menu_id . '-loggedin' ];         }              $nav_items = wp_get_nav_menu_items( $menu_id );              // Cycle through all nav_items         foreach ( $nav_items as $nav_item ) {                     // Cycle through all classes             for ( $i=0; $i < count( $nav_item->classes ); $i++ ) {                 $exclude = false;                      // if nothing is there set to add                 if ( strlen ( $nav_item->classes[ $i ] ) < 1 ) {                     $exclude = false;                 }                 else                 {                        // if matches add to exclusion array & break loop                     if ( $nav_item->classes[ $i ] == $exclusion_class ) {                         $excluded_nav_items[] = $nav_item;                          $exclude = true;                         break;                     }                 }             }                  if ( $exclude != true )                 $modified_nav_items[] = $nav_item;              }              return $modified_nav_items;     }          add_filter( 'wp_nav_menu_objects', 'wps_custom_nav_menu_items' , 10 , 3);      I'm using custom page walker, I've tried using the default one with no effect, and the custom one works just fine without this plugin. Here is the code of the walker:               class My_Walker_Page extends Walker_Nav_Menu {            protected $_counter = 0;       protected $_itemsPerColumn = 1;            function start_lvl(&$output, $depth) {         $this->_counter = 0;              $output .= '<some html>';            }            function end_lvl(&$output, $depth) {         $output .= '<some html>';                 $this->_counter = 0;       }            function start_el(&$output, $page, $depth, $args, $current_page = null) {              $args = ( array ) $args;              if ($depth == 0) {           return parent::start_el ( $output, $page, $depth, $args, $current_page );         }              if ($depth == 1) {           extract ( $args, EXTR_SKIP );           $output .= '
url ) . '" title="' . esc_attr ( wp_strip_all_tags ( apply_filters ( 'the_title', $page->title, $page->ID ) ) ) . '">' . $link_before . apply_filters ( 'the_title', $page->title, $page->ID ) . $link_after . '';                if (! empty ( $page->description )) {             $output .= '' . $page->description . '';           }                $output .= '
';                $this->_counter ++;           if ($this->_counter % $this->_itemsPerColumn == 0) {             $output .= '

';           }              }       }            function end_el(&$output, $page, $depth) {         if ($depth == 0) {           return parent::end_el ( &$output, $page, $depth );         }       }            function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {              if (! $element)           return;              $id_field = $this->db_fields ['id'];         if ($depth == 0) {           $this->_itemsPerColumn = ceil ( count ( $children_elements [$element->$id_field] ) / 4 );         }              return parent::display_element ( $element, $children_elements, $max_depth, $depth, $args, $output );       }     }      I'm OK with going with another way to hide menu items for non-logged in users, instead of fixing the plugin, but since I've never used the `wp_nav_menu_objects` I really don't know what is going on.


title: Using call_user_func() within add_settings_section() within a Class

text:
I am trying to `add_settings_section()` by supplying a callback with parameter as follows:               class warpress_progression_plugin {       function warpress_progression_plugin() {         $this->__construct();       }       function __construct() {         add_action('admin_init', array(&$this, 'plugin_admin_init'));       }       function plugin_admin_init() {         $rows = $this->get_options_structure();         for ($i = 0; $i < count($rows); $i++) {           add_settings_section('expansion_'.$row->expansion_id,'',call_user_func(array(&$this, 'display_expansion'), $row->expansion),'warpress_progression'); // PROBLEM SEEMS TO BE HERE         }       }       function display_expansion($expansion_name) {         echo "
" . $expansion_name . "
";       }     }      However, I'm getting the following error: > **Warning: call_user_func() [function.call-user-func]: First argument is > expected to be a valid callback** However, the echo of               "
" . $expansion_name . "
"      is occurring as I would have expected. What am I doing wrong here?


title: Set menu active state for custom posttype and category, given custom taxonomy term

text: How to set the menu active state for a custom posttype and category, given a custom taxonomy term? I have a custom taxonomy: region, a custom posttype: business, and use the categories taxonomy. My custom primary menu consists of the region terms. When I select a region, the corresponding menu item is highlighted OK. The region page shows a listing of relevant categories. Now, when I select a category on this page the corresponding menu item is not highlighted. In turn, the category page shows a listing of businesses. Also, when I click on a business, the corresponding menu-item is not highlighted. So, how to set the menu active state on a category page and on a business post, given a custom taxonomy term? I do have a session variable region available on these pages.


title: Rewrite permalinks for custom posttype and custom taxonomy

text: How to rewrite permalinks for a custom posttype and custom taxonomy? I have a custom taxonomy: region, and a custom posttype: business. Now, how to rewrite the permalink, so that   * for a category, the fixed "category" part is replaced with the custom taxonomy term: `/%region%/%category%/`   * for a business: `/%region%/%category%/%business%/` I'm stuck with this. However, I did manage to rewrite the permalink for a region to `/%region%/`:               add_action( 'init', 'region_init' );     function region_init() {       // set labels         $labels = array(         'name' => _x( 'Regions', 'taxonomy general name' ),         'singular_name' => _x( 'Region', 'taxonomy singular name' ),         'search_items' =>  __( 'Search Regions' ),         'popular_items' =>  __( 'Popular Regions' ),         'all_items' => __( 'All Regions' ),         'parent_item' => __( 'Parent Region' ),         'parent_item_colon' => __( 'Parent Region:' ),         'edit_item' => __( 'Edit Region' ),          'update_item' => __( 'Update Region' ),         'add_new_item' => __( 'Add New Region' ),         'new_item_name' => __( 'New Region Name' )       );       // create a new taxonomy       register_taxonomy(         'region',         'business',         array(           'labels' => $labels,           'label' => __('Region'),           'sort' => true,           'args' => array('orderby' => 'term_order'),           'show_in_nav_menus' => true,           'query_var' => true,           'rewrite' => array( 'slug' => '', 'with_front' => false )         )       );     }          add_action('init', 'my_rewrite');     function my_rewrite() {         global $wp_rewrite;         $wp_rewrite->add_permastruct('typename', 'typename/%year%/%postname%/', true, 1);         add_rewrite_rule('typename/([0-9]{4})/(.+)/?$', 'index.php?typename=$matches[2]', 'top');         $wp_rewrite->flush_rules(); // !!!     }


title: How can i change the order of comments?

text: I like to have the latest comment shown above. Just under the post. Now the oldest comment is shown. How can i change the order? With regards, Albert


title: Calling the widget id of a mult-instance widget from inside the widget?

text: I'm trying to output a unique widget ID inside my mult-instance widgets. So far the following hasn't worked. Is there a unique ID and how do I call it? Thanks.               function widget($args, $instance) {     // outputs the content of the widget         extract( $args );         $widget_id = $instance['widget_id'];         ?>     <?php echo $widget_id ; ?>     <?php     }      Thanks.


title: Controlling Taxonomy Category listings to hide and unhide specifics

text: I have a vertical menu using the superfish script that shows categories in a custom 'productcategory' taxonomy. This menu has multiple levels, and is hierarchical.At the bottom of each branch of the tree we have the end category which represents a range of products, which the client does **not** want to show in this menu. I am using this code to display it:               <ul class="frontcatlist sf-menu">     <?php         $a = array(             'title_li'  =>  '',             'taxonomy'  =>  'productcategory',             'depth'     =>  2         );         wp_list_categories( $a );     ?>     </ul>      This is what I currently have in terms of what is showing and what isnt. left being the main categories, and each line being 1 step down to its children: ![alt text](http://i.stack.imgur.com/0Mw70.jpg) Those in the red are the categories that are not shown in the menu, This is not what my client needs however. While I could produce a menu that fits the requirements using the native Wordpress 3 menus, that would require manual intervention, intervention that is undesirable, both from a usability perspective, and from the clients wishes. Since some main categories have subcategories that should be shown and some dont, the depth parameter will not suffice. Instead this is what I need, with the top level categories always showing: ![alt text](http://i.stack.imgur.com/TgUMB.jpg) Im not sure how to do this, and the only clue I have is a custom walker class to output custom html, during which I might be able to filter out the ones I dont want **( any categories with a parent that has no children)**. But I could not see any sufficient examples or articles on the subject, and I'd rather not loose the classes and markup wordpress provides If anybody has any thoughts, or knows of tutorials forum posts or articles of use, I'd much appreciate it =)


title: wp_list_pages sort order by custom nav menu order

text: Does anyone know of a way to create a sitemap by using wp_list_pages and have the order by the same orders a custom nav menu?


title: echo get_post_meta()

text: this is a silly question, but i dont know, can anyone help me out in this i want to `echo get_post_meta()` on a url, but i am getting parse error i am having a function, where in the between of url one field can be filled by the value of custom field here is the code `($doc->load('http://twitter.com/statuses/user_timeline/' . . '.rss'));` the space between `. .` there i want to echo the value of my get_post_meta value, but if i write something like this `($doc->load('http://twitter.com/statuses/user_timeline/' .echo get_post_meta() . '.rss'));` i know this step is wrong, then too i tried, i get parse error how can i echo it???


title: add a "list" into add meta box : problem

text: i found a code searching through stackexchange --> to create a "list" inside a meta box of a custom type, BUT, i don't see anything appearing in this meta box, except the input field (which comes from the example page from the CODEX : http://codex.wordpress.org/Function_Reference/add_meta_box), is it a problem with WP_QUERY inside a function? Can you please tell me what is the magic trick to fix this? in my callback function, i added this code :               function myplugin_inner_custom_box() {       // Use nonce for verification       wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );            // The actual fields for data entry       echo '<label for="myplugin_new_field">';       _e("Description for this field", 'myplugin_textdomain' );       echo '</label> ';       echo '<input type="text" id="myplugin_new_field" name="myplugin_new_field"/>';                $s_query = new WP_Query( array(      'suppress_filters' => false,      'post_type' => 'movies'));     while($s_query->have_posts()):$s_query->the_post();              $sname = $post->post_title;         $s_output2 ='';         $s_output2 .= '<option value="'.$post->ID.'" >';         $s_output2 .= $post->post_title;         $s_output2 .= '</option>';         echo $s_output2;          endwhile ;     wp_reset_query();     }      But as i said, the "list" doesn't appear. Could you please help me?


title: How to increase the character limit for post name of 200?

text: I have post name in Thai which uses `UTF-8` character. Many of them encode into super long in ASCII e.g. วิธีการหลีกเลี่ยงข้อผิดพลาดทั้ง-8-ในชีวิตการแต่งงาน I've changed the type of "post_name" using phpMyAdmin to `VARCHAR(1000)` and collation to `utf8_unicode_ci`. However, in my WordPress backend editor, the above post name is still automatically cut to วิธีการหลีกเลี่ยงข้อผิ when I try to save the URL. There is this plugin that lift the character limit but it's in Thai which I can't read. Any ideas?


title: Is there any site where i can found good documentation of wp-ecommerce plugin?

text: **There is no good documentation in the plugin official site** I am trying to making a web shop in WordPress with wp-ecommerce pluign. But i don't find any good documentation in the web. Even the official site for the plugin is not helping. Do you know any site or good tutorial about the wp-ecommerce plugin? I will really appreciate if you can share your personal experience with me.


title: How to handle a shortcode function directly?

text: I was wondering how i can handle a shortcode function directly? At the moment i have created a shortcode which works OK. The shortcode function outputs a image. Now in functions.php i have another function which needs the output image. I am using the do_shortcode and it works.               $image = do_shortcode('[route_thumb id="'.$post_id.'"]') ;      but how can i call the function directly this one didn't work                $image = route_thumb_function($atts['id']=$post_id);


title: wp_dropdown_pages() returns empty string for post type anything other then page

text: `wp_dropdown_pages()` while using for any post type other then `page` returns empty string. Codex says post type can be passed as key also the function uses `get_pages()` which takes the `post_type` key. So, I don't see why it isn't working for me.                   $args = array(             'echo' => 1,             'name' => 'my_posts',             'post_type' => 'post',             'show_option_none' => 'any'         );         $select = wp_dropdown_pages($args);      Any idea?


title: Enable CORS in wordpress

text: I'm trying to enable CORS in wordpress and I've placed this line of code in my header.php file `header("Access-Control-Allow-Origin: *");` Then I tested to see if it works via this page http://client.cors- api.appspot.com/client The response I get is:               Fired XHR event: loadstart     Fired XHR event: readystatechange     Fired XHR event: error          XHR status: 0     XHR status text:      Fired XHR event: loadend      I'm not sure what I'm doing wrong here, anybody able to help me out? Thanks


title: Adding Menu Items in Custom Post Types

text: I'm creating a directory of restaurants with Custom Post Types. Each restaurant's information has its own post. I would like to be able to add the restaurant's menu items to each custom post type and I'm curious how I would achieve this. I would need to make a number of fields which contain information about each menu item - the name, price, and description. I would also need the ability to click a button that says "Add another" which would then produce another row of these fields so the user can add another menu item. I'd be very appreciative if anybody knew how to do this or had a link to a tutorial.


title: Search WooCommerce Products in WordPress

text: I've noticed that my WooCommerce products are not searched by the default WordPress search function. Any idea how to modify the function to ensure that products and product tabs are searched?


title: Remove WYSIWYG editor on all custom post type EXCEPT regular posts

text: Trying to remove the WYSIWYG Editor on all post types except the default pages and posts. Shouldn't this work               // Remove WYSIWYG Editor     function remove_wysiwyg( $hook ) {         if ( $hook != 'post-new.php' || $hook != 'post.php' )         add_filter('user_can_richedit', '__return_false');     }     add_action( 'init', 'remove_wysiwyg' );


title: image_resize in wp3.5 change to wp_get_image_editor and wont work

text: After 3.5 removed support image_resize and now says to use wp_get_image_editor as described here: https://codex.wordpress.org/Function_Reference/wp_get_image_editor Before (when it was image_resize), it would take in the image and the resize dimensions and it would resize the image and save the new file. Show as this code:               $thumb = image_resize($file, 80, 80, true);      After and trying to use the new function wp_get_image_editor doesnt quite work the same.               $image = wp_get_image_editor($file);          if ( ! is_wp_error( $image ) ) {         $image->resize( 80, 80, true );         $image->save( 'new_image.jpg' );     }      I want to be able to get the $thumb value after the resize() and save() actions are done. Any ideas or insight? I dont think that the info page has enough detail about this.


title: Taxonomy Tag Conditionals

text: I'm using jigoshop as main ecommerce plugin. Jigoshop use Taxonomies call, product_cat and product_tag. In my theme I use a default (h5bp) 404.php, so every time a tag doesn't exist I get the default 404. But I need to have a special template that give a `THIS TAG DO NOT EXIST` how can I do this? I'm using pointless:               @@@     <?php          if (is_tax()){         jigoshop_get_template( 'product_taxonomy-no.php' );     }else{      jigoshop_get_template( 'product_taxonomy-no.php' );     }     ?>     @@@      thanks


title: Rewrite rule that wp-login.php?action=register is left alone

text: Unfortunately buddypress breaks a facebook connect script because of the rewrite rules. It changes `/wp-login.php?action=register` into `/register/` I tried to find where the custom rewrite rule is located but wasn't successful. Is there any way to just add something to .htaccess that wp leaves /wp-login.php?action=register alone? I tried some things like               RewriteRule ^wp-login\.php$ - [PT,L]      but it didn't work. Any help would be awesome.


title: wp_nav_menu: output featured image of each page listing

text: Context: I am building a portfolio index where I can sort the individual project links in my sidebar by priority of appearance. I've successfully done this using the wp_nav_menu(), where each project is represented by the text name, and then I can move each Page's priority of appearance. What I get is something like this: Projects Menu List:   * Project A Page   * Project B Page   * Project C Page Now, I'd like to extend this feature by outputting the featured image associated with every individual project page so that it looks something like this: Project Menu List:   * Project A Page [+ Featured Image associated with Project A Page]   * Project B Page [+ Featured Image associated with Project B Page]   * Project C Page [+ Featured Image associated with Project C Page] Is this possible with the wp_nav_menu() call? If so, any clues on how to extend it further? Thanks!


title: Issues renaming images during upload

text: The main reason for adding this snippet is all about SEO. The people I sometimes make websites for often aren't that savvy with WP and tend to upload their stuff just as is. As these are often media related websites I try to help them a bit by automatically renaming their uploads from `DSC_0010.JPG` to `my-optimized-post-title-001.JPG`, etc. * * * I'm currently using this snippet which renames my files during upload.               add_filter( 'wp_handle_upload_prefilter', 'my_modify_uploaded_file_names', 1, 1 );     function my_modify_uploaded_file_names( $image_name ) {       // get the parent post id, if there is one       if ( isset( $_GET['post_id'] ) ) {         $post_id = $_GET['post_id'];       } elseif ( isset( $_POST['post_id'] ) ) {         $post_id = $_POST['post_id'];       }       // only do this if we got the post id, otherwise they're probably in the media section rather than uploading an image from a post       if ( is_numeric( $post_id ) ) {         // get the post slug         $post_obj  = get_post( $post_id );         $post_slug = $post_obj->post_name;         // if we found a slug         if ( $post_slug ) {           $random_number = rand( 10000, 99999 );           $image_name['name'] = $post_slug . '-' . $random_number . '.jpg';         }       }       return $image_name;     }      However, when having `WP_DEBUG` set to true it giving me this error:               Notice: Undefined variable: post_id in /home/lorem/public_html/clients/ipsum/wp-content/plugins/myplugin/test.php on line 18     Warning: Cannot modify header information - headers already sent by (output started at /home/lorem/public_html/clients/ipsum/wp-content/plugins/myplugin/test.php:504) in /home/lorem/public_html/clients/ipsum/wp-includes/pluggable.php on line 864      From the question linked to people tell it's missing the `$_GET` variables. Something I'm unable to solve myself... Does someone know perhaps on how to get this script working again? (or know perhaps a similar solution?)


title: Display all post types together

text:
I'm looking to use Custom Post Types to create a simplified process for key individuals to add information to a webpage. Let's use a Job Posting as an example, with custom fields for Job Title, Closing Date, etc. However, I also have regular posts across a number of categories. I would like to have _all_ posts listed together. So for the home page where it shows the last 3 posts, that includes those in custom post types (there will be several). I would also like to have these custom posts automatically set to specific categories, but these categories should be a part of the regular post types. If "Job Postings" and "Press Releases" are two categories under my regular post menu, I would also like a CPT of "Job_Posting" to be set to "Job Postings" automatically. This is for situations where we need to post information that would _belong_ to a job posting category but wouldn't necessarily be an actual postings with the required fields set up in that CPT. Am I going about this the wrong way entirely? * * * Update: I've changed my WP_Query to the following, and it still won't show CPT:
                 <?php                  $args = array(                     'post_type' => 'any',                 );                 $recent = new WP_Query($args);                 $recent->query('showposts=3');                 if($recent->have_posts()) : while($recent->have_posts()): $recent->the_post();?>
             <a class="recent-title" href="<?php the_permalink()?>"><?php the_title()?>

<?php the_time('l, F j, Y')?>

<?php the_category(', '); ?>

<?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?>

<?php the_excerpt()?>

                 <?php endwhile ?>                 <?php else : ?>                 <?php endif ?>


title: Plugin uninstall function is not working

text: I am updating my plugin for Wordpress version 3.5 compatibility. These are my important plugin files: Sort_SearchResult_by_Title.php:               <?php     if(!class_exists('Class_Sortsearchresults'))     {     require_once('Class_Sortsearchresults.php');     }     if(!isset($Class_Sortsearchresults))     {     $Class_Sortsearchresults = new Class_Sortsearchresults;     }     ?>      Class_Sortsearchresults.php:               <?php     class Class_Sortsearchresults     {     function __construct()     {              //Register activation hook            register_activation_hook(__FILE__,array(&$this,'sortresult_install'));              //Add menu hook         add_action( 'admin_menu', array(&$this,'sort_searchresults_menu'));              //Update function hook         add_action('plugins_loaded', array(&$this,'sortsearchtitle_update_db_check'));              //Register deactivation hook         register_deactivation_hook(__FILE__, array(&$this,'sortresult_uninstall'));              //Run the search function         add_action('pre_get_posts',array(&$this,'sort_searchresult_by_title'));          }          function sortresult_uninstall()      {              //This function is not working or executed              global $wpdb;                $sortsearchtitle_db_version = '1.0';         $table = $wpdb->prefix."sortsearchresult";         $wpdb->query("DROP TABLE IF EXISTS $table");         delete_option('sortsearchtitle_db_version');     }          function sortresult_install()     {         //install function     }             function sort_searchresults_menu()     {              //function for creating menu          }          function sortsearchtitle_update_db_check()     {              //function for update              }          function settings_page()     {         //function for settings form     }          function sortingguide($opt_val)     {              //sorting options          }          function sort_searchresult_by_title($k)     {         //function to run customized search          }          }     ?>      It appears I have everything working well except the uninstall function. Any clues why this is not working? Thanks.


title: Customize TinyMCE Buttons

text: I've always used the plugin TinyMCE Advance that lets me drag and drop which buttons I want to show in the Editor. Now I'm trying to set those using my functions.php instead. That way I never have to worry about it. Here's what I've done, but I'm not seeing the results:               function myformatTinyMCE($in){      $in['plugins']='inlinepopups,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpfullscreen';      $in['wpautop']=true;        $in['apply_source_formatting']=false;      $in['theme_advanced_buttons1']='bold,italic,underline,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,anchor,|,wp_fullscreen,wp_adv';      $in['theme_advanced_buttons2']='formatselect|pastetext,pasteword,removeformat,|,hr,charmap,|,undo,redo,|,html';      $in['theme_advanced_buttons3']='';      $in['theme_advanced_buttons4']='';           return $in;     }     add_filter('tiny_mce_before_init', 'myformatTinyMCE');      Edit: It's working in WP Pages and Posts, but I'm using the Advanced Custom Fields plugin, and on WYSIWYGs created by that plugin it does not work. Is there a way to force it to work with that as well?


title: Creating image gallery in wordpress

text:
Lets assume I have two following directories fruits and vegetables under my image folder and that I want to show all images on some specific page. My questions are following:   1. How to implement PHP script that will show all images from specific folder?   2. How can I implement to pull thumbnail and big image from same folder, and show them like in photobox mode, ie. once clicked on a thumbnail image, you get to big screen? I have tried modifying following
             <?php                  $temp = $wp_query;                  $wp_query = null;                  $wp_query = new WP_Query();                  $wp_query->query('showposts=-1&post_type=gallery'.'&paged='.$paged);                  while ($wp_query->have_posts()) : $wp_query->the_post();              ?>
                     <a rel="tooltip" title="<?php the_content();?>" href="                             <?php $saved_post_id = $post->ID; ?>                             <?php echo wp_get_attachment_url( get_post_thumbnail_id( $saved_post_id ) ); ?>                      ">                 <?php the_post_thumbnail('homepage-thumb');?>
                          <?php endwhile; ?>                  <?php                  $wp_query = null;                  $wp_query = $temp;  // Reset             ?>


title: Remove the columns in media library

text: How can i disable/remove the columns for Media Library? I want for **author** and **comments** column. Thanks in advance.


title: How can I make a post that belongs to a category or have specific tags, display different from the other single posts?

text: How can I make a single post display different from the other single posts when I add it to a specific category. example: I have a post that is in 3 categories: music, songs & video clips. I want every time that I add a post in category "songs", it will be displayed differently from all of the other default single posts that don't belong to the category songs. How can I do that? Also, can the same thing happen with tags too? Meaning, when I add to a post some specific tags can it change the template of the post?


title: How to obtain the html stripped version of $category->description?

text:
When writing out the category description in my theme (on archives and special category listings) for example, there are times I need the description in full html mode and others when I need it returned stripped of any html. In the code below, I actually need the stripped version of the description, however $category->description returns the full description with all tags, which is rendering my strlen snippet function inoperable depending on where it breaks. How can I obtain an html stripped version of the description in the loop below?               foreach($categories as $category) {         echo '
'.get_category_thumbnail($category->term_id, 'thumbnail').'term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'';                  if(strlen($category->description) > 300 ) echo SUBSTR( $category->description,0,STRPOS( $category->description,".",300)+1);             else echo  $category->description;


title: google conversion code

text: What is the best practice for adding google conversion tracking code to a specific page?


title: Get Permalink of Network Blog Post

text: I am trying to write a function that will allow me to specify a post ID and a blog ID, and then have it return the permalink and title of the blog post. I need this to be efficient because the function will be used in a foreach loop that could cause the function to run upwards of 50 times. Any ideas?


title: Showing posts by collection of specific terms and texonomy

text: i have a custom post type name 'business' and taxonomy 'business-category'. now i want to show posts for some specific terms suppost, term1, term2, term3 etc. The following code is working for me but for only one term.                 $args=array(         'taxonomy' => 'business-category',         'term' => 'term1',         'post_type' => 'business',         'orderby'=> 'rand',         );       query_posts($args);      I need to pass array of terms. When i try to pass array of terms instead of one term it not working :(                  $args=array(         'taxonomy' => 'business-category',         'term' => array('term1', 'term2', 'term3'),         'post_type' => 'business',         'orderby'=> 'rand',         );       query_posts($args);      I also want to know how can i show post if i want to show from multiple taxonomy as well. Thanks! * * * Resolved: the query args will be:                   $args=array(                 'tax_query' => array(                               array(                                     'taxonomy' => 'business-category',                                     'field' => 'slug',                                     'terms' => array( 'bars', 'restaurants' )                                )               );      Thanks!


title: The Great Plugin Nomenclature Contest of 2011

text: It's been a while since I've done a bounty challenge, so here's another. Same basic rules: 1 answer per person, most creative/useful/helpful/entertaining answer wins. This time around, the award will be 50 reputation points via a Bounty. This challenge is for my in-development plugin, **Crossfire**. ## Plugin Purpose Allows authors of multiple sites on a multisite network to cross-post their content from one site to another. ## How it Works Authors write a post as usual on the primary site. Then they select the sites to cross-post from a meta box. WordPress uses a custom post type to keep track of the cross-posted content on the sister sites. ## Endgame   * Visitors to both the main site and the sister sites will see the new post at the top of the page.   * Comments on one site are automatically mirrored to all the others.   * Feed subscribers will only see the new post in the original site's feed. As I said, the plugin will be called **Crossfire** , but I need a creative name for the custom post type used on sister sites (where the post content is imported). Calling them "posts" isn't accurate since they won't show up in the site's feed. So, give me your best ideas and the _best_ of the best will be awarded 50 reputation points! Contest ends Friday, April 23 at 19:00 UTC (12:00 Pacific).


title: How can I make it so the Add New Post page has Visibility set to Private by default?

text: I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default:               Status: Draft     Visibility: **Private**     Publish immediately          [Publish]      ...as opposed to what WordPress normally assumes:               Status: Draft     Visibility: **Public**     Publish immediately          [Publish]      At the moment, I'm using the "wp_insert_post_data" filter, and that is allowing me to change any posts with a post_status of "auto-draft" to "private". While this works, there is an unintended side-effect: Changing the post_status to "private" seems to publish the post automatically, changing the button in the editor to "Update". Furthermore, if the user saves before specifying a title, the post will be published with the title "Auto-Draft". Is there any way I can simply change Visibility to Private by the default, in a manner that doesn't auto-publish the post, and change the button to "Update"? In vanilla WordPress, users can manually change the visibility to Private, and the button remains as Publish... I just need to achieve that via a plugin. I also want to ensure that "public" can still be selected by the user, should they desire to. Thanks!


title: What's the best place to hire a freelance (contract) WordPress developer?

text: I'm looking to hire someone for ongoing work. Where should I be looking? I posted on Craigslist, oDesk, and Freelancer. I'm also going to check out CodePoet.com and jobs.wordpress.net.


title: wp_nav_menu sort order?

text: Hey Guys, I'm trying to build a right aligned, wrapping capable wp_nav_menu powered menu. Is there a way to have it rendered backwards, so that float: right; would work and not mess up the order? I was hoping for something like this:               <?php wp_nav_menu( array('sort_order' => 'DESC' )); ?>      Thanks!