title: RSS Feed has no Items (Possible Plugins Conflict)

text: I am the webmaster of the German WordPress website http://www.kunstplaza.de. Recently, I have noticed that there are no items in the RSS feed, although there should be some as I am posting new articles on a regular basis. The Feed URL is: http://www.kunstplaza.de/feed/ As far as I remember, this feed did work in the past. I have already deactivated all plugins and themes (one by one) and tried to retrieve the feed after that. Unfortunately, this did not have an effect. Only when I rename the "plugins"-folder, the feed starts to show up. In the error log of my hosting provider I have found this line quite some times:               [error] You have an error in your SQL syntax; check the manual that corresponds to your       MySQL server version for the right syntax to use near ']posts.ID NOT IN ( )  ORDER BY wp_posts.post_date DESC' at line 1 f\xc3\xbcr Abfrage SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND (wp_posts.ID = '296') AND wp_posts.post_type = 'page' AND $wpdb-]posts.ID NOT IN ( )  ORDER BY wp_posts.post_date DESC  von require('wp-blog-header.php'), wp, WP-]main, WP-]query_posts, WP_Query-]query, WP_Query-]get_posts, W3_Db-]query, W3_DbCache-]query, W3_DbCallUnderlying-]query, W3_Db-]query, W3_DbProcessor-]query, W3_Db-]default_query      I guess, this is the error that blocks the RSS feed from working in a correct way. It seems as if the W3Cache Plugin is causing this issue. I have already deleted the whole plugin and reinstalled it from scratch. This did not solve the issue. I am using this plugin on other sites with the same configuration without having any problems. I guess, the database needs to be repaired somehow. Unfortunately, as I am not a programmer, I do not have an idea of where to start or which db tables could be involved. Does somebody of you have a clue? What could be a potential source of this issue? Thanks a lot for your feedback!


title: Set featured image from external URL

text: I have been searching high and low for a work-around to set a featured image from an external URL. I understand by default the image must be on my server to get re-sized and displayed. Essentially I have a dozen live web cams that take pictures every 30 minutes, and I need to be able to set up a _wall_ of good sized thumbs like this so all images can be scanned on one page. Please let me know if you can provide a quick snippet that can help.


title: There's a way to scale media (images) at 50%?

text: I wonder if there is a way to scale down uploaded media exactly to 50%. From what I see, with `add_image_size` you can only specify a width and a height in pixel. The idea is to upload high resolution images for Retina displays and then let Wordpress generate a custom image size scaled down for standard displays. The best would be apply this to both the original image as well as all the others custom thumbnail generated. Thanks for the help.


title: Display future posts?

text: Is there a way to display posts, scheduled for the future? I want to use the published data as an event date and time, which is obviously in the future. I still would like to use these posts for a loop, and for single pages.


title: Hide wordpress plugins from list

text: I am using a couple of wordpress plugins for my theme, enabling them programmatically. I would not want the user of my theme to be bugged with plugin updates for these plugins, as well as viewing them in the wordpress admin panel plugins lists. Is there a way to exclude these plugins from automatic version checker and the plugins list ?


title: change the year on all of my custom post types?

text: I need to change the published year on all of a custom post type from 2010, to 2011. What is the quickest way to do it? I have 200 entries, so manual would take hours!!


title: User Login System with File Delivery?

text: I'm wondering if it's possible through a plugin, or otherwise, to allow people to register on my WordPress site for an account. And then through my control panel, I can manage their accounts. Here's a little backstory of what I'm trying to accomplish. My client runs a dance competition. They would like to be able to upload audio critiques, videos and media. And they'd like to be able to deliver that content just to specific accounts. For instance, a mother goes to the site and registers an account. She logs in and is able to get media related to her son or daughter from a control panel that my client uploaded specifically for them. Is this within the realm of possibility in WordPress? Does a solution already exist? And if not, if anyone could suggest a workaround that would be great. Any help would be greatly appreciated. Thanks!


title: How do I edit a plugin's core properly?

text: I'm a WP beginner. So I'm using a plugin called breadcrumb-trail. I'm about to upgrade it, but I noticed that I had tweaked `/breadcrumb-trail/breadcrumb-trail.php` a little bit in the past. How would I extract these changes to another file so that they won't be deleted when I upgrade breadcrumb-trail? here's an example of one of my changes (I commented out the 2nd line of the array): before:                   $defaults = array(             'separator' => '»',             /*'before' => '' . __( 'Browse:', $textdomain ) . '',*/             'after' => false,             'front_page' => true,             'show_home' => __( 'Home', $textdomain ),             'echo' => true         );      after:                   $defaults = array(             'separator' => '/',             'before' => '' . __( 'Browse:', $textdomain ) . '',             'after' => false,             'front_page' => true,             'show_home' => __( 'Home', $textdomain ),             'echo' => true         );      I'm asking more for general practices when editing a plugin's core. I have other plugins that I have modified.


title: Is there a author_update action?

text: Is there an action you can tie into whenever an authors information is updated. (ie they update their display name). If not is there any way to tie into this?


title: Better solution for managing media attachments with `wp_editor()`?

text: Currently using `wp_editor();` on the front-end of my website as a content submission form. All posts submitted are set as a "Pending", which will later be published or deleted by an administrator. The "Add Media" button has been allowed in the `wp_editor();` call. Users are required to be registered and logged in with a user role of "author". Authors are allowed to manage their own posts. However, when clicking the "Add Media" button as an author user, all uploads fail. Due to the fact that anything uploaded via `wp_editor();` is adding the attachments to that page. Which would require the user to have the following capabilities: `edit_pages`, `edit_published_pages`, and `edit_others_pages`, but as you know... the default capabilities for an "Author" user doesn't have these capabilities, which in-turn, causes the upload to fail. **My work around solution:**               public function modify_author_role(){         if(is_page('submit-content')){             $role = get_role('author');             $role->remove_cap('read');             $role->add_cap('edit_pages');             $role->add_cap('edit_published_pages');             $role->add_cap('edit_others_pages');         } else{             $role = get_role('author');             $role->add_cap('read');             $role->remove_cap('edit_pages');             $role->remove_cap('edit_published_pages');             $role->remove_cap('edit_others_pages');         }     }     add_action('template_redirect', array($this, 'modify_author_role'));      So when the Author user is logged in, and viewing the content submission page, they are temporarily granted the capabilities: `edit_pages`, `edit_published_pages`, and `edit_others_pages`, while removing the capability: `read` (denying access to the dashboard -- if attempted to access while on the content submission page) If the author user is on any other page of the website, or directly accesses the dashboard, they will have normal access, and normal author capabilities. So the author user is only temporarily granted higher privileges while submitting content on the front-end of the website. I just feel like this is a huge security risk. There's GOT to be a more elegant solution than this. Is there some way that I can tell the uploads made via `wp_editor();` on the content submission page to just allow the author user to upload the file and not attach it to the content submission page (remaining unattached)?


title: Internal Linking Plugin or code

text: IS there a plugin or code that I could do the following   1. Choose a term, lets say Apple Ipad   2. Then that Apple Ipad term would automatically link to a post that also has those terms   3. The ability to pick terms and posts it links too be cool such thing out there?


title: How to build custom WP admin with custom URLs

text: I would like to create a custom WP admin area, that uses custom URLs to navigate thought it and have a custom generated HTML. A member will be able to login via a custom URL, for example: mysite.com/dashaboard or my.mysite.com When logged in a member will be able to see custom admin area where she/he can create pages, view/edit profile and so forth. I know this is doable in WP. However, I can't find anything that would explain the whole process well and take me through the steps in more detail. Currently, I don't know at all how to start tackling this. What's the best URL structure as a subdomain or not? What other considerations should be thought about? How to seamlessly integrate login/logout/password reminder WP functionality? How to integrate WP page and post creation (I'm guessing via URL masking)? I know this is a massive task. I would hugely appreciate if someone could explain a general picture of how to achieve this and what should be considered and help me to go through it step by step. Maybe someon can give me some pointers/links to research first, then I will get back to for help for the next step and so on. This might be a massive task for the stackexchange, perhaps someone will consider becoming my programming mentor and we can communicate via email/skype. I really much want to learn this. Please help me :) I'm ready to invest time into research and learning, but I need guidelines and mentoring. What do you guys think? Any ideas and pointers are much appreciated. Thank you, Dasha


title: Help Structuring Query for Archive Pages

text: I'm building a site with several different post types (blog posts, products, informational articles, etc.). On archive type pages (search results, tag pages, etc.), I want to display content from the different post types in visually distinct sections. Then, the user could either select the specific page we he wants, or click a link to see all of the results from a specific post type. How should I go about structuring my Loop? Should I use multiple `WP_Query` objects (one for each post type), or grab everything with one query and then separate it out with PHP? I can think of a couple ways to make this work, but I'm not sure what the best practice for performance and future proofing my code would be. Thanks. **Update:**   I wound up using Alex Lane's advise, and running multiple queries. I'm circumventing the main query for these archive pages (there's no need for it) by using the technique described on the wp-hackers list, and then I'm looping through all relevant post types and running a new `WP_Query` for each of them. It gets the job done, but it feels pretty kludgy and inelegant to me. **Update 2:**   As I think about this more, I'm wondering if it might be faster to just grab all of the posts, and then separate them into post type categories with PHP. I'm not an expert on database performance, though, so I don't know. I'm just imagining having to run a somewhat complicated search query 5-6 times (several of which will likely get no results) before the page loads. That seems really slow to me. On the other hand, pulling a massive data set from the database after just one query might be even slower. I guess the only way to know for sure would be to benchmark it, but I'm only one person, and I can't really afford the time to build and test both systems. Are there any MySQL performance experts out there that have any thoughts on this?


title: Image not displayed

text:
I am using the following inside images-options which is linked to functions.php.When clicked on submit button it crashes in wordpress admin               Image 1:	           <input type="text" name="director_image1" value="<?php print get_option('director_image1'); ?>" />

      I am using this to get the image in header.php.               var theImage=<?php $image = get_option('director_image1');?>     <?php if( $image) : ?>     <?php echo "'".$image."';"; ?>     <?php endif; ?>      And finally i am using theImage variable inside a javascript file :               {      src: theImage      fade: 3000      }      Could you please help me out the image is not being displayed. The console gives me this error: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wp- content/themes/GapInvite/images-options.php:2) in /Applications/MAMP/htdocs/wp-includes/pluggable.php on line 896


title: how to get extra info from checkout in wp-ecommerce

text: In wp-ecomemrce I have added a new field in the checkout to capture the company name. I need to get the data from the transaction but how? I am not sure how the form fields are stored to be able to retrieve them.


title: Custom field bug in Wordpress 3.2

text: I have a question. I just installed Wordpress 3.2. And ever since then, when I want to add a custom field, precisely when I clicked on "Add custom field", my page is refreshed. And no custom field is added. What is it ? Ajax bug ? Wordpress 3.2 ? Can you help me please ?


title: Why am I unable to login after converting to www?

text: So I originally designed the site without the www. I've since realized that it's going to cause more problems than necessary. I created a rewrite rule that converts to www. I then changed the domain in wp-config               define( 'DOMAIN_CURRENT_SITE', 'openeye.net' );     define( 'PATH_CURRENT_SITE', '/' );     define( 'SITE_ID_CURRENT_SITE', 1 );     define( 'BLOG_ID_CURRENT_SITE', 1 );     define('WP_HOME','http://www.openeye.net');     define('WP_SITEURL','http://www.openeye.net');     define('WP_MEMORY_LIMIT', '96M');      I'm now not able to edit pages or access wp-admin. What would cause that?


title: Taxonomy-{taxnonomy}.php is not working

text: I have just created a custom post type (portfolio) for a wordpress website. I also have added a Custom Taxonomy called (portfoliocategory). I have created a archive page for my Custom Post Type (archive-portfolio) which is working properly, but I need help with Custom Taxonomy Template, I have created taxonomy-portfoliocategory.php but it is showing the default archive page and not showing the taxonomy page template!!


title: Delayed commenting

text: We have a client who is using WP as part of an alternate reality game, and as part of it, they want to have 'characters' leave comments on posts at certain times. They basically want to be able to queue up comments in advance, so that they drop at the right time (similar to how you can control posts going live at a certain time.) Is there a plugin that handles this?


title: What is the advantage of using header-catname.php over is_category('catname');?

text: Let's say I have a category named as `catname` (the slug would be `catname`). I want the header styled differently when visitors open the category catname. The article on Ghacks explains how to create a custom header (styled differently) when visitors open the category catname, achieved by creating header-catname.php and including it in category-catname.php with `include(TEMPLATEPATH.'/header-catname.php');` (instead of the usual `get_header();` ). You can read the short article itself if my explanations is difficult to follow (I apologize for my lack of proficient English). My question is: what is the advantage of using above method, over using `is_category ('catname')` in header.php to create custom header only for the catname category? I mean, in the header.php we could just use this without creating additional header-catname.php:                <?php if ( is_category('catname') ) { ?>           /* Insert custom header for category catname here */           <?php } else { ?>           /* Insert the usual header here */           <?php } ?>      Does using the conditional IF make the page load slower? Or is there any disadvantage?


title: Does it make sense to assign functions like is_paged() to a variable rather than using it multiple times?

text: Actually a simple question, but I need to be sure that assigning a variable for the result of a function can help to increase the speed of a site e.g. The function: `if is_paged(){ $paged = 1; }` The replacement: ` if $paged == "1" .. then do ` \- RATHER THAN USING THE SAME FUNCTION over and over W3 total cache would most likely cache it, but sometimes users hit pages that are not cached and I think it could increase the speed of a website, **is my assumption correct?**


title: Change Login CSS - Include instead of echo

text: I'm trying to figure out how to include a stylesheet instead of echo'ing `<style>` tags. I'm currently using the following function:               // Custom Login Styles     function login_styles() {         echo '<style type="text/css">             h1 a {                 background: url('.get_template_directory_uri().'/etc/images/logo_login.png) center center no-repeat !important;                 display: block !important;                 height: 50px !important;                 margin: 0 auto 10px !important;                 position: relative;                 width: 131px !important;             }             .login #nav a, .login #backtoblog a {                 color: #FFF !important;                 text-shadow:none;                 text-decoration: none;             }             .login #nav a:hover, .login #backtoblog a:hover {                 color: #000 !important;                 text-shadow:none;                 text-decoration: none;             }             .login #backtoblog a {                 display:none;             }             body.login {                 background-color: #2F2F2F;             }             .login form {                 background-color: rgba(255, 255, 255, 0.6) !important;                 border-radius: 0 !important;             }             .login .message {                 border-radius: 0 !important;                 background: linear-gradient(to bottom, #7007B6 0%, #805B98 100%) repeat scroll 0 0 #16B4F1 !important;                 border-color: #7007B6 !important;                 color:#FFF !important;                 box-shadow:0 1px 0 rgba(120, 200, 230, 0.5) inset;             }             .login form .input, .login input[type="text"] {                 border-radius:0px !important;             }             .login h1 a {                 background-size: auto !important;             }             .login label {                 color: #2F2F2F;                 font-size: 14px;             }             .wp-core-ui .button-primary {                 border-radius: 0px !important;                 border-color: #7007B6 !important;                 box-shadow: 0 1px 0 rgb(127, 84, 155) inset;                 background: #805B98 !important; /* Old browsers */                 background-image: -moz-linear-gradient(top,  #805B98 0%, #7007B6 100%) !important; /* FF3.6+ */                 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#805B98), color-stop(100%,#7007B6)) !important; /* Chrome,Safari4+ */                 background-image: -webkit-linear-gradient(top,  #805B98 0%,#7007B6 100%) !important; /* Chrome10+,Safari5.1+ */                 background-image: -o-linear-gradient(top,  #805B98 0%,#7007B6 100%) !important; /* Opera 11.10+ */                 background-image: -ms-linear-gradient(top,  #805B98 0%,#7007B6 100%) !important; /* IE10+ */                 background-image: linear-gradient(to bottom,  #805B98 0%,#7007B6 100%) !important; /* W3C */             }             .wp-core-ui .button-primary:hover {                 box-shadow: 0 1px 0 rgb(127, 84, 155) inset;                 background: #7007B6 !important; /* Old browsers */                 background-image: -moz-linear-gradient(top,  #7007B6 0%, #805B98 100%) !important; /* FF3.6+ */                 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7007B6), color-stop(100%,#805B98)) !important; /* Chrome,Safari4+ */                 background-image: -webkit-linear-gradient(top,  #7007B6 0%,#805B98 100%) !important; /* Chrome10+,Safari5.1+ */                 background-image: -o-linear-gradient(top,  #7007B6 0%,#805B98 100%) !important; /* Opera 11.10+ */                 background-image: -ms-linear-gradient(top,  #7007B6 0%,#805B98 100%) !important; /* IE10+ */                 background-image: linear-gradient(to bottom,  #7007B6 0%,#805B98 100%) !important; /* W3C */             }             input[type="checkbox"] {                 margin: -1px 0 0 0 !important;             }         </style>';     }          add_action('login_head', 'login_styles');      Any help is greatly appreciated..


title: Should I use Pre Get Posts or WP_Query

text: I have the following query which I call in my taxonomy.php template via `query_brands_geo('dealers', 'publish', '1', $taxtype, $geo, $brands);` This function works perfectly. However after reading codex for query posts it mentioned pre_get_posts as a preferred way to alter the default query. Would the pre_get_posts be more efficient then my wp_query function below? If so how would I construct the pre_get_posts and pass my variable and query below?               function my_custom_query($posttype, $poststatus, $paidvalue, $taxtype, $geo, $brands) {        global $wp_query;         $wp_query = new WP_Query();        $args = array(            'post_type' => $posttype,            'post_status' => array($poststatus),            'orderby' => 'rand',            'posts_per_page' => 30,            'meta_query' => array(               array(                  'key' => 'wpcf-paid',                  'value' => array($paidvalue),                  'compare' => 'IN',                  )            ),            'tax_query' => array(               'relation' => 'AND',               array(                  'taxonomy' => $taxtype,                  'field' => 'slug',                  'terms' => $geo               ),               array(                  'taxonomy' => 'brands',                  'field' => 'slug',                  'terms' => $brands               )            )         );              return $wp_query->query($args);      }


title: current post with current author

text:
how can i check if the current post belongs to the current author? this is my basic code; `               if($curpost) {                     wpuf_edit_show_form($curpost);                 } else {                     $error = "there is no post.";                 }      ` also how can i add the same control to these action; `               function wpuf_user_dashboard_post_list() {         global $wpdb, $userdata;              get_currentuserinfo(); // grabs the user info and puts into vars              //delete post         if ($_REQUEST['action'] == "del")         {             check_admin_referer('wpuf_del');             wp_delete_post($_REQUEST['pid']);             echo '
deleted.
';         }              //get the posts         $sql = "SELECT ID, post_title, post_name, post_status, post_date "                 . "FROM $wpdb->posts "                 . "WHERE post_author = $userdata->ID AND post_type = 'post' "                 . "AND (post_status = 'publish' OR post_status = 'pending' OR post_status = 'draft') ";              $posts = $wpdb->get_results($sql);         $count = 1;         //d($posts);      ` thanks.


title: Automatically pull newer posts and append to current page.

text: I have a page that currently loads posts of custom post type using regular WP_Query. The custom post type are for news articles. Newer news articles (posts) are constantly written, as such there is a need for loading newer posts without having the user to refresh the page. The effect I am desiring is similar to what one can find on Facebook or Twitter. Whenever there is a new post or tweet on these sites, the newer post is automatically added to the top of the posts already displayed. Any code snippets or ideas on how to get this done? Regards, John


title: How do I insert an already uploaded video file into my Media Library?

text: I'm having problems with the WP uploader (hosting issue); WP is pooping out after uploading files that are relatively large (> 32MB). **My idea was to upload the video file via SFTP to the server and then try to get WP to insert it into the Media Library. How do I do this?** I know that it isn't as simple as just putting it into `wp- content/uploads/<date-path>/` because there is some meta-data to add to the back-end DB. I've seen some posts for `media_sideload_image` but looking at the code, it looks like this is specifically for images. I looked at `media_handle_sideload` but I'm not sure how it works or how to create a solution to insert this file where it needs to go. For example, the comments say: > @param array $file_array Array similar to a {@link $_FILES} upload array What does `{@link $_FILES} upload array` mean?


title: How to override pluggable function in theme?

text: All the documentation I've encountered discusses overriding pluggable function via your plugin. What if you're doing theme development instead? My functions.php requires another file that overrides the `get_user_by()` function, defined in `pluggable.php`. If I omit the `if( function_exists() )` call I get the "Cannot redeclare..." error. If I include the `if( function exists() )` call, then I get no error, but of course my function is then ignored, since the pluggable version exists. Based on Dominic's awesome post on the WordPress startup order, it's clear that `pluggable.php` is loaded _before_ your theme's `functions.php` and so forth, so that explains the error. So the question is - how can you take advantage of that nice pluggable architecture from within a theme, without resorting to writing plugins which then must be bundled or installed with the theme? **Further notes** : So it appears that the argument is that themes should not be trying to do what plugins do. But that argument is over four years old (according to the 4-digit trac number). I'd love to hear from some heavy hitters whether this philosophy still applies, given the complex topology of today's theme development landscape. I'd like to believe we've evolved since then. **Context** : I'm developing a one-off CMS solution for a customer, with a lot of custom metadata, customization of the Admin back-end, the login/authentication process, the works. And of course, there's the design component - that's where the theme part comes in. Fact is, these are simply **not** reusable components - they will never apply to another client, they will never be put under GPL and open sourced, and they are most certainly not to be distributed / installed on other WordPress deployments. At best there are some best practices I will leverage on future projects, but that will be strictly a reference / copy-paste job. This does not sound like a use case for plugins to me. The theme is installed, maybe a child theme of Twenty Eleven, maybe a standalone, its functions.php calls in a boatload of includes, each handling a different aspect of the CMS in question. Then the theme template files use custom 'template tags' that are defined in the includes. I don't want to have theme files with dependencies on some plugin or other being activated, etc. It just doesn't make sense to build complexity into the system. Sure, I can put it in the must-use plugins folder, but that still feels like a hack - right now, _everything_ that has to do with the customizations made for this project are contained in `wp- content/themes/my-theme/`. I don't also want to have to consider searching for stuff in some plugins folders as well. Don't get me wrong. I love plugins and I use them and write them. And I do use plugins in conjunction with this sort of highly customized theme development _when_ the plugin is third-party and represents best practices far beyond what I could possibly roll out in a reasonable timeframe. But when I need to modify core functionality for a one-off scenario, I turn to action hooks, filter hooks, and I'd like to be able to rely on pluggable functions for the user and authentication side of things too.


title: Is using taxonomies the way to go here or would custom post types be better?

text: I to create a site that will let subscribers select items from a list, say of books or DVDs - essentially building a collection that they could then add additional info, e.g. price paid, where purchased, etc. Then if a post is later added that is related to that item, the user would be notified. My thoughts are to use specific taxonomies for the list of items. And then figure out how I can let users check off their interest in these specific taxonomies and add the additional info. Then essentially subscribe them to posts related to only the taxonomies they are interested in. Am I off base in my thinking? Is there a better way to do what I am talking about?


title: wp_list_pages bug in "number" parameter

text: I'm trying to build a list of the first subpage out of 10 pages. So my page structure is this:   * Page A      * Page A1     * Page A2    * Page B      * Page B1    * Page C      * Page C1     * Page C2     * Page C3 And I'd like to display this list in my template:   * Page A1    * Page B1    * Page C1 I'm pretty close, but I'm stuck on a bug in WP_List_pages that causes the number parameter to not work (http://core.trac.wordpress.org/ticket/10745). This means all the subpages are always displayed, whereas I only want to display the first subpage. This is the code I'm using:                       <?php             $args=array(             'post_type'     =>'page',             'showposts'     =>10             );             $my_query = new WP_Query($args);             if( $my_query->have_posts() ) { ?>             <ul>             <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>                 <?php                  $children = wp_list_pages('title_li=&child_of='.$id.'&echo=0');                 $pieces = explode('"', $children);     <-- STUFF GOES HERE? -->                 ?>             <?php endwhile; ?>             </ul>             <?php } //if ($my_query)             wp_reset_query();  // Restore global post data stomped by the_post(). ?>      I'm thinking I'll need a for loop to only display the first post, but my php knowledge is lacking so I'm kind of stuck. Anybody in for a quick answer?


title: Styling an "active" link outside of Wordpress default menu

text:
I want the background-color of the selected box on this page to display gray color once the user lands on the corresponding page. My link is currently setup inside of the page template itself as a traditional link, and is not being displayed under the default Wordpress menu setup. Do I need to add a CSS style to the "active" box, or do I need to create a PHP conditional that determines the activated page? I'm just a little confused. Here's the boxes: http://richmindonline.com/virtual/solutions/

                       <?php get_sidebar('1-products'); ?>

                      <?php get_sidebar('2-products'); ?>

                          <?php get_sidebar('3-products'); ?>

                         <?php get_sidebar('4-products'); ?>


title: How do I find the version of WordPress I have from the source code?

text: Given a copy of WordPress installation, how do I find out what version it is from the source code?


title: Allow user to "edit_others_posts" to save only, not publish

text: I want to add a couple of editors that can `edit_others_posts`, but I do not want them to be able to **publish** others posts, only **save** the post by clicking on the _Submit for Review_ button. How can I do this? EDIT: To explain this in detail. Currently, we can't allow a user to edit others post by **only** saving the post. If `edit_others_post` is enabled for the user, then they can **publish** the post. Workflow I'm aiming for:   1. Editors can only edit others pending posts (solved here).    2. Editors can save the pending post **but** not publish it. So the _Submit for Review_ button will be available for them (which is the "update post" button when a post is in pending mode)


title: Comment rating plugin for wordpress.

text: i want to know, which is this comment rating plugin ? used here http://www.smashingmagazine.com/2010/08/10/showcase-of-delicious- coffee-websites/ plz have a look at comment section


title: Fetching instagram api not working on wordpress

text:
<?php     $json = file_get_contents('https://api.instagram.com/v1/users/userid/media/recent/?access_token=accesstoken');     $a_json = json_decode($json, true);     foreach( $a_json['data'] as $key => $value) {       $a_images[$value['id']]['link'] = $value['link'];       $a_images[$value['id']]['url'] = $value['images']['standard_resolution']['url'];       $a_images[$value['id']]['caption'] = $value['caption']['text'];     }               echo '
';     $i = 0;      foreach($a_images as $image)      {       if ($i < 3) {         echo '

'.$image['caption'].'

';         $i++;       }     }     echo '
';      I dont know why but this code seems to be not running on my wordpress. What issues should i be looking at? But when i compile this on some online compiler it works. Got these errors.               PHP Warning:  file_get_contents(https://api.instagram.com/v1/users/*******/media/recent/?access_token=*****count=50): failed to open stream: HTTP request failed! HTTP/1.1 500 Server Error\r\n in /var/www/vhosts/******* on line 151          PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/*********on line 153          PHP Warning:  Invalid argument supplied for foreach() in /var/www/vhosts/*****on line 162


title: Create WP_QUERY args with reference to my custom query

text: Sorry for my some different question. Can anyone help me to create WP_QUERY() arguments with reference to my following custom query? My query is as follows.               SELECT SQL_CALC_FOUND_ROWS  $wpdb->posts.*                          FROM  {$wpdb->posts}                           LEFT JOIN {$wpdb->term_relationships} ON({$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id)                         LEFT JOIN {$wpdb->term_taxonomy} ON({$wpdb->term_relationships}.term_taxonomy_id = {$wpdb->term_taxonomy}.term_taxonomy_id   AND {$wpdb->term_taxonomy}.taxonomy = 'project_position')                         LEFT JOIN {$wpdb->terms} ON({$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id AND {$wpdb->term_taxonomy}.taxonomy = 'project_position')                         WHERE  {$wpdb->posts}.post_type = 'projects' AND ( {$wpdb->posts}.post_status = 'publish')                           AND name IS NOT NULL                         ORDER BY CAST({$wpdb->terms}.name AS UNSIGNED ) {$options['order']} LIMIT 0,6      Thanks


title: Weird results using wp-query with 'date_query' for last week

text: I'm trying to get the most voted posts from last month, last week and last day. All seems to work right except the "top week". Here is the code:               <?php          //Date for ranking     $today = getdate();          if(is_page( 'topdia' )) {         $date_query = array(array(                                 'year'  => $today["year"],                                 'month' => $today["mon"],                                 'day'   => $today["mday"],                                 ));               $date = new DateTime();         $date = $date->format('Y-m-d H:i:s');     }     elseif(is_page( 'topsemana' )) {          $date_query = array(array(                                         'year' => date('Y'),                                         'week' => date('W'),                                     ));         $date = new DateTime('-1 week');         $date = $date->format('Y-m-d H:i:s');     }     elseif(is_page( 'topmes' )) {         $date_query = array(array(                                             'column' => 'post_date_gmt',                                             'after' => '1 month ago',                                         ));              $date = new DateTime('-1 month');         $date = $date->format('Y-m-d H:i:s');                                        }     else {         $date_query = 'any';                                                         $date = '0000-00-00 00:00:00';     }     //Seleccionar los más votados     global $wpdb;          $query = "SELECT        p.id AS id,        SUM(v.value) AS votes     FROM        {$wpdb->posts} p      INNER JOIN nsn_wti_like_post v ON v.post_id = p.id     WHERE p.post_date >= '{$date}'     GROUP BY       p.id     ORDER BY       SUM(v.value) DESC     LIMIT 5";          $myrows = $wpdb->get_results( $query );          $count = 0;     $posts_id = array();     $posts_votes = array();     foreach( $myrows as $post ) {         if($post->votes > 0) {             $posts_id[] = $post->id;             $posts_votes[] = $post->votes;         }     }          $temp = $wp_query; // assign ordinal query to temp variable for later use       $wp_query = null;     $wp_query = new WP_Query( array( 'post__in' => $posts_id, 'ignore_sticky_posts' => true, 'date_query' => $date_query, 'orderby' => 'post__in' ) );      ?>      And then, I call the loop:               if ($wp_query->have_posts()) : while ( $wp_query->have_posts() ) : $wp_query->the_post();      The problem is a weird result for the "top week" page. Just one post is shown and with a not corresponding number of votes. Any idea of what I'm doing wrong?


title: How to save double quotes in post meta, when the post meta data is an array?

text: Ok so I've been scratching my head on this one for a while. I'm making a plugin that adds a custom meta box to a custom post type. I'm using the update_post_meta function to save the data from the meta box - the data is complex and dynamic - users can add multiple fields etc etc. So the most appropriate way to save this data is by passing an array to the `update_post_meta` function using a single key (as per the docs, $meta_value is an array). This works best for my data in almost every way except 1... According to the docs WP will serialize any arrays passed to the `update_post_meta` function. The problem is some of the data will possibly contain double quotes, or any other string a user can input - and serializing the data will not work due to the double quotes breaking (usually I just get blank output after any point where a double quote occurs)... **Update - some example data to get an idea - the problem is using an array..:**               $clean_array['heading'] = 'This is a heading typed by a user "with double quotes"';     $clean_array['content'] = 'This is another key in a much more complex array';          //now save this array as per the docs:     update_post_meta( $post_id, 'my-data', $clean_array );          //then retrieve the data again somewhere else:     $my_array = (get_post_meta( $post_id, 'my-data', true ));          echo $my_array['heading'];     //outputs 'This is a heading typed by a user ' - it stripped anything where there was a double quote      After some research these are the only ways I can see to get round this are -   1. Run `htmlspecialchars` on the data before saving - but this breaks the paradigm used throughout WordPress which is to leave the data sanitizing on the way out of the database - it also feels like a bit of a dirty solution and doesn't properly escape all data...   2. `base64_encode` the data - but this means I have to decode the data wherever it is displayed - and it means that it is in general harder to manage/perform searches etc etc. _Note, I do not want to save the data separately using individual keys - it seems far too clunky and will result in a lot of DB bloat I'm sure_ Are there any WP functions or methods I have missed that might help automating with this? Or any other methods of preserving data and allowing things like double quotes when using this function with arrays? The docs are pretty unclear on the right way to escape data when using an array with `update_post_meta` and also any limitations associated. Thanks for any help in advance!


title: How can I hide certain sidebars from some users?

text: I'm working in wordpress multi site, but this question is relevant for regular use in wordpress. How can I hide certain sidebars from certain user groups (e.g. editors or admins) ? I have already tried the trivial:                   if(is_admin() && user_can(...)){            register_sidebar...         }      But this doesn't hide the sidebar, it shows that this sidebar is not active and the editor, for that matter, can still drag in and out as he or she pleases. Thanks.


title: Echo user id of users in seperate table

text:
{            $ad_code = str_replace("xxxx",$_SESSION['user_id'],$resultset->description);         $ad_code = str_replace("XXXX",$_SESSION['user_id'],$ad_code);         echo '
';         echo ''.$resultset->name.'	';         echo '<textarea cols=65 rows=5>';         echo $ad_code;         echo "</textarea>	";                         echo '
';     }      I'm using a plugin called WordPress Affiliate Platform, which created (I think) users in a seperate table than the typical WP users so as not to mix affiliate users and WP users. I'd like to retrieve the user ID of the logged in affilite so I can list the affiliate's current page referral url:   * Example of a site wide referral url: `http://domain.com/?ap_id=AMEEKER`   * Example of a page specific referral URL: `http://domain.com/myproduct?ap_id=AMEEKER` The plugin itself doesn't offer that option, instead just giving the instructions to tell affiliates to paste `?ap_id=AMEEKER` after the current page URL to get their affiliate link. That's fine, but a little tedious and can open affiliates up to errors that aren't really their fault. I'm sure there's a way to just echo out the current page URL, followed by ?ap_id= and the affiliate's user id, but I'm having trouble figuring out how to retrieve the affiliate's user ID. The plugin itself does it by transforming xxxx to the user id somehow. `domain.com/myproduct?ap_id=XXXX` I've pasted above some code from the affiliate's dashboard, and area where the plugin DOES pull the affiliate's ID and display it dynamically for the logged in user. Looking at that template in the plugin's files, I found what I _think_ is the code that's dynamically turning XXXX into the actual affiliate ID but I don't know what to do with this, or if this alone can help me get what I want. I mean, I can look at it and KIND of see what it's doing, but not enough to know if or what I can do with it now! (not a programmer, more like a tinkerer). I've asked the plugin author, who seems to give very good support, but this feature has been requested it seems on their site several times and their answer is the same. No hard feelings, but I'd like to see if it can be done. Any help would be appreciated.


title: How to Remove Certain Screen Options and Meta Boxes from add/edit post type?

text: Now, when you add or edit a particular post within your desired post type, there are more screen options as well. Although, these Screen Options are showing/hiding meta boxes. I would like to be able to programmatically obtain a list of all of these registered Screen Options of meta boxes, so that I can again check if a certain array of Screen Options exist, and if they do, I plan on removing them programmatically. ![WordPress - Screen Options - Add or Edit Post - Meta Boxes](http://i.stack.imgur.com/4wtlm.png) Click Here For Full Size Screenshot **Question** How can I programmatically obtain a list of all registered Screen Options (meta boxes) on post types, where you want to add or edit a particular post within your desired post type. Ultimately, the goal here is to remove these options and not simply just disable them. I'm looking to do something along the lines of what I have accomplished for removing unnecessary dashboard meta boxes.


title: Shortcode for output of wp_get_archives displays at top of post

text: Why does the output of this function               // One Recent Post     function most_recent_post_shortcode() {         return wp_get_archives( 'type=postbypost&limit=1&format=custom');     }     add_shortcode( 'recent-post', 'most_recent_post_shortcode' );      and shortcode `[recent-post]` show the output at the top of a post rather than in the body of the post where the shortcode is? Is there a better way to use a shortcode and wp_get_archives (or other function) to display the title and link of a recent post? It seems to have something to do with this question: The result of a shortcode appear BEFORE page content


title: How to set-up multiple cron task with wp_schedule_event so that they do not overlap?

text: I'm using a cron to take data from Facebook and i have divided the job into three calls, to avoid making to many call all toghether, now how do i set up calls so that they don't overlap?               // Set the CRON for pages     wp_schedule_event(  current_time( 'timestamp' ), self::FB_CRON_FREQUENCY, self::FB_CRON_PAGES, array( Ai1ec_Facebook_Graph_Object_Collection::FB_PAGE ) );     // Set the CRON for groups     wp_schedule_event(  current_time( 'timestamp' ), self::FB_CRON_FREQUENCY, self::FB_CRON_GROUPS, array( Ai1ec_Facebook_Graph_Object_Collection::FB_GROUP ) );     // Set the CRON for users     wp_schedule_event(  current_time( 'timestamp' ), self::FB_CRON_FREQUENCY, self::FB_CRON_USERS, array( Ai1ec_Facebook_Graph_Object_Collection::FB_USER ) );      So i want all of the calls to run every two hours, but i want one to run at minute 15, one at minute 30 and one at minute 45 so that they do not overlap, how can i do that?


title: How to create an API for my plugin?

text: I have been developing plugins for WordPress, most plugins I have developed use two or three classes, hence not as huge as Buddypress or WooCommerce. I am planning to develop two open source plugins to deliver some sort of complex system (can't share details at the moment but later during development) where other developers can customize functions and the system for them needs to be the same as Buddypress and WooCommerce. As I check those plugins files and realize they have registered their own actions and filters which developers can modify as per need. However, my problem is being unable to completely understand, how I should write a plugin where others have the flexibility to override functions as well as add their own. I know that it is difficult to give a definite answer, but I need some sort of a start-up guide so I can go in the right direction. Do I need to register my own actions and filters? If yes how? if not then, what are my options? Your advice will help me a lot... Thanks


title: how to move another machine or server without dealing with IP

text: Wordpress website for a small company. i am able to install wordpress in IIS server. my doubt is when installing , i am giving the ip address as "192.168.0.101:87".Everything works fine.I created menus and related pages. It works fine.it can be accessed by other machine within in the office. what actually looking for "if i need to move the complete wordpress to other machine or to server i must change the ip address in database manually" otherwise it wont work. how can i solve the problem? please let me know in detail if any one can help me out thanks in advance


title: How to move a WordPress multisite?

text: I have a WP multisite installation like this:   1. www.mysite.com    2. www.mysite.com/anothersite Now, I'd like to move www.mysite.com/anothersite to be www.mysite.com. Is it possible?


title: Is there an application I can use to protect documents?

text: Essentially I would like to have a section of a site, separate from the WP admin, that can hold documents for registered users of a certain group to view accessible only by user/password. It would really be nice if the documents themselves could not be linked to or accessed by URL unless logged in. Please let me know of any suggestions!


title: Options.php loop won't show!

text:
I'm creating an options panel for a theme on my localhost that's stored within the options.php file. My options panel will have two main loops. The first is to list the different sections and the second will create those sections. I just wrote the first loop and it doesn't display anything upon running. The code for this loop with some surrounding html is:
             <?php             foreach ($options as $value){                 switch ( $value['type'] ){                     case 'section':                         echo '
'.$value['name'].'
';                         break;                 }             }             ?>
                    I don't see anything wrong with this though. This brings me to believe that something is wrong with a different part of my code so here's the entire options.php file:               <?php          //theme vars     $themename = "Fuckin Round";     $shortname = "fuckinround";     $options = array();          function theme_options(){         global $themename, $shortname, $options;              $options = array (                  array("name" => "General Settings",                 "type" => "section"),             array("type" => "open"),                  array("name" => "Type of Logo",                 "desc" => "Select your logo type ( Image or Text )",                 "id" => $shortname."_type_of_logo",                 "type" => "select",                 "options" => array("text", "logo"),                 "std" => "text"),                  array("name" => "Logo Upload",                 "desc" => "Upload images using the native media uploader, or define the URL directly",                 "id" => $shortname."_logo_upload",                 "type" => "imageupload",                 "std" => ""),                  array("name" => "Logo Text",                 "desc" => "Enter text for logo",                 "id" => $shortname."_logo_text",                 "type" => "text",                 "std" => ""),                  array("name" => "Logo Slogan",                 "desc" => "Enter text for logo slogan",                 "id" => $shortname."_logo_slogan",                 "type" => "text",                 "std" => ""),                  array("name" => "Custom Favicon",                 "desc" => "Upload a 16px x 16px Png/Gif image that will represent your website's favicon",                 "id" => $shortname."_favicon_upload",                 "type" => "imageupload",                 "std" => ""),                  array("type" => "close"),             array("name" => "Styling Options",                 "type" => "section"),             array("type" => "open"),                  array("name" => "Background Color",                 "desc" => "Pick a color for the background",                 "id" => $shortname."_background_color",                 "type" => "color",                 "std" => "#ffffff"),                  array("name" => "Body Color",                 "desc" => "Pick a color for the body",                 "id" => $shortname."_body_color",                 "type" => "color",                 "std" => "#ffffff"),                  array("type" => "close"),             array("name" => "Footer Options",                 "type" => "section"),             array("type" => "open"),                  array("name" => "Copyright Text",                 "desc" => "Enter text for copyright in footer (if empty it will be removed)",                 "id" => $shortname."_footer_text",                 "type" => "text",                 "std" => "Copyright TestSite.com"),                  array("type" => "close")              );     }          //add options page     function fuckinround_add_admin(){         global $themename, $shortname, $options;              if ( $_GET['page'] == basename(__FILE__) ){                  if ( 'save' == $_REQUEST['action'] ) {                 //protect against request forgery                 check_admin_referer('theme-save');                      //save the options                 foreach ($options as $value) {                     if( isset( $_REQUEST[ $value['id'] ] ) ) {                         update_option( $value['id'], $_REQUEST[ $value['id'] ] );                     } else {                         delete_option( $value['id'] );                     }                 }                      header("Location: themes.php?page=options.php&saved=true");                 die;                  } else if ( 'reset' == $_REQUEST['action'] ) {                 //protect against request forgery                 check_admin_referer('theme-reset');                 //delete the options                 foreach ($option as $value) {                     delete_option( $value['id'] );                 }                      header("Location: themes.php?page=options.php&reset=true");                 die;             }         }         add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename(__FILE__), 'fuckinround_admin');     }     add_action('admin_menu' , 'fuckinround_add_admin');          //main function     function fuckinround_admin() {         global $themename, $shortname, $options;              //saved or reset messages         if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

';         if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

';              //form         ?>
<?php echo $themename; ?>

                 <?php                 foreach ($options as $value){                     switch ( $value['type'] ){                         case 'section':                             echo '
'.$value['name'].'
';                             break;                     }                 }                 ?>
                                             <?php             //loop 2         ?>                                         <form method="post">                 <?php wp_nonce_field('theme-save'); ?>
                     <input name="save" type="submit" value="Save changes" class="button-primary" />                     <input type="hidden" name="action" value="save" />
             </form>                  <form method="post">                 <?php wp_nonce_field('theme-reset'); ?>
                     <input name="reset" type="submit" value="Reset changes" />                     <input type="hidden" name="action" value="reset" />
             </form>                  <?php     }     ?>      I've read through this code multiple times and can't find anything that would cause the loop not to work properly. I'd appreciate it very much if you guys could give it a look and let me know if you find anything. Thanks in advance. Sorry about the immature theme name btw.


title: How to Handle Distributed Development Workflow

text: I'm trying to come up with a workflow for two (right now) people. One of whom will be doing theme work and another who will be writing content. We are not co-located are will not be anytime soon. The writer is quite unfamiliar with source control, so that would best be a phase two kind of thing. I could put MAMP on her box and have her write there, if that is the approach, how best to integrate the two solutions? I've read this question: How to best setup for development for a two person bi-coastal team? but since it is two years old, I thought I would see if anything has changed.


title: Show Blog posts from other site to WordPress without RSS Feed

text: I have developed a WordPress theme for my Client for his Website. From a long time My client is operating his Blog on ThreeVillagePatch. He is an active member on this site and frequently adds new posts to this Site. Now that I have made new theme for his site, he wants me to show Blog posts from ThreeVillagePath.com to his own website North Shore injury Lawyer. Here, I am providing links for both, Please help me as to how can i fulfill this and show Blog posts posted on ThreeVillagePath.com to northshoreinjurylawyer Please Note: It would be ideal if i can show both excerpt and Full blog post content as well. Thank you in advance Chetan


title: Access to Media Library

text: Im trying to find a way to pull random images from either a post or wordpress's built in image library. Im not sure how to query image uris from a post or the media library - is there a tag or method that I can adopt?


title: Custom permalink with child taxonomy terms

text: This may ressemble other questions, but i'm posting my own as I couldn't find a conclusive answer that worked for me. **What you need to know** I have a custom post type (products), with a custom taxonomy (collections). My collections taxonomy is hierarchical. For example, I have a parent collection (bathroom) which will have a good number of sub collections. **What i'm trying to do** I'm trying to obtain permalinks for my products which include both the parent collection and the child collection, example                http://<domain>/products/bathroom/collection-1/postname      **What i've tried** Basically i've been playing around with the rewrite parameter when registering my CPT and Taxonomy, as well as the 'post_type_link' hook. I've managed to get it working _partially_ , that is, by displaying only the parent collection in the permalink. Any help would be greatly appreciated, thank you. Also, my permalink structure is : /%category%/%postname%/ **Some of my code** _Registering CPT / Taxonomy_                register_taxonomy( 'collection', array(  ), array(           'label' => 'collections',           'public' => TRUE,           'show_ui' => TRUE,           'hierarchical' => TRUE,           'query_var' => 'collections',           'rewrite' => TRUE      ));           register_post_type( 'product', array(           'label' => 'products',           'public' => TRUE,           'publicly_queryable' => TRUE,           'show_ui' => TRUE,           'show_in_menu' => TRUE,           'taxonomies' => array( 'collection' ),           'supports' => array( 'title', 'editor', 'author', 'custom-fields' ),           'rewrite' => array( 'slug' => 'products/%collection%', 'with_front' => false, 'hierarchical' => true )      ));          flush_rewrite_rules();      _post type link hook_                if( strpos( $permalink, '%collection%' ) === FALSE )           return $permalink;           $terms = wp_get_object_terms( $post->ID, 'collection' );      $tax_slug = "";           if( empty( $terms[0]->parent ) )      {           $tax_slug = $terms[0]->slug;// . "/" . $terms[1]-> slug;           //Second part 404's my permalinks, so commented out      }      else      {           $tax_slug = $terms[1]->slug;// . "/" . $terms[0]-> slug;           //Second part 404's my permalinks, so commented out      }           $permalink = str_replace( '%collection%', $tax_slug, $permalink );           return $permalink;


title: Can I prioritize post categories for choice for breadcrumb trail?

text: I'm using `Breadcrumb NavXT` for displaying breadcrumbs trail of given page, based on category tree. This works fine half of the time - the problem is I (ab)use categories to assign specific properties to given pages, which are then interpreted in post.php to render given post in a specific way, e.g. hide the title or format in a specific way. And `Breadcrumb NavXT` sometimes picks these "meta- categories" to render the breadcrumbs, instead of the main category. Is there a neat way to either get the plugin to include/exclude certain category trees, or make given categories "preferred" or replace the plugin altogether with something that would handle the problem better?


title: How can I make wordpress suppress mysql errors?

text: Wordpress has two functions related to SQL queries and their errors as mentioned in What Is The Difference Between suppress_errors() And hide_errors() in $wpdb? From what I've read setting `WP_DEBUG` to `false` in `wp-config.php` will set `hide_errors()` so that mySql errors aren't show - but if the site can't connect to the database you'll still error: > WordPress database error: [MySQL server has gone away]` Without modifying the core file `wp-includes/wp-db.php` and setting the line ~69 to   `var $suppress_errors = true;` (which is what I've done for now), how can I set `suppress_errors` to false without modifying the core?


title: Cant we use a PHP file directly like myhome.com/some.php?

text: i just want to add a php file into my site say www.mysite.com/some.php. I dont want to create any page using that php file as page template. All i want is to add a php file which as some php codes in it and redirects to my another page after successful access. I know it is possible and seen in many sites that they use it. How should I to do this???? any solution or at least an hint will help me.


title: Working with a modified WordPress & Theme and updating WordPress

text: I just inherited a site where the creator installed the Copperific Theme and then modified the source files to achieve customizations. My understanding of custom themes was that, in order to protect your modifications, you cloned the original theme and re-named it, housed it in its own theme folder etc. Is that correct? My concern is that when WordPress updates are available that customizations might be wiped out by the update process. Additionally looking at the mod dates of the core WP files shows a variety of dates leading me to assume the original developer edited these as well. Is that a reasonable assumption? Do I have to upload a copy of WP from that version and diff them to know? What would best practice dictate for this situation. No code comments, docs, or notes were left for me... ![enter image description here](http://i.stack.imgur.com/ohkCA.jpg)


title: Custom Post-type not returning the right child_of

text: **Situation** I am using the Advanced Custom Fields plugin to give Custom Post Types a checkbox. If this box is checked, it should be returned by this Query. The Query works this far. **The issue** The pages I want it to display are all childs of a page. And this Query returns all pages with the checkbox, instead of just the childs of the current page with the checkbox. **My code** _top of page_               <?php $tid = get_the_ID(); ?>      _Further along the page_               <?php       $i == 0;       global $post;       $myposts = new WP_Query(array(          'post_type' => 'keuringen',          'child_of' => $tid,          'meta_query' => array(              array(              'key' => 'first_to_load',              'value' => '1',              'compare' => '=='              )          )       ));     ?>      **The question** What can I do to make it return only the children? Or should this already return only the children and is this a bug in one of the plugins?


title: Want to increase the # of slides in FlexSlider in WooThemes Scrollider

text: I am using WooThemes Scrollider for a full screen homepage slide show. The client has chosen 14 slides to include, but the slider only lets me set 10. Is there a way to change the maximum # of slides allowed in FlexSlider? Thanks so much!


title: How to remove permalinks links presents in each page of my site?

text: I have this WordPress static site: http://www.saranistri.com/ As you can see at the end of each page there is a link named **Pemalink** into a box. I want to remove this box and this link. Can I do this operation directly from the WordPress backend or have I to remove it directly from the code of my template? Tnx Andrea


title: Does update_comment_meta hook exists?

text: Its been 3 days now I am fighting to resolve the issue here: An action hook where a comment meta is updated I am pretty sure, even if I am a beginner, that the hook `update_comment_meta` doesnt exist, and that it is not possible to use something like:               add_action( 'update_comment_meta', 'do_soemthing', 10, 4);      Any confirmations, or objections are highly welcomed.


title: Pass a comment id through url and append the comment post's slug in the url

text: Here's the scenario: I wrote a custom url rule to pass a comment id to a template and display the comment and comment meta as a single page (`eg. http://example.com/reply/56`) and it works fine. But now I'm trying to refine this rule to include the comments post slug in the URL. So when I visit `'http://example.com/reply/56'` it should map to `'http://example.com/the- post/reply/56'`. I'm actually stuck at this point. Here's what I've done till now: The rule that works:               <?php      add_rewrite_rule( '^reply/(.*)?$', 'index.php?pagename=reply-page&reply_id=$matches[1]', 'top' );     ?>      Added a `query_var` `'reply_id'` for this. Now the code I'm trying:               <?php     add_action('init', 'test');     function test()     {         $reply_struct = '/reply/%reply_id%';         $wp_rewrite->add_rewrite_tag('%reply_id%', '([^/]+)', 'reply_id=$matches[1]');         $wp_rewrite->add_permastruct('reply_id', $reply_struct, false);     }          add_filter('post_type_link', 'reply_permalink', 10, 3)     function reply_permalink()     {         $rewritecode= array(             '%reply_id%'         );              $test = '';         if ( strpos($permalink, '%reply_id%') !== false )          {             $i = get_query_var('reply_id'); //Trying to get the comment id, this is where I'll get the post slug and append it to the url             $test = 'test';          }               $rewritereplace = array(            $test          );          $permalink = str_replace($rewritecode, $rewritereplace, $permalink);          return $permalink;     }      I think when I access the URL `'http://example.com/reply/56'`, I should get `'http://example.com/test/'` or `'http://example.com/reply/test'`. But I'm not.


title: Flexslider Slider Post

text:
I'm trying to figure out how to slide a post using flexslider but its not sliding. i want to display only one post from category Featured so i use 'posts_per_page' => 1 but if i use 3, all the from from category are displaying, can anybody help me? thanks. this is my code.. header.php                             <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset') ?>" />         <meta name="generator" content="Wordpress <?php bloginfo('version'); ?>" />         <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>     <?php wp_enqueue_script("jquery"); ?>     <link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />     <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />     <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/flexslider.css" />     <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lato:400,900italic,900,700,700italic">     <?php wp_head(); ?>          <?php echo is_single() ? "" : ""; ?>

                 <a href="<?php bloginfo('url'); ?>"><img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />

<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Contact') ) :                  else : ?>
Dashboard > Appearance > Contact
                 <?php endif; ?>

                     <?php wp_nav_menu ( array('container_class' => 'main-nav', 'container' => 'div')); ?>

      index.php

                     <?php                         $args = array('category_name' => 'Featured', 'posts_per_page' => 1);                         $query = new WP_Query( $args );                         while ($query->have_posts()) : $query->the_post();                     ?>

<?php the_title(); ?>
                         <?php the_excerpt(); ?>
                         <?php the_post_thumbnail(); ?>
                         <?php                                 endwhile;                         ?>

      footer.php


title: Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin

text: I have a wordpress table like so (phpmyadmin and MySQL)               | id |  meta_key | meta_value |     +----+-----------+------------+     | 1  | import_id | abc        |     | 2  | import_id | abc        |     | 3  | import_id | def        |     | 4  | import_id | xyz        |     | 5  | import_id | xyz        |     | 6  | import_id | xyz        |     | 7  | something | 123        |     | 8  | something | 234        |     +----+-----------+------------+      I need get the id of all duplicate rows where meta_key='import_id' inorder to remove them from another table. I want to keep the MIN(id) of each of the returned rows where 'meta_value' is the same i.e the output should be:               | id |  meta_key | meta_value |     +----+-----------+------------+     | 2  | import_id | abc        |     | 3  | import_id | def        |     | 6  | import_id | xyz        |     +----+-----------+------------+      or just               | id |     +----+     | 2  |      | 3  |      | 6  |      +----+      please help as while this may be a duplicate question I am still having trouble as my SQL is a bit rusty. I can get duplicates where meta_key='import_id' like so:               SELECT id,meta_value     FROM TABLE      WHERE meta_key='import_id'     GROUP BY meta_value     HAVING Count(meta_value) > 1      and I want from this the NON MIN(id) values


title: FOUND_ROWS() returns maximum rows in table

text: I am pretty new to word press, but I am not understanding what I am doing wrong. According to this tutorial (http://dev.mysql.com/doc/refman/5.0/en/information- functions.html#function_found-rows) the SQL statements are correct, but the results are incorrect. Here is my php code. Table contains 101,000 rows               $myrows = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS col1, col2, FROM table_name ORDER BY col1 ASC LIMIT 1,5;" );      // count($myrows) returns 5 correct          $rowCount = $wpdb->get_var( "SELECT FOUND_ROWS();" );      // returns value of 101,000. Incorrect.      What am I doing wrong? How do I get FOUND_ROWS() to return 5? Thanks in advanced.


title: tinyMCE 4.0 custom button onclick no longer working

text: I am trying to update one of my WordPress plugins where I create a tinyMCE button and open up a thickbox on click. I've just tried switching over to a basic example for testing, and can't get this to work either.                   onclick : function() {             ed.insertContent('Main button');         }


title: Plugins not showing in Multisite dashboard

text: I have been trying to upload more plugins and even though the files are all located in content/plugins directory, nothing is showing up in the dashboard. Even the default plugins are not showing. Does anyone know why this may be?


title: Search broken due to uComments - I found the JS file that is causing the problem

text: I was unable to search my site until I ran the plugin Deactivate/Activate test. It was uComments. This plugin has a file called functions.js which is causing this problem. I do understand it has something to do with the validation, but I really need the help with the JS code. Thanks


title: Help with filter for wp_notify_moderator()

text: I have a case where I have multiple Administrators. Not all of them want to be notified per email when there was a comment posted or is held for moderation. The Settings > Discussion page only allows for the control of comment moderation emails for all Admins, not for selected ones. Responsible for the emails being send is this function: http://wpseek.com/wp_notify_moderator/ Within that function there is an array stored in a variable called $emails and the first value that is being stored is **get_option('admin_email')**. The second value (email) is that of the **post author**. At the end of the function there are some filters one of which let's you modify the $emails array and so far I got the following. But this is not working, any ideas why?               // Don't email webmaster for comment moderation     add_filter( 'comment_moderation_recipients', 'pref_dont_email_webmaster', 10, 2 );     function pref_dont_email_webmaster( $emails, $comment_id ) {         $webmaster_email = 'name@address.xmp';         if ( $emails[0] == $webmaster_email )             unset($emails[0]);         return (array) $emails;     }


title: help needed for suit designing tool

text: I am working on a theme which has options for suit & shirt designing. Basically, I am stuck in creating taxonomies for suits & shirts. Reference Link Problem I am facing is to plan how the taxonomies should go: e.g.   1. type:      * suit        * jacket          * style & measurement options       * trouser          * style & measurement options     * shirt        * style & measurement options now this is something in my mind, but there are also some things to think of, when I will select a suit and go for jacket options or trouser options, I have to load image for each style option and show the user how the finished product will look like. Any suggestions will be appreciated as all these options are required to be configurable from admin panel.


title: Reply form used in wordpress.com

text: The reply form that comes originally with wordpress is, well, so big and annoying. While the one that appears on wordpress.com blogs is very elegant and feature-ful. Does the one used in wordpress.com exist as a pre-made plugin? If so, where can I get it from? If no however, how can make it by hand, i.e, what are the guidelines to do that? Thanks in advance.


title: HowTo: Add Class to Sidebar Widget List-Items

text:
The newest version of Bootstrap (v3.0) adds a new **List Group** component which has the following structure:

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros

        1. I would like to be able to add a class to the `ul` (i.e. `<ul class="list-group">`)   2. I would like to style my **_Category_** sidebar widget to support this new component, but as you see, this requires classes on **_each_** `li` item. In reading some similar posts, one option I found is to use jQuery to add the class to each `li`, but I am concerned about the dreaded **_FOUC_**. Is there some WordPress function that gets me to my goal? Please advise, **Update:** I was able to add classes to the individual `li`'s by creating a Custom Walker which extends `Walker_Category` (see code below), but this still does not get me to the `ul` which also needs a class added (eg `<ul class="list-group">`).               class Walker_Category_BS extends Walker_Category {         function start_el( &$output, $category, $depth = 0, $args = array() ) {             extract($args);                  $cat_name = esc_attr( $category->name );             $cat_name = apply_filters( 'list_cats', $cat_name, $category );             $link = 'description) )                 $link .= 'title="' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '"';             else                 $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';             $link .= '>';             $link .= $cat_name . '';                  if ( !empty($feed_image) || !empty($feed) ) {                 $link .= ' ';                      if ( empty($feed_image) )                     $link .= '(';                      $link .= 'term_id, $category->taxonomy, $feed_type ) ) . '"';                      if ( empty($feed) ) {                     $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';                 } else {                     $title = ' title="' . $feed . '"';                     $alt = ' alt="' . $feed . '"';                     $name = $feed;                     $link .= $title;                 }                      $link .= '>';                      if ( empty($feed_image) )                     $link .= $name;                 else                     $link .= "';                      $link .= '';                      if ( empty($feed_image) )                     $link .= ')';             }                  if ( !empty($show_count) )                 $link .= ' (' . intval($category->count) . ')';                  if ( 'list' == $args['style'] ) {                 $output .= "\t
term_id;                 if ( !empty($current_category) ) {                     $_current_category = get_term( $current_category, $category->taxonomy );                     if ( $category->term_id == $current_category )                         $class .=  ' current-cat';                     elseif ( $category->term_id == $_current_category->parent )                         $class .=  ' current-cat-parent';                 }                 $output .=  ' class="' . $class . '"';                 $output .= ">$link\n";             } else {                 $output .= "\t$link
\n";             }         } /* end start_el */          } /* end Walker_Category_BS */      **Update 02:** After viewing `default-widgets.php` in the core, I decided to create a new widget (`WP_Widget_Categories_BS`, see code below) wherein I basically, copied all the code from the default category widget and simply modified the the `UL` to add the necessary class.               <?php           /**      * Categories widget class      *      * @since 2.8.0      */     class WP_Widget_Categories_BS extends WP_Widget {              function __construct() {             $widget_ops = array( 'classname' => 'widget_categories_bs', 'description' => __( "A list or dropdown of categories for Bootstrap 3.0" ) );             parent::__construct('categories', __('Boostrap Categories'), $widget_ops);         }              function widget( $args, $instance ) {             extract( $args );                  $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base);             $c = ! empty( $instance['count'] ) ? '1' : '0';             $h = ! empty( $instance['hierarchical'] ) ? '1' : '0';             $d = ! empty( $instance['dropdown'] ) ? '1' : '0';                  echo $before_widget;             if ( $title )                 echo $before_title . $title . $after_title;                  $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);             if ( $d ) {                 $cat_args['show_option_none'] = __('Select Category');                 wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args));     ?>                    <?php             } else {     ?>
     <?php             $cat_args['title_li'] = '';             wp_list_categories(apply_filters('widget_categories_args', $cat_args));     ?>
     <?php             }                  echo $after_widget;         }              function update( $new_instance, $old_instance ) {             $instance = $old_instance;             $instance['title'] = strip_tags($new_instance['title']);             $instance['count'] = !empty($new_instance['count']) ? 1 : 0;             $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0;             $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0;                  return $instance;         }              function form( $instance ) {             //Defaults             $instance = wp_parse_args( (array) $instance, array( 'title' => '') );             $title = esc_attr( $instance['title'] );             $count = isset($instance['count']) ? (bool) $instance['count'] :false;             $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false;             $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false;     ?>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?>             <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />

<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> />             <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e( 'Display as dropdown' ); ?>
                  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>"<?php checked( $count ); ?> />             <label for="<?php echo $this->get_field_id('count'); ?>"><?php _e( 'Show post counts' ); ?>
                  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hierarchical'); ?>" name="<?php echo $this->get_field_name('hierarchical'); ?>"<?php checked( $hierarchical ); ?> />             <label for="<?php echo $this->get_field_id('hierarchical'); ?>"><?php _e( 'Show hierarchy' ); ?>
     <?php         }          } // end WP_Widget_Categories_BS      Combined with a Custom Walker I created (`Walker_Category_BS`) I now have what I wanted. **Analysis** Is this the best way to do it? **Don't know** as I have have received zero feedback so far, and this is the first time i've done this (hence the question), but ...it works! I could use a review. **Debug Warning** Concerning my Custom Category Walker `Walker_Category_BS`, i'm seeing this message > "Strict standards: Declaration of Walker_Category_BS::start_el() should be > compatible with Walker::start_el(&$output, $object, $depth = 0, $args = > Array, $current_object_id = 0) in C:\wamp\www\mysite\wp- > content\themes\mytheme\assets\inc\Walker_Category_BS.php" It appears to be a warning, of some sort.


title: Query posts than have a lapse of time active

text: First of all, sorry guys for my poor english. OK, i wanna make a query for show posts that doesn´t passed 3 days from it publication. I set a field for the expire date when it´s published (the time is in unix and i have added the 3 days in this field when it saves to the db), so i have the expire date set it. But my problem is make a query using the `meta_query`, i found in several posts how easy is to change the status of all posts but what i need is make this query work beside the status. This is my code                $q = array (             'paged' => $paged,            'meta_key' => '_rrhh_expire',            'orderby' => 'meta_value',            'meta_query' => array(               array(               'key' => '_rrhh_expire',               'value' => time(),               'compare' => '>=',               'type' => 'DATE'               )           )       );       query_posts($q);


title: Make WP not format code, not insert line breaks in between tags

text:
Gahhhh! Are you kidding? Ok, I guess wp wants my source code all nice and formatted...               i'm a link

list item

      becomes
i'm a link

list item

      Ok, so it puts a unclosed p tag, that sucks, but who cares. Also, I wouldnt care about the formatting, but when you put a (script) tag in there, it bumps it down 2 lines, so then it gets wrapped in a (p) tag of its own.
      actually, yeah, again with the unclosed p tag... This stuff is coming from a shortcode function, on which i'm running               function stripNewLinesPreg($str){     $str=preg_replace("/(\\t|\\r|\\n)/","",$str);       return $str;     }      So... I've tried the no_texturize_shortcodes filter. Seems to do nothing.


title: WOW Slider doesn't animate between slides

text: I have installed WOW Slider for windows from here. And created some slides for wordpress. Next, published that for wordpress then tried to use that in a theme. And then in wp clicking on `WOW Slider` and `Add New`, added successfully. Next, added following statements to `index.php` :               <?php wowslider(2); ?>      After saving that, WOW slider shows successfully up but doesn't slide between images. Please tell me what am i missing here ? Any helps would be appreciated. P.S : I have installed WOW Plugin successfully.


title: Put update-like notification bubble on multiple CPTs menus for pending items

text: Much like how the Plugins or Comments menu items have these number notifications in a bubble for updates and unmoderated comments respectively, I'd like to use that bubble to display the number of CPTs which have a "Pending review" status. How to go about doing that? I have found this thread, but not quite sure where to go from there. That would be neat to have; as I need this feature on a site that uses user- generated content (custom post types). Whenever users submit a new CPT, its status is set to "Pending review", and I want the site admins to quickly glance at the menu to see how many items need their attention. **EDIT:** I now have this code:               // buuble notifications for custom posts with status pending     add_action( 'admin_menu', 'add_pending_bubble' );          function add_pending_bubble() {         global $menu;              $custom_post_count = wp_count_posts('custom-post-name');         $custom_post_pending_count = $custom_post_count->pending;              if ( $custom_post_pending_count ) {             foreach ( $menu as $key => $value ) {                 if ( $menu[$key][2] == 'edit.php?post_type=custom-post-name' ) {                     $menu[$key][0] .= ' ' . $custom_post_pending_count . '';                     return;                 }             }         }     }      ...which does work, albeit a bit inconsistent. Sometimes displaying, sometimes not. Also, if I have multiple CPTs, how do I apply this code for each and every menu item of those CPTs? The above code will work with only one CPT.


title: Avoid posting duplicate title posts

text: I really like how StackExchange sites handle posts, where after you finish typing the title, it will list out similar titles. Is there a plugin or a tutorial to make this happen for self hosted wordpress sites?


title: Calling Custom Fields within a category loop?

text:
What I'm trying to do is to display a specific category post listing within a page template, showing only each post's custom fields, which must be pulled and included within the following html. What I also need is for the loop to stop after 10 items and give the option to go to previous items. here is the html I want to use for the custom fields.

            //here goes the image custom field

// here goes the item title custom field

//here goes the description custom field

ANCHOR TEXT


title: Newlines in Wordpress.com blog?

text: I just set up a blog on Wordpress.com, and the problem is, if I write:               something something          blah blah      That empty line in between doesn't show up! What can I do about this?


title: Has wp_get_attachment_image_src changed from 3.2.1 to 3.5.2?

text:
I just upgraded my app from 3.2.1 to 3.5.2 and now I'm having an issue where my image `src`s are blank in one of my pages. The databases are identical (since I just did a mysql dump/restore a few minutes ago). Here's my code: category-legends.php:               if(file_exists($_SERVER{'DOCUMENT_ROOT'}.substr($fivesdraft->guid_legend,20)))         {                           $featured = gangmei_get_the_post_thumbnail_url( $fivesdraft->ID );            echo '

post_name.'">name.'" />

post_name.'">'.$fivesdraft->name.'

';         }      functions.php:                   function gangmei_get_the_post_thumbnail_url($post_id = NULL) {             global $id;             $post_id = (NULL === $post_id) ? $id : $post_id;             $src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full');             $src = $src[0];             return $src;         }      get_post_thumbnail_id($post_id) is returning an ID, so I'm thinking that maybe there's something wrong with `wp_get_attachment_image_src`. Can anyone lead me in the right direction? How would I debug this? The old version works fine (all images have a `src` and show properly) but my other environment doesn't. It's producing images like this: `<img alt="Nick Aries" src="">` ===== var_dump( $src );               bool(false)


title: Confused about the correct functioning on Wordpress Menus

text: good evening, Im been having some kind of problem with a specific, and as far as I can see, simple WP project, specifically with how to use the wp_nav_menu function, normally, when I try to create a WP Menu I use something like this:               <?php wp_nav_menu( array('menu' => 'Main', 'container' => 'nav' )); ?>      And always use the same function on my functions.php document which is:               add_theme_support('nav-menus'); if ( function_exists('register_nav_menus')) {register_nav_menus( array('main' => 'Main Nav') );}      The thing is, when I try to use that code to convert my HTML menu into a WP menu nothing works, then, reading something I tried with this:               <?php wp_nav_menu( array('menu' => 'Main', 'container' => '', 'container_class' => '', 'menu_class' => '', 'menu_id' => '' )); ?>      But that missed a few things like icons on each button and the color which was gone as well, the menu in HTML is this one: http://pastebin.com/n17C9Arv So my question is basically, what am I missing?, why I'm not being able to reproduce the converted wp menu exactly like the html menu? Driving me crazy.... Thanks guys! Arturo


title: Previewing Draft shows white page, publishing works fine?

text: I haven't run into this issue before. On my site, if I create a draft of a page and I save the draft and preview it, I get a blank white screen. However, if I publish that page, it shows up just fine. I'm not sure what could be causing this, but I'm stumped. I'm using the default page template and not putting any content into the page (it's just a blank page for testing). I enabled wp_debug but nothing showed up there OR in the php error log for this page. Has anyone else had this kind of error? I assumed that if it was erroring on the draft, it should error out on the published side to, but it's not. Thanks for any help you can give.


title: Custom Post Types, Taxonomies and Terms... I'm getting confused now!

text: Hopefully I can explain this correctly, as I'm getting confused myself now with what I want to achieve! I have two Custom Post Types, "Students" & "Boats" In "students" I have the Taxonomy "Classes" and then Taxonomy Terms of; "Class of 2012", "Class of 2011" etc. etc. In "boats" I have the Taxonomy "Projects" and then Taxonomy Terms of; "Class of 2012", "Class of 2011" etc. etc. What I'd like to do is: On the 'Class of 2012' page for students, I currently have a list of all the students, that's no problem and it's working well. What I'd like is to also display all the boats from the "Class of 2012" boats taxonomy term on the same page. That's where I'm having trouble. Ideally I'd like to get all the 'boats' in the 'Class of 2012' taxonomy by saying something like: get all posts from the boats post type in the taxonomy term of the same name as current taxonomy term. Does that makes sense?!


title: How get the 10 most viewed pages (not post)

text: I would like to know how it's possible to get the 10 most viewed pages ? I know how make it with post, but not with page... Thanks for your help.


title: Custom Post Type permalink not working on new posts

text: I've been struggling for a while with this and would really appreciate any help. I have a custom post type 'venues' on a site I'm working on. I have the permalinks setup so they are as follows: http://www.site- name.com/venues/venue-name This has worked fine 'til now. But whenever I add a new venue the permalink on it doesn't seem to work - it simply goes to a blank white page. I'm unsure how to go about fixing this since it's working on all the previous venue entries. Below is the relevant code for the Custom Post Type:               function venues () {     $labels = array(         'name'               => _x( 'Venues', 'post type general name' ),         'singular_name'      => _x( 'Venue', 'post type singular name' ),         'add_new'            => _x( 'Add New', 'venue' ),         'add_new_item'       => __( 'Add New Venue' ),         'edit_item'          => __( 'Edit Venue' ),         'new_item'           => __( 'New Venue' ),         'all_items'          => __( 'All Venues' ),         'view_item'          => __( 'View Venues' ),         'search_items'       => __( 'Search Venues' ),         'not_found'          => __( 'No Venues found' ),         'not_found_in_trash' => __( 'No Venues found in the Trash' ),         'parent_item_colon'  => '',         'menu_name'          => 'Venues'     );     $args = array(         'labels'        => $labels,                     'taxonomies'            => array('category'),              'description'   => 'This is where all of the venues in the Find Us section are held',         'public'        => true,         'menu_position' => 5,         'supports'      => array( 'title', 'thumbnail'),         'has_archive'   => true,                     'rewrite'                    => array('slug' => 'venue'),          );     register_post_type( 'venues', $args );     }


title: Shortcode issues in wp job manager plugin

text: I need to display job listings as per job types using shortcode in posts/pages. For that i have installed http://wordpress.org/plugins/wp-job- manager/ plugin. The issue is, when i place two shortcode in page one after another, it shows only final shortcode output. For example, [jobs job_types="Part Time"] [jobs job_types="Full Time"] The output shows only full time job listings alone. I came to know the issue with ob_start() and ob_get_clean(). I'm not able to fix it. Can any one check this and give me solution / help?


title: Custom Post Type Specific Post Template

text: I created a Custom Post Type, and here's the entire code:               // Register Custom Post Type     function wrestler_register() {              $labels = array(             'name'                => _x( 'Wrestlers', 'Post Type General Name', 'text_domain' ),             'singular_name'       => _x( 'Wrestler', 'Post Type Singular Name', 'text_domain' ),             'menu_name'           => __( 'Wrestler Profiles', 'text_domain' ),             'parent_item_colon'   => __( 'Parent Item:', 'text_domain' ),             'all_items'           => __( 'All Items', 'text_domain' ),             'view_item'           => __( 'View Item', 'text_domain' ),             'add_new_item'        => __( 'Add New Profile', 'text_domain' ),             'add_new'             => __( 'Add New', 'text_domain' ),             'edit_item'           => __( 'Edit Item', 'text_domain' ),             'update_item'         => __( 'Update Item', 'text_domain' ),             'search_items'        => __( 'Search Item', 'text_domain' ),             'not_found'           => __( 'Not found', 'text_domain' ),             'not_found_in_trash'  => __( 'Not found in Trash', 'text_domain' ),         );         $rewrite = array(             'slug'                => 'wrestler',             'with_front'          => true,             'pages'               => false,             'feeds'               => false,         );         $args = array(             'label'               => __( 'wrestler_profiles', 'text_domain' ),             'description'         => __( 'Profiles of WWE Superstars & Divas', 'text_domain' ),             'labels'              => $labels,             'supports'            => array( 'title', 'thumbnail', 'custom-fields', ),             'hierarchical'        => true,             'public'              => true,             'show_ui'             => true,             'show_in_menu'        => true,             'show_in_nav_menus'   => true,             'show_in_admin_bar'   => true,             'menu_position'       => 5,             'menu_icon'           => url + '/icon.png',             'can_export'          => true,             'has_archive'         => false,             'exclude_from_search' => false,             'publicly_queryable'  => true,             'rewrite'             => $rewrite,             'query_var'           => 'wrestler',             'capability_type'     => 'page',         );         register_post_type( 'wrestler_profiles', $args );          }          // Hook into the 'init' action     add_action( 'init', 'wrestler_register', 0 );      Now, I have also added single-wrestler.php to my theme's root, but every time I'm viewing the page it lands on "Single.php". Thanks.


title: Editing image dimension - to edit the main image file

text: When started blogging, I was not aware about the image file's size, and used a lot wider and sharper images without necessity, some of the files are even 5-7mb in size. As there's no such necessity to using such a large file, even the end-user have to wait for a long time loading such images. I know I can replace images via WordPress Media Library, but to replace images, I have to upload a new resized, squeezed version of the image to the server and then to delete the older one. Now I got another nice solution -- using the Media Library Image Edit option: With this, I can rescale the image, suppose an image originally was of 1830 × 2619, now I want it to recale to 629 × 900, then I can easily do it. ![enter image description here](http://i.stack.imgur.com/I0Ad3.png) But, I was actually doing it to reduce the file size (with its dimension) to make a big difference in the occupied Server Disk Spaces. But after the rescale there's a dropdown panel on the right saying: > **Restore Original Image**   >  _Discard any changes and restore the original image. Previously edited > copies of the image will not be deleted._   >  `Restore Image` That seriously means:   1. The Original file still resides there (so the original disk space still remains)   2. There's a newly sized image added there (additional disk space is occupied) But I's actually trying to replace the Original with the newly scaled image. Is that possible? The problem is, after the rescale, I can easily delete the Original using Cpanel, but isn't that cause many other db path errors and db errors that, the Original file is missing? I'm actually in an unanswered and uncertain state, I'm afraid. :(