title: Set $options reference

text: I am starting up in theme development and i have searched on codex on the topic of setting theme options.This is is what i am talking about,               $options = array (          array( "name" => $themename." Options",         "type" => "title"),               array( "name" => "General",         "type" => "section"),     array( "type" => "open"),          array( "name" => "Colour Scheme",         "desc" => "Select the colour scheme for the theme",         "id" => $shortname."_color_scheme",         "type" => "select",         "options" => array("blue", "red", "green"),         "std" => "blue"),          array( "name" => "Logo URL",         "desc" => "Enter the link to your logo image",         "id" => $shortname."_logo",         "type" => "text",         "std" => ""),               array( "name" => "Custom CSS",         "desc" => "Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}",         "id" => $shortname."_custom_css",         "type" => "textarea",         "std" => ""),                      array( "name" => "Feedburner URL",         "desc" => "Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website",         "id" => $shortname."_feedburner",         "type" => "text",         "std" => get_bloginfo('rss2_url')),               array( "type" => "close")          );      I took this $options from a tutorial on theme options i am following.Is there an official reference on the topic?.I have looked hard at codex and nothing so far.


title: Change <title> of each paginated page

text: > **Possible Duplicate:**   >  Add Page number to Meta Description in Wordpress SEO by Yoast I just had an SEO specialist do an audit on our site and one of the suggestions was to change each paginated page `<title>` tag because we could be penalized for duplicate content. I use SEO Ultimate and while there is a title rewriter, there doesn't appear to be a way to change titles based on pagination for individual pages. Any suggestions?


title: How to assign default taxonomy to pages on 'save_post'?

text: I try to assign custom taxonomies to a **_page_** when newly added by the "publish" button. This is the function:               function set_default_object_terms( $id, $post ) {     if ( 'publish' === $post->post_status ) {              log_me ('From inside function: '.__FUNCTION__.', while I pressed the "publish" button. Post-ID: '.$id);              $taxonomy_ar = get_terms( 'property-features', '' );              foreach ($taxonomy_ar as $taxonomy_term) {                       log_me ('Inside the function: '.__FUNCTION__.' and inside the "foreach"-loop for the ID: '.$id.' and Term: '. $taxonomy_term->name . ' and Post-ID :'. $post->ID);             wp_set_object_terms( $post->ID, $taxonomy_ar, $taxonomy_term->name, true );           }     }}      and here is the hook:               add_action( 'save_post', 'set_default_object_terms', 100, 2 );      In the logfile which i added to figure out if i find all my values, all my custom taxonomies get found:               [13-May-12 16:28] be in function while "publish" is pressed with this id: **64**     [13-May-12 16:28] In the "foreach" with id: 64 and Term: **Kitchen** and Post-ID :**64**     [13-May-12 16:28] In the "foreach" with id: 64 and Term: **Stove** and Post-ID :**64**     [13-May-12 16:28] In the "foreach" with id: 64 and Term: **Pets ok** and Post-ID :**64**      But it does not assign it. Does somebody know where the trick is?


title: add function to thematic hooks

text:
i am newbie with php , i need help to create function to add it in thematic theme content area from this code ?               $term_slug = get_query_var( 'term' );     $taxonomyName = get_query_var( 'taxonomy' );     $current_term = get_term_by( 'slug', $term_slug, $taxonomyName );     $args = array( 'child_of' => $current_term->term_id, 'hide_empty'=>false);     $terms = get_terms( 'tagportifolio', $args);     $assoc = taxonomy_image_plugin_get_associations();          if (!empty($terms)):      <?php foreach( $terms as $child ): ?>     <?php  if(array_key_exists( $child->term_taxonomy_id, $assoc )){echo wp_get_attachment_image( $assoc[$child->term_taxonomy_id], array(), false, 'thumbnail');                                                             }                                                          ?>     <a href="<?php echo get_term_link( $child->name, $taxonomyName );?>"><?php echo $child->name; ?>
     <?php endforeach; ?>     <?php else: ?>      any help please ?


title: How can I apply a WP filter on specific plugin version

text: I have the plugins list in `'wp-admin/plugins.php'` page. For each plugin there is some meta info extracted by WP from each plugin file:                /*      * Plugin Name: somename      * Version: 1.2.3       */       I want to filter the version of a plugin, to show it in the plugins list, but not to modify the plugin file, just filter the version value. **Update:**               <?php     /*      * Plugin Name: aTestPlugin      * Version: old.version      * Description: This plugin is just for testing purpose.      * Plugin URI: http://wordpress.org/extend/plugins/atestplugin/      * Author: mario      * Author URI: http://www.atestplugin.example/      */          function atestplugin_plugin_row_meta($meta, $file, $data, $status) {          // do some filtering ...         if ( $data['Name'] == 'aTestPlugin' )             $meta[0] = 'new.version';              return $meta;     }     add_filter('plugin_row_meta', 'atestplugin_plugin_row_meta', 10, 4 );


title: Change default comments form title

text: > **Possible Duplicate:**   >  Change comments form title on a page by page basis I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to"). I thought perhaps I could add a hook to comment_form_defaults but my snippet below isn't working... any thoughts?                   <?php      add_filter('comment_form_defaults', 'askQuestion');          function askQuestion($defaults) {       $defaults['title_reply'] = 'Ask a Question';       $defaults['title_reply_to'] = 'Your text %s';       return $defaults;     }     ?>      This is being added to the HTML editor of the page editor within wordpress. We are using the ExecPHP plugin to compile code within posts/pages. We are looking for a way to do this on just this page, not every comment form on our blog.


title: Can I style single post that are in multiple catergories?

text: I have a regular wordpress site and I am trying to make a mobile version of the same site. For the blog section, I have put all of the posts in two categories: blog and mobile. The posts in "blog" show up fine on the regular site. Now I want those same posts to show up on the mobile site, but they need to be styled different to fit in the mobile world. My initial thought was just to put a post in both categories, but I've now realized that I can't just stylize the templates for both categories because since the posts are in two categories, wordpress (or single.php) doesn't know which category I want to have displayed. Which leads me to my questions: 1\. Is there a way to do what I have described above? It seems that single.php would have to know where the link was coming from in order to figure out which template to use.   1. Is there a better way to do what I'm trying to do? Basically, when a post is clicked on from the "category/blog" page, it should look one way and when it is clicked on from the "category/mobile" page, it should look different. I have been searching for days and I've found some posts and forums that deal with this, but no one seems to have an answer. Some posts have mentioned that there is a way to capture the current page url and then force single.php to display a certain template based on the link it comes from, however no one actually describes how it is done. The closest thing to what I'm trying to do seems to be discussed here but I don't understand what was done and I can't get it to work for me. I have posted in that forum, but no one has responded. This post here also seems to be trying to do something similar, but I don't understand how it works. The only way I can think to make this work is to have the author (who is not me) double post their post to two different categories, but that would become a pain. I've tried my best to articulate what I'm trying to do. If I'm not being clear, please let me know and I'll try to clarify. I'm hoping someone can help me either figure this out or show me a better way to do it. Thanks in advance.


title: how to get page id of a page using page slug

text: Im pretty new to wordpress and I was wondering if I could get a `page id` with it's `slug`. Is it possible please let me know.


title: Howto use WP built in Thickbox for images?

text: I've been searching for a better way to utilize the built in Thickbox function for images. I've been using my method for a few months, but I don't think it's the best way to do it. Here is the code I've been using (I don't remember where I found the code or I'd link to the article):               <?php     if (!is_admin()){     /*     add a word found in your domain name     */     $mydomain = ".com";     /*     The css selector     .entry-content a img      */     $myselector = "p a img";     wp_enqueue_style('thickbox'); //include thickbox .css     wp_enqueue_script('jquery');  //include jQuery     wp_enqueue_script('thickbox'); //include Thickbox jQuery plugin         // Function that will write js         function thickbox_js(){             global $mydomain, $myselector;             ?>             <script type='text/javascript'>              var tb_closeImage = "<?php bloginfo('wpurl'); ?>/wp-includes/js/thickbox/tb-close.png";              var tb_pathToImage = "<?php bloginfo('wpurl'); ?>/wp-includes/js/thickbox/loadingAnimation.gif";              jQuery(document).ready(function() {                  jQuery("<?php echo $myselector; ?>").parent("a[href*=<?php echo $mydomain; ?>]").addClass("thickbox");              });             </script>         <?php         }     add_action('wp_footer', 'thickbox_js'); // use wp_footer hook to write our generated javascript into page footer.     }     ?>      Any suggestions would be appreciated. I've tried several different methods listed in tutorials, but none have worked. Thanks... **To be more specific, this is the part in question:**               <?php bloginfo('wpurl'); ?>      **What I'm using now:**               <?php         function add_themescript(){          if(!is_admin()){          wp_enqueue_script('thickbox',null,array('jquery'));          wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');          }     }      add_action('init','add_themescript');          define("IMAGE_FILETYPE", "(bmp|gif|jpeg|jpg|png)", true);     function wp_thickbox($string) {     $pattern = '/(<a(.*?)href="([^"]*.)'.IMAGE_FILETYPE.'"(.*?)><img)/ie';     $replacement = 'stripslashes(strstr("\2\5","rel=") ? "\1" : "<a\2href=\"\3\4\"\5 class=\"thickbox\"><img")';       return preg_replace($pattern, $replacement, $string);     }          function wp_thickbox_rel( $attachment_link ) {     $attachment_link = str_replace( 'a href' , 'a rel="thickbox-gallery" class="thickbox" href' , $attachment_link );       return $attachment_link;     }     add_filter('the_content', 'wp_thickbox');     add_filter('wp_get_attachment_link' , 'wp_thickbox_rel');     ?>      I thinks that's a little better, but I'm still not sure it's the optimal way. Next I need to learn how to add navigation to the ThickBox pop-up images.


title: Custom menu deletes itself

text: I've set up a menu on one of my sites. The menu has ~30 items. Everything is fine, but at some point the menu crops itself and displays only the first 12 item. Does anyone have an idea why this is happening and how to tackle this issue?


title: Having admin on different host breaks attached images

text: Sometimes it's nice to have admin on a different host (admin.mysite.com) then the actual site (www.mysite.com). If admin.mysite.com is not publicly accessible, then images attached to posts on admin.mysite.com will not be accessible on www.mysite.com since the url to the attached image is absolute and contains the domain (admin.mysite.com). Is there any way to fix this? The nicest way would be if the url to an attached media would be relative and not absolute.


title: Jetpack Upgrade fails with WP CLI

text: Been trying to upgrade Jetpack from the admin for a few times on my site on a shared package with my hosted Dreamhost. It failed too often. I emailed on issues upgrading before and they suggested I use WP CLI so I did. But now I got this error:               wp plugin update jetpack     Downloading update from https://downloads.wordpress.org/plugin/jetpack.2.9.3.zip...     Unpacking the update...     Installing the latest version...     Removing the old version of the plugin...     Warning: Could not remove the old plugin.     Plugin update failed.      Sounded like there could perhaps be a permission issue even though I never had this before. So I checked permissions for the plugins folder I have:               drwxrwxr-x 10 me pgxxxxxx 4096 Apr 10 17:53 plugins      which is OK. But when I checked the plugin itself I saw that the plugin now has root as owner.               drwxrwxr-x 7 root    root       4096 Apr  7 19:38 jetpack      So that is a permission issue as my user is not root and sudo is not possible on shared servers with Dreamhost. Does WP CLI do this conversion to root on upgrades? Is there a way to make sure it does not change the user and group during an upgrade? Is there perhaps also a verbose option to get a more specific error message? the `--debug` option did not help so I guess that is for php errors only.


title: Filter post_meta for custom post types in Genesis 2.0

text: Working with Genesis 2.0: I have various Custom Post types declared, and I want to display as post meta information: \- in normal post: "filed under: category1, category2..." \- in the custom post type: "filed under: term1, term2..." The code copied below, works perfect for normal posts, but in custom posts it repeats two times the "Filed under:", the first one is empty, and the second one with the terms.               add_filter( 'genesis_post_meta', 'post_meta_filter' );     function post_meta_filter($post_meta) {         if ( !is_page() ) {             $post_meta = '  [post_categories before="Filed Under: "]                             [post_tags before="Tagged: "]                             [post_terms taxonomy="agenda" before="Filed under: "]             ';         return $post_meta;             }     }      How could I get only the second "Filed under" for custom post types? Any conditional order to specify that if categories is empty, don't show its field? Thank you!


title: Rewrite URL - how to do a SEO-friendly Unicode custom URL?

text: ![SEO vs. Unicode](http://i.stack.imgur.com/rdHSN.png) After a major load of 404 with some category and tag URL, I questioned on StackOverflow about my WordPress blog. My blog is in Unicode Bānglā. After a nice anatomy on the fact in Facebook1 with some CodeGeeks, we came to a solution for both 404 on Unicode characters and SEO for Unicode sites. **THE IDEA**   Mr. Sarim Khan ( _the Gittu_ ) suggested a nice solution for a URL:   * **For category:** `http://www.example.com/category/astronomy/জ্যোতির্বিজ্ঞান`     * **For posts:** `http://www.example.com/%postid%/আমার-পোস্টটি-যে-বিষয়ে` For this case the article will browse with the preceding category `/astronomy`, and will work for English SEO too. And the rest of the section `/bānglā-slug` would work for Bānglā SEO, and with this method the 404 can be minimized to a great extent. But for a nice URL with Bānglā contents, I can manage my post and page URL, when I'm writing my page or post. But for Bānglā tags, and categories, how can I achieve such a modified URL? How can I put a Bānglā and English tag/category (taxonomy) at a time? **REAL QUESTION**   Currently I'm following `http://domain/%postname%`. How can I rewrite my URL, so that I can achieve such a benefit of lesser 404 for Unicode URL, and also doesn't get down in SEO chase. Desired URL is:   `http://domain/%english-slug%/%bangla-slug%` And of course: _Is that really possible?_ 1\. Facebook thread image: I'm afraid, most of the discussion was in Bānglā.


title: Display Comment Form on dedicated Page for each post

text: I have the following requirement to complete and i didn't figure out how to do it. Inside a post, for each post, to call comment form on a dedicated page, in dedicated page the user post a comment and then is redirected to the initial post on submit. in single.php i need to call comments_template() but to extract only the comments results without comment_form() then when a user wants to post something, calls a page (comment_page) where comment_form() is included, the comment_form extracts from session postID and other parameters which allows that a comment is right inserted into the specific post So far i manage to insert the comment form into a modal window(JS) but is not a friendly option. Thanx


title: can't reset get_posts

text:
I have three loops in my theme that I want to use to get menu items for a lunch, dinner and wine list menu. The first loop worked fine but when I added the second one, the system broke. I did some searching here and they all say not to use $post. So I didn't but I still can't get it to work. I tried adding wp_reset_postdata as seen in the codex and decided to try wp_reset_query() for giggles after doing some searching here but it's still not working. I have been trying to change the variable names but still no joy.                $lunchargs = array(             'posts_per_page' => 5,             'category'       => 'lunch',             'post_status'    => 'publish',             'order'          => 'ASC',        );     ?>      $lunchposts = get_posts($lunchargs);         foreach( $lunchposts as $post) : setup_postdata( $post );  ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
         <?php endforeach;       wp_reset_postdata(); wp_reset_query()?>       So I repeat the code above three times changing the varaibles in all three loops like so               foreach( $dinnerpost as $post) : setup_postdata( $post );          foreach( $winelist as $post) : setup_postdata( $post );      I also found on here that some say not to use the category slug in the $args but I need to use the slug because I am not sure what the ID of the category will be in the end.


title: How to Order Posts by Custom Fields?

text: Can someone tell me why this is not working:               $args = array(         'cat' => '2,39,30',         'orderby' => 'title',          'order' => 'ASC',         'orderby' => 'meta_value_num',           'meta_key' => 'album_rating',           'order' => 'DESC'     );          $the_query = new WP_Query( $args );      I would like to order the posts according to their rating (Its working) AND alphabetically (Not working) Thanks


title: How to access options of Redux framework in front end

text:
I'm creating a wordpress theme in which I'm using the Redux Framework for creating the theme's options page. Now I believe everything is well set up but I'm having trouble in getting the values changed by Redux in my front end. For example I checked one of the checkbox in the settings panel had this attribute: name="redux_demo[10]", so in my front end I did this:                   <?php          if(get_option('redux_demo[10]')) { ?>
Text
                <?php          }?>      But Text is not showing whether I save it as checked or unchecked. I also tried the following but it's also not working:                   <?php          if(get_option('redux_demo[10]') === 1) { ?>
Text
                <?php          }?>      I searched a lot in the docs and also on the internet but I can't find any tutorial that shows how to actually retrieve data saved by redux. Please let me know if you have any idea about this. Thank you very much.


title: Custom Div with links on Admin Bar

text: I'm trying to add an area on the admin bar that will display user Profile Image, User Name, User Email, User role, and links to Edit Profile and signout. The way in which I would like it to display is Steve Jackson - stevejack@yahoo.com Author Edit Profile <<< "Link" Signout <<< "Link" With the user image to the left of the user info Some far I have gotten the secondary div area in the admin bar to show without a dropdown menu and the hack the admin-bar.php file to display User Image, Name and email with this function               function wp_admin_bar_my_account_item( $wp_admin_bar ) {     $user_id      = get_current_user_id();     $current_user = wp_get_current_user();     $profile_url  = get_edit_profile_url( $user_id );          if ( ! $user_id )         return;          $user_info  = get_avatar( $user_id, 64 );     $user_info .= "{$current_user->display_name}";          if ( $current_user->display_name !== $current_user->user_email )         $user_info .= " - {$current_user->user_email}";               $wp_admin_bar->add_menu( array(         'id'        => 'my-account',         'parent'    => 'top-secondary',         'title'     => $user_info,         'meta'      => array(             'class'     => $class,             'title'     => __('My Account'),         ),     ) );     }


title: Plugin can't be activated

text: I'm developing a WordPress plugin, but the last changes caused the plugin to stop working. It tells me that I can't activate the plugin because it caused a fatal error. On localhost all is working fine, but after sending to the server, on activation it displays the following: > Can't use function return value in write context in > /data/web/virtuals/72282/virtual/www/wp-content/plugins/wp- > songbook/inc/wpsongs-shortcs.php on line 83 I really don't understand the context of this message, because the code of this line is:               $ytlink=(isset(get_post_meta(get_the_ID(),'songbook_video_link')))?get_post_meta(get_the_ID(),'songbook_video_link'):false;      Can anyone tell me what's happened?


title: How to display only one category in a custom post type?

text:
I have a custom post type called 'portcat' and I want to display the results of only one portcat category ('games' - which has an ID of '3') on my page. The below code displays all of the categories and I'm not sure what I need to add to make it display only the 'games' category?
<?php echo the_title(); ?>

              <?php echo $firstCat[0]->cat_name; ?>

              <?php         $temp = $wp_query;         $wp_query = null;         $wp_query = new WP_Query();         $args = array(         'post_type' => 'port',         'paged' => $paged,         'posts_per_page' => get_theme_option("portfolio_work_count"),                          );                   if (isset($_GET['slug'])) {         $args['tax_query']=array(                 array(                       'taxonomy' => 'portcat',                       'field' => 'slug',                       'terms' => $_GET['slug']                   )              );         }       * * * Ok, I have done exactly as suggested above (except 'category_name' didn't work so am using 'cat_name'). It is still displaying all of the categories...I only want it to display 'Games'. I have included the rest of the code in the hope someone can easily spot what I'm missing?

<?php echo the_title(); ?>

                          <?php echo $firstCat[0]->cat_name; ?>

                          <?php                     $args = array(                     'post_type' => 'port',                     'paged' => $paged,                     'posts_per_page' => get_theme_option("portfolio_work_count"),                     'cat_name' => 'games'                     );                     $wp_query = new WP_Query($args);                          ?>                     <?php while ( $wp_query->have_posts() ) : $wp_query->the_post();                      #We have:                     #get_permalink() - Full url to post;                     #get_the_title() - Post title;                     #get_the_content() - Post text;                     #get_post_time('U', true) - unix timestamp                          $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );                                  echo "

".get_the_title()."
";                             $terms = get_the_terms($post->ID, 'portcat');                             if ( $terms && ! is_wp_error( $terms ) ) {                                  $draught_links = array();                                  foreach ( $terms as $term ) {                                 $draught_links[] = $term->name;                             }                                  $on_draught = join( ", ", $draught_links );                             }                          echo "
".get_the_excerpt()."
                         Read More

                     ";                             endwhile; ?>

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


title: Does wordpress add their own classes into nav menus?

text:
I am building a theme and have noticed that when I create a menu with just html or have it dynamically add menu items based on pages it looks how it was meant to be. Although when I change the code to generate the menu from the menu editor it adds alot of extra padding to the menu. Is this a wordpress issue? Has anyone heard of this before? Here is an example. When I generate a menu using the menu editor it adds padding:

                 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

      When I generate a menu through just hardcoding HTML it looks fine:

Home

About

Portfolio

Support

      Problem has been solved. I removed both the `<ul>` and `<li>` tags and the navigation is in it's proper location.

                     <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>


title: how to get the post id in plugin

text: I have a plugin that I'm working on and I'm having trouble getting the post id so jquery can use it. I'm able to get it using the admin_head hook but I'm not sure how I can return it to jquery. I'm not sure if admin_head is what I need since it does not return anything. Not sure if I can use global? Also this is in the admin screen so not on the front end. Here is what I have so far:               $custom_ID = 0;          function my_custom_admin_head(){         global $post;         $custom_ID = $post->ID;         global $custom_ID;     }     add_action('admin_head', 'my_custom_admin_head');          add_action( 'admin_footer', 'my_action_javascript' );          function my_action_javascript() {?>       <script type="text/javascript" >         jQuery(document).ready(function($) {             $('#get-rates-button').click(function(){               var result = "<?php echo $custom_ID; ?>";               alert(result);             }     }      Is there a function that I could call from jquery that would be able to return the id from a hook or does someone know of a better way? Thanks!


title: Including javascript for a shortcode

text: I'm creating a plugin that allows a user to use a shortcode. This shortcode depends on a bunch of javascript that needs to be present once the shortcode loads. I'm having issues trying to decide when and where to load the javascript. Pieces of the code that the shortcode spits out are elements that need to be present, but aren't available for jQuery to utilize. Is there a specific way of loading and attaching scripts that a shortcode relies on?               function build_total_search_method( $atts ) {              $shorcode_php_function = include( dirname(__FILE__) . "/includes/total_search.php" );              return $shorcode_php_function;          }     add_shortcode( 'total_search', 'build_total_search_method' );      This seems to work, but it also prints a `1` to the page. Is this method okay?


title: wp_paginate not working in combination with WPML plugin?

text: I have installed the wp_paginate plugin and the WPML plugin. Now I have set 'Dutch' to the basic language and added 'English' as the second language. I set the `Blog posts to display` to: `All posts (display translation if it exists or posts in default language otherwise).` One page shows posts which don't need to be translated. So I left them in 'Dutch'. Only now the wp_paginate doesn't show me the pages in the 'English' version of my site. In the 'Dutch' version they do so up. Here is the code I used:               <?php          $lstrPaged = (get_query_var('paged')) ? get_query_var('paged') : 1;              query_posts('posts_per_page=5&paged=' . $lstrPaged);              if(function_exists('wp_paginate'))          {             if(ICL_LANGUAGE_CODE == 'en')             {                 wp_paginate('title=Page:');             }              else              {                 wp_paginate('title=Pagina:');             }         }      ?>


title: WP E-Commerce how to report EOY sales to accountant?

text: Not a development question and I apologize for that, but I couldn't find a good spot to ask it (open to suggestions though). So I need to generate a sales report for the year for my wordpress e-commerce site... and I kinda need California separated. Should I export the SQL table? Since my payments are made via Paypal... should I be looking at PayPal's reporting? Is there a proven plug in to show me sales by state? etc. again... apologies for this question maybe being in the wrong place. Might there be a plug in that does the job or some kind of development hack around e-commerce lacking this feature? Thanks in advance for any help.


title: How to make in post Parent page children page list nummbered

text: Parent page veggies Its children pages are carrots peas potato How to put in post numbered list of Parent page? Maybe better how to make same list to be ordered by date posted so some order can be managed by changing dates?


title: Changed URl in General Settings now Wordpress site doesnt work

text: My website URL was www.example.com/singer I decided to get rid of "/singer" in the dashboard and ever since i have met with this error.               Fatal error: Call to undefined function wp() in /data/15/3/113/145/3439634/user/3834081/htdocs/singer/wp-blog-header.php on line 14      I've tried multiple methods to fix but all with no luck. Any guidance is appreciated.


title: Defining the value of a variable before a function?

text: I'm trying to edit a plugin so that it only shows it's submenu if the user is an administrator but I don't know how to define the value of the variable before the function:               function load_view( $name, $params = array(), $print_submenu_navigation = false ) {      My code so far is:               if (current_user_can('administrator')) {      $print_submenu_navigation = true;       }     else {      $print_submenu_navigation = false;     }      If I put this before the function I get a php error telling me it's expecting a function.


title: Second select list values are not saved after clicking update

text: I have a select list in a metabox which value is saved successfully after clicking "Update" when editing post. Of course, the values are custom taxonomies. **But i don't know how to add another select list and make it save its values successfully too...**               add_action( 'add_meta_boxes', 'so_custom_meta_box' );          function so_custom_meta_box($post){     add_meta_box('so_meta_box', 'Reproductor 1', 'custom_element_grid_class_meta_box',     $post->post_type, 'normal'           , 'high');     }          add_action('save_post', 'so_save_metabox');          function so_save_metabox(){      global $post;          if(isset($_POST["custom_element_grid_class"])){          //UPDATE:          $meta_element_class = $_POST['custom_element_grid_class'];         //END OF UPDATE              update_post_meta($post->ID, 'custom_element_grid_class_meta_box',   $meta_element_class);         //print_r($_POST);     }     }          function custom_element_grid_class_meta_box($post){     $meta_element_class = get_post_meta($post->ID, 'custom_element_grid_class_meta_box', true); ?>               <select name="custom_element_grid_class" id="custom_element_grid_class">       <option value="Netu" <?php selected( $meta_element_class, 'Netu' ); ?>>Netu</option>       <option value="Netu-latino" <?php selected( $meta_element_class, 'Netu-latino' ); ? >>Netu Latino</option>       <option value="Netu-castellano" <?php selected( $meta_element_class, 'Netu- castellano' ); ?>>Netu Castellano</option>       <option value="Netu-vose" <?php selected( $meta_element_class, 'Netu-vose' ); ?>>Netu    Vose</option>     </select>            <select name="custom_element_grid_class" id="custom_element_grid_class">       <option value="Vk" <?php selected( $meta_element_class, 'Vk' ); ?>>Vk</option>       <option value="Vk-latino" <?php selected( $meta_element_class, 'Vk-latino' ); ?>>Vk  Latino</option>       <option value="Vk-castellano" <?php selected( $meta_element_class, 'Vk-castellano' );  ?>>Vk Castellano</option>       <option value="Vk-vose" <?php selected( $meta_element_class, 'Vk-vose' ); ?>>Vk    Vose</option>     </select>          <?php     }      Only the first select list values are saved when i click update, but not the second. I already know this has to be with the save code **but i can't figure out how to be able to modify it so i can put a second select list and its value can be saved.**


title: Displaying Post Title on Post Edit page?

text: I'm trying to include the post title in a custom post type edit screen. For example if the post is called Biography, I want the edit page title to be 'Edit Biography'. I'm using the below code:               function my_post_register() {      $mypagetitle = $post->post_title;      $labels = array(       'edit_item' => __('Edit '.$mypagetitle),      Why isn't this displaying the post title?


title: Migrating a page to be an article

text: I've decided, that some second level pages I have, should really be blog articles. I want to copy and paste the title and body to an article and then delete the page (is there a better way of doing this?). Now I'm worrying about already existing links to the pages. I don't want them to break ... can I somehow enter the old URL as an alias URL for the article? Or maybe forward from http://mypage.com/level-one/level-two-page/ to http://mypage.com/2010/07/30/level-two-page-as-article/ without showing the olt level-two-page in the navigation?


title: How to get Ajax into a theme - without writing a plugin?

text: Okay, I'm starting out with some AJAX stuff in a wordpress theme 1) I'm building a child theme OFF the thematic framework 2) My child theme has a header.php, index.php, functions.php and style.css (at this stage) In my header.php I have the following (btw: the code is adapted from http://codex.wordpress.org/AJAX_in_Plugins):               <?php         if( !is_admin() ) {      add_action('wp_ajax_my_special_action', 'my_action_callback');      add_action('wp_ajax_nopriv_my_special_action', 'my_action_callback');      $_ajax = admin_url('admin-ajax.php');         }     ?>     <script type="text/javascript" >     jQuery(document).ready(function($) {           var data = {       action: 'my_special_action',       whatever: 1234      };           jQuery.post('<?php echo($_ajax); ?>', data, function(response) {       jQuery('#output').html('Got this from the server: ' + response);      });          });     </script>     </head>      Right so that's all cool - and it updates the OUTPUT div on the page with "Got this from the server: 0" I need a PHP function called "my_action_callback" - so in my theme's functions.php I have the following:               function my_action_callback() {           $whatever = $_POST['whatever'];           $whatever += 10;              echo 'whatever now equals: ' . $whatever;           die();     }      This is the ONLY function in my functions.php To make sure the PHP function is working I stick my_action_callback() into my index.php - and it outputs "whatever now equals: 10" as expected. HOWEVER - the AJAX response is always 'Got this from the server: 0' Ajax never seems to get the response from the PHP function. I tried adding .ajaxError() to see if there were any errors - nope. I tried adding the PHP functions to another plugin of mine - nope. What am I missing that jQuery isn't doing the ajax bit for me? Thanks in advance


title: Displaying a random user with a shortcode

text:
I'm trying to setup a shortcode to show a single random user each time the page is refreshed. I've been successful in displaying **all** users or a select user by the user ID. Here is my shortcode as it is now:               //* Shortcode for getting users     function list_of_users( $atts ) {              extract( shortcode_atts(             array(                 'display' => 'all',                 'user' => '30'             ),             $atts         ));              switch ( $display ) {             case 'all':                 $content = display_all_users();                 break;             case 'single':                 $content = display_single_user( (int) $user );                 break;             case 'rotate':                 $content = display_rotate_users();                 break;             default:             break;         }         return $content;     }     add_shortcode('staff', 'list_of_users');      * * * Here's the function to display **all** users:               function display_all_users(){          $args = array(             'orderby' => 'ID',             'order' => 'ASC'         );         $users = get_users( $args );              $html = '
';             foreach( $users as $user ){                  $user_info = get_userdata($user->ID);                 $html .= '
';                 $html .= 'user_nicename.'" class="staff-image">';                 $html .= mt_profile_img( $user->ID, array('size' => '250x250','echo' => false));                 $html .= '';                 $html .= '
user_nicename.'" class="staff-name">
'.$user->display_name.'
';                 $html .= '
';                 $html .= get_field('certifications','user_'.$user->ID);                 $html .= '
';                 $html .= '
';                 $html .= get_field('short_bio','user_'.$user->ID);                 $html .= '
';                 $html .= 'user_nicename.'" class="more-staff-bio">Read more from ' . $user_info->user_firstname . '

';                 $html .= '
';             }         $html .= '
';         return $html;     }      * * * Here's the function to show a single user by ID:               function display_single_user( $user_id = 30 ){              $html = '
';         $html .=  mt_profile_img( $user_id, array('size' => '175x175','echo' => false));         $html .= '

';         $html .=  get_field('short_bio','user_'.$user_id);         $html .= '
Read more staff bios';              return $html;     }      * * * Where I'm stuck is to take the list of all users and then randomizing the user id to then use to display certain info. I would like to keep the output of the single user (above) for this random user...it's just a matter of how to get that random ID. Any suggestions on how to accomplish this?


title: Get the page address when using ajax

text: I have a page that uses jQuery to update some content. I want to run some PHP functions based on the url of the page. However, when I get the url of the page using PHP it returns the path of the WP Ajaz script. Is there anyway I can get the currently visible url in the browsers address bar? As an example if I go to: www.mydomain.com/page/?criteria=selection The following php code: `$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];` returns the following: www.mydomain.com/wp- admin/admin-ajax.php


title: How to let a role handle media without post permissions

text: I have a CPT to replace my "post"-post-type, but I still need to be able to use attachments. The problem is, that attachments have the post-capabilities. I don’t want to give post capabilities to my role, because of that, I tried to find a way to avoid it. I found a hack in the wordpress track: http://core.trac.wordpress.org/ticket/19834               function crunchhack() {        global $wp_post_types;        $wp_post_types['attachment']->cap->edit_post = 'upload_files';     }     add_action( 'init', 'crunchhack' );      I have added it to my `functions.php`. It did not work, because of that, I tried to replace all post-capabilities of the attachment post-type with `upload_files`:               function fix_media_permissions() {         global $wp_post_types;         $wp_post_types['attachment']->cap->edit_post = 'upload_files';         $wp_post_types['attachment']->cap->read_post = 'upload_files';         $wp_post_types['attachment']->cap->delete_post = 'upload_files';         $wp_post_types['attachment']->cap->edit_posts = 'upload_files';         $wp_post_types['attachment']->cap->edit_others_posts = 'upload_files';         $wp_post_types['attachment']->cap->edit_published_posts = 'upload_files';         $wp_post_types['attachment']->cap->publish_posts = 'upload_files';         $wp_post_types['attachment']->cap->delete_posts = 'upload_files';         $wp_post_types['attachment']->cap->delete_others_posts = 'upload_files';         $wp_post_types['attachment']->cap->delete_published_posts = 'upload_files';         $wp_post_types['attachment']->cap->delete_private_posts = 'upload_files';         $wp_post_types['attachment']->cap->edit_private_posts = 'upload_files';         $wp_post_types['attachment']->cap->read_private_posts = 'upload_files';     }     add_action( 'init',  'fix_media_permissions');      Sadly this doesn’t work either. I can see the uploaded images, but that’s it. Any ideas?


title: How can I make wp-pagenavi work on a custom query built upon a form submission?

text: I've also posted this on the wordpress support forums, for scribu's wp- pagenavi plugin: http://wordpress.org/support/topic/plugin-wp-pagenavi-custom-query-form- submit-part-2?replies=1 My situation: I am using a form to create a custom query that displays posts from a custom post type archive matching a certain custom field (Eg: For "custom-post-type" show only posts that have the "custom-field" value selected from the form). I know, it's called filtering :P My custom post type archive looks like this: `www.example.com/custom-post-type-archive` (note that I use the "post name" permalink setting) Upon form submission, the new url is this: `www.example.com/custom-post-type-archive?key=value` The custom query is set to show only posts with _value_ of _key_ custom field:               $value = $_GET['value'];     $paged = get_query_var('page');     $args = array(             'post_type' => 'custom-post-type',             'meta_key' => 'key',             'meta_value' => $value,             'paged' => $paged,             'posts_per_page' => 10     );     $my_query = new WP_Query($args);      After the loop I have:               wp_pagenavi(array('query' => $my_query));     wp_reset_postdata();      The query works, I get the right results. But I have problems getting pagination to work. When I go to the next page, I get this url: `www.example.com/custom-post-type-archive/page/2?key=value` but pagination still shows like I'm on the first page and the results are the same. If I manually enter:   `www.example.com/custom-post-type-archive?key=value&page=2`   I get the right results (from page 2), but the all navigation links are the same as the url I manually entered above. Please help (hints, resources, anything). Thx, Radu


title: Add social icons in a theme through custom admin menu

text: Is it possible to make a theme with an option of configuring social icons with links through the custom header control panel? I googled it and found nothing that could help me, any help on that topic will be very appreciated **UPDATE**   What I'm trying to achieve is that in the theme control panel (preferably inside the `header` panel and without using an external plugin) the user will be able to set which social icons will appear and to configure them.


title: Adding Multiple Images to Sidebar Through Dashboard

text:
I have a sidebar with 3 images hardcoded. I'd like to make it so you can change these through the WordPress dashboard. What's the easiest way to accomplish this? Using a plugin, custom post type?
             <img class="img-sidebar" img src="<?php bloginfo('template_directory'); ?>/img/Sidebar1.png" />

             <img class="img-sidebar" img src="<?php bloginfo('template_directory'); ?>/img/Sidebar2.png" />

             <img class="img-sidebar" img src="<?php bloginfo('template_directory'); ?>/img/Sidebar3.png" />


title: WordPress most commented posts of last X days

text:
I'm working on implementing a WP feature that shows the most commented posts from the last X days (e.g. lat 2 days). I've used the following code I found on the web (and here on SO), which does the job:
     <?php     function filter_where($where = '') {     //posts in the last 30 days     $where .= " AND post_date > '" . date('Y-m-d', strtotime('-10 days')) . "'";     return $where;     }          add_filter('posts_where', 'filter_where');          query_posts('post_type=post&posts_per_page=5&orderby=comment_count&order=DESC');          while (have_posts()): the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
     <?php          endwhile;          wp_reset_query();     ?>
      The problem that occurs is that the wp_reset_querry apparently doesn't work, as all category listings, tag cloud etc after the above code are messed up -- what happens is that if there's another WP code that lists posts in a category, it'll list only the X days that the above code mentions, despite having wp_reset_querry. I'm trying to figure out why that is and what I'm doing wrong here? I'd appreciate any help. Also, if there's an easier or better way of displaying the most commented posts over the last X days, please let me know. Thanks!


title: Updating the database with advanced custom fields

text: I'm having a real problem with updating a database table using advanced custom fields within a custom post type. I have a table in the database called 'wp_company_profiles' with fields 'address_1' and 'address_2', and have two advanced custom fields set up with the same values. I am trying to put together a hook that will update the table fields when a particular post in updated. Below is the code I am using, but I can't figure out why it won't work.               function update_company_profile($post_ID)  {         global $wpdb;              if ($parent_id = wp_is_post_revision( $post_id )) $post_ID = $parent_id;              $address_1 = get_post_meta($post_ID, 'address_1', true);         $address_2 = get_post_meta($post_ID, 'address_2', true);              $sql = $wpdb->query("UPDATE wp_company_profiles SET                 address_1 = '{$address_1}',                 address_2 = '{$address_2}',                 WHERE pid = {$post_ID}");              $wpdb->query($sql);     }          add_action('save_post', 'update_company_profile');


title: Rating system for users

text: I want to implement a system on my wordpress site. In my site, there are a bunch of users signed up. It is a social networking site. I would basically like a rating system that ranks the users based on their skill. I am using buddy press for users to create their own profiles. I almost thought of just adding a criteria on their profile, a drop down menu, that says rate your gaming skills 1-10. but the problem with that is that everyone will rank themselves high. I almost would like a system where the user could go and rank themselves, but I could come in and modify the ranking if I need to. Any suggestions?


title: Security around save_post hook

text: There are a lot of examples using the `save_post` hook, that include adding and verifying a nonce, and checking the user has appropriate permissions before you continue. Is this necessary? When updating/publishing a post, WP verifies the normal nonce, and checks permissions itself, redirecting to a 403 or 'Are you sure you want to do this?` page if something doesn't check out. As such, the hook won't even be called if a bad request was made, so why would I have to double check these things myself?


title: Previos and next post navigation - set to all posts not category

text:
I have the following code which adds post navigation to the bottom of single posts. It currently displays the next and previous posts from whatever category the post is assigned to but i'd like it show prev and next for all posts instead. Code is below
     <?php $prevPost = get_previous_post(true);     if($prevPost) {?>

Previous
     <?php $prevthumbnail = get_the_post_thumbnail($prevPost->ID, array(100,100) );?>     <?php previous_post_link('%link',"$prevthumbnail
%title
", TRUE); ?>
          <?php } $nextPost = get_next_post(true);     if($nextPost) { ?>

Next
     <?php $nextthumbnail = get_the_post_thumbnail($nextPost->ID, array(100,100) ); } ?>     <?php next_post_link('%link',"$nextthumbnail
%title
", TRUE); ?>
     <?php ?>


title: URL Encoding/decoding issue?

text: I am using chines language in my URL , It giving some issue . If you copy and past chines URL to address bar directly it will work . but when you create URL dynamical it creates some number in URL http://someting.com/%E6%96%B0%E5%8A%A0%E5%9D%A1%E5%8D%8E%E4%B9%90%E6%80%BB%E4%BC%9A%E6%88%90%E7%AB%8B%E5%A4%A7%E4%BC%9A-sme- test/ '%E6%96%B0%E5%8A%A0%E5%9D%A1%E5%8D%8E%E4%B9%90%E6%80%BB%E4%BC%9A%E6%88%90%E7%AB%8B%E5%A4%A7%E4%BC%9A' - this really some Chinese characters Please help me to solve this problem


title: W3 Total Cache + S3 + Cloudfront.

text: For a small site, what WordPress/site files normally go into the S3 bucket in order to get optimal use as a CDN?


title: Progress bar - JS + CSS

text:
I'm trying to implement a progress bar to wordpress. Exactly this one : http://workshop.rs/2012/12/animated-progress-bar-in-4-lines-of-jquery/ **php shortcodes**               function progress_bar(  $atts, $content = null ) {         global $progress, $pbar_class;         extract( shortcode_atts( array(             'title' => '', //additional text             'progress' => '', //progress %             ), $atts) );         $pbar_class = '.progressBar'.rand(100,999);         return '

';     }          add_shortcode( 'pbar', 'progress_bar' );          function pbar_script() {         global $progress, $pbar_class;         foreach($pbar_class as $pb_class) {             echo '';        }     }          add_action( 'wp_footer', 'pbar_script' );      **js**               function progress(percent, $element) {         var progressBarWidth = percent * $element.width() / 100;         $element.find('div').delay(500).animate({ width: progressBarWidth }, 500).html(percent + "% ");     }      I have no idea how to make it work.


title: Prevent Hacking of Wordpress Site

text: My Wordpress site is beign hacked by some hackers of Saudi Arabia. How can i prevent them from hacking. I have also found that many other Wordpress sites have also been hacked.


title: One item not showing when programmatically Generating Navigation Menu

text: I am programmatically generating a navigation menu with the following....               add_action( 'init', 'register_navmenus' );     function register_navmenus() {          // Check if Top menu exists and make it if not     if ( !is_nav_menu( 'Navigation' )) {         $menu_id = wp_create_nav_menu( 'Navigation' );              $menu1 = array('menu-item-title' => 'Home','menu-item-object' => 'page','menu-item-object-id' => get_page_by_path('home')->ID,'menu-item-type' => 'post_type','menu-item-status' => 'publish');              $menu2 = array('menu-item-title' => 'Register','menu-item-object' => 'page','menu-item-object-id' => get_page_by_path('register')->ID,'menu-item-type' => 'post_type','menu-item-status' => 'publish');              $menu3 = array('menu-item-title' => 'Login','menu-item-object' => 'page','menu-item-object-id' => get_page_by_path('login')->ID,'menu-item-type' => 'post_type','menu-item-status' => 'publish');              wp_update_nav_menu_item( $menu_id, 0, $menu1 );         wp_update_nav_menu_item( $menu_id, 0, $menu2 );         wp_update_nav_menu_item( $menu_id, 0, $menu3 );     }            }      This all works correctly apart from Login, its not created. Is the 'login' slug already being used by the system or something similar? **NOTE** If I change the line to...                   $menu3 = array('menu-item-title' => 'Login','menu-item-object' => 'page','menu-item-object-id' => get_page_by_path('login1')->ID,'menu-item-type' => 'post_type','menu-item-status' => 'publish');      Then the page does get generated but obviously doesnt link as the slug is incorrect


title: the_post_thumbnail unless video id is added

text:
I have 2 choices on the edit post page to insert an video ID from either vimeo or youtube. The user needs to select, with a select field (channel), if he wants to embed video from one or the other.               <?php if (get_field('channel') == 'Youtube') {             echo get_field('youtube_video_id');         }         if (get_field('channel') == 'Vimeo') {             echo get_field('vimeo_video_id');         }     ?>      Now I'd like this to overrule the_post_thumbnail. So when a video is posted is shows the video instead of the thumb. Is that possible?               <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>     <?php if ( has_post_thumbnail()) : ?>         <?php the_post_thumbnail(); ?>              *** MAGIC HERE I GUESS? ***              <?php endif; ?>     <?php endwhile; else: ?>
Nothing here
         <?php endif; ?>      Hope somebody can push me in the right direction. Or am I doing this the other way arround? I'm my PHP is still a learning curve. Thanks, /Paul


title: Display random image url from list of input values

text: I have created an options page in my WordPress theme that allows the user to input a url/upload an image to an input field. The field has the name headerimage_options[image] and when it is populated it can be saved and outputted in the theme with the following code: `<?php echo esc_url( $headerimage_options['image'] ); ?>` I have created three inputs with the names [image], [image2] and [image3]. I can save the content of the input fields and output all of the images using the code below:               <?php $headerimage_options = get_option( 'headerimage_options' ); ?>              <img title="<?php bloginfo( 'name' ); ?>" src="<?php echo esc_url( $headerimage_options['image'] ); ?>"/>              <img title="<?php bloginfo( 'name' ); ?>" src="<?php echo esc_url( $headerimage_options['image2'] ); ?>"/>              <img title="<?php bloginfo( 'name' ); ?>" src="<?php echo esc_url( $headerimage_options['image3'] ); ?>"/>      My question is how do I output just one of the images at random? I've searched but couldn't find an answer anywhere.


title: Custom post type isn't working

text: I just built up a beta environment for testing my new Wordpress site. I didn't migrate the database; I did my own installation again and ported over my theme (it's a simple theme) to my new instance. Everything is working great, except for the one custom post type that I am using. Here is the relevant code from `functions.php`:               function createCommunityPostType() {         $args = array(                 'public' => true,                 'label' => 'Community',                 'capability_type' => 'community',                     'capabilities' => array(                                     'edit_post' => 'edit_community',                                     'edit_private_posts' => 'edit_private_communities',                                     'edit_published_posts' => 'edit_published_communities',                                     'edit_posts' => 'edit_communities',                                     'edit_others_posts' => 'edit_others_communities',                                          'delete_post' => 'delete_community',                                     'delete_posts' => 'delete_communities',                                     'delete_others_posts' => 'delete_others_communities',                                     'delete_private_posts' => 'delete_private_communities',                                     'delete_published_posts' => 'delete_published_communities',                                          'read_private_posts' => 'read_private_communities',                                     'read_post' => 'read_community',                                     'publish_posts' => 'publish_communities'                     ),                     'map_meta_cap' => true,                     'has_archive' => true         );         register_post_type('community', $args );     }     add_action('init', 'createCommunityPostType');      My custom post type isn't showing up in the menu and I can see that the capabilities don't exist (I'm using the members plugin to make that more visible). I know the code is executing because I added some simple `print` statements before and after the call to `register_post_type`. The print statements were part of the HTML response. I can't figure out why this post type isn't working. I have other methods in `functions.php` to handle stylesheets, scripts, some overrides for menus and sidebars and so on. Those are all working fine. **Edit** : I changed to use default capabilities and the menu option is still not appearing:               function createCommunityPostType() {         $args = array(                 'public' => true,                 'label' => 'Community',                 'capability_type' => 'community',                     'capabilities' => array(                                     'edit_post' => 'edit_posts',                                     'edit_private_posts' => 'edit_posts',                                     'edit_published_posts' => 'edit_posts',                                     'edit_posts' => 'edit_posts',                                     'edit_others_posts' => 'edit_posts',                                          'delete_post' => 'delete_posts',                                     'delete_posts' => 'delete_posts',                                     'delete_others_posts' => 'delete_posts',                                     'delete_private_posts' => 'delete_posts',                                     'delete_published_posts' => 'delete_posts',                                          'read_private_posts' => 'read',                                     'read_post' => 'read',                                     'publish_posts' => 'publish_posts'                     ),                 'map_meta_cap' => true,                     'has_archive' => true         );         register_post_type('community', $args );     }     add_action('init', 'createCommunityPostType');      I did however switch to using some very basic sample code from Wordpress and that Custom Post Type (CPT) appears:               function codex_custom_init() {         $args = array( 'public' => true, 'label' => 'Books' );         register_post_type( 'book', $args );     }     add_action( 'init', 'codex_custom_init' );


title: Filter Select results based on selection

text: I am trying to filter which job results are rendered to the page whenever the user changes the select item on my form. The select items are dynamically populated by the code below which assigns them a value of their slug and their label.                       <div style="background: url('<?php bloginfo( 'template_directory'); ?>/images/drop-arrow2.png') no-repeat;" id="cat-select">                 <form name="job_select" action="<?php bloginfo('url'); ?>/jobs.php" method="get">                     <select class="job_cats" name="position_name" onchange='<?php echo ".$category->category_nicename."; ?>'>                              <?php                                    // For every child of blog                                   $post_count = 1;                                   $categories =  get_categories('child_of=16');                                    foreach ($categories as $category) {                                     $option = '<option value="'.$category->category_nicename.'">';                                     $option .= $category->cat_name;                                     $option .= '</option>';                                     echo $option;                                     $post_count++;                                   }                              ?>                      </select>                 </form>         </div>      The code then moves on to my main WP Loop where all of my posts are rendered to the page using this query -                   <?php          $node_id = 0;         $args = array(             'post_type' => 'jobs',             'category_name' => $_GET['position_name']         );              $the_query = new WP_Query( $args );               ?>      I want to the `$category->cat_name` (the slug) into the 'category_name' argument to filter the results however I am unsure of how I can a) make the page refresh to display these new filtered results (would I need AJAX to do this?) and b) How I can pass the current selected index of the select box to 'category_name' as a parameter, I have tried using `$_GET['position_name']` but this has failed to produce any result. To give a visual of how my page looks, a screenshot can be seen here Form Screengrab any suggestions would be greatly appreciated.


title: Combine and Minify wp-admin files, also re-write URI's for CDN

text: I'm currently using WP-MINIFY to combine and minify my front-end files as I have a large number of plugins, it has helped greatly and I'm looking for a similar solution to help with backend performance issues. Ideally a solution that would combine all backend admin files that are being loaded, especially those that are introduced by plugins. Thanks in advanced for any help.


title: Wordpress Plugin Authoring question about jquery and css

text: When I'm writing a plugin, do I assume that jquery is included, or should I always wp_enqueue_script it and let wordpress figure it out? Also, what's the best practice for getting an image path figured out in my bundled css file?


title: Should i use the wordpress Options table or to create database table..?

text: I have an application built in asp.net but i'd like to port it over to wordpress as a plugin. Is it practical to develop the php version of this app using the Wordpress options table or should i rather create new database tables in the existing wordpress database? Lastly this next question may be answered by answering the first question hopefully and that is: When should I use wordpress option tables over creating the database tables for the intended plugin? Thanks way in advance..


title: How to check if post has any tag?

text:
I am displaying post tags like this:
<?php the_tags('Tags' , ' '); ?>
      It works fine, but if the post does not have any tag, then it adds empty div

      So, how can I use the condition to check if post has any tag, then display above.


title: Problem on register/login widgets

text: I have downloaded and uploaded, activated successfully the plugin : Sidebar login of wordpress.org, which can be found here : Sidebar login In the picture description of sidebar login(in the link above), there is register link, so that people can use it to generate a new username via email. However, in my blog, it has only the forget password link : ![enter image description here](http://i.stack.imgur.com/8COWV.png) So, what was the problem ? I beg your pardon for my question if you feel my question is not appropriate. Please help me. Thanks.


title: How to show custom taxonomy child posts through shortcode in WordPress

text:
My question: I have custom taxonomy in WP named Videos and childs of this taxonomy named music-videos and game-videos. In my WP theme this is shortcode which shows ALL video posts from main taxonomy named VIDEOS:                   <?php     add_shortcode("video", "video_shortcode");     function video_shortcode($atts, $content) {         extract(shortcode_atts(array(             "items" => 3,             "cat" => null,             "id" => null,             "nav" => false,             "order" => "desc",             "orderby" => "ID",             "videos" => null         ), $atts));         $order       = strtoupper($order);         $items_count = 0;         $items_src   = null;         if ($id == null) {             $query = array(                 'post_type' => 'video',                 'orderby' => $orderby,                 'order' => $order,                 'posts_per_page' => $items,                 'cat' => $cat             );             if (of_get_option('shortcat_video', '1') == '1') {                 $query = array(                     'posts_per_page' => $items,                     'orderby' => $orderby,                     'order' => $order,                     'post_type' => 'video',                     'tax_query' => array(                         array(                             'taxonomy' => 'videos',                             'field' => 'slug',                             'terms' => array(                                 $cat                             )                         )                     )                 );             }             if ($videos != null) {                 $query['tax_query'] = array(                     array(                         'taxonomy' => 'videos',                         'field' => 'slug'                     )                 );             }             $wp_query_video = new WP_Query($query);         }         $items_src .= '

';         while ($wp_query_video->have_posts()):             $wp_query_video->the_post();             global $post;             $fix            = the_excerpt_max(0);             $title          = get_the_title($fix);             $video          = get_post_meta($post->ID, "video_link", true);             $image_id       = get_post_thumbnail_id();             $venue          = get_post_meta($post->ID, "vd_venue", true);             $data_video     = get_post_meta($post->ID, 'vd_date', true);             $time           = strtotime($data_video);             $pretty_date_yy = date('Y', $time);             $pretty_date_M  = date('F', $time);             $pretty_date_d  = date('d', $time);             $cover          = wp_get_attachment_image_src($image_id, 'video-shortcode');             $cover_large    = wp_get_attachment_image_src($image_id, 'photo-large');             $no_cover       = get_template_directory_uri();             $items_src .= '

';             if ($image_id) {                 $items_src .= '                          ';             } else {                 $items_src .= '                          ';             }             $items_src .= '

' . $title . '
';             if ($data_video) {                 $items_src .= '
' . $pretty_date_d . ' ' . $pretty_date_M . ' ' . $pretty_date_yy . '
';             } else {                 $items_src .= '
' . $venue . '
';             }             $items_src .= '

';         endwhile;         wp_reset_query();         $items_src .= '

';         return $items_src;     }     ?>      Question - how to show through shortcode only posts from child taxonomy: music-videos or only from games-videos? Thank you for your time and patience, guys and gals


title: Order custom posts by taxonomy, then by meta_key

text: I've created a custom post type called Player Manager, where I have all the players of a football team. The CPT has four different categories - goalkeepers, defenders, midfielders and strikers. I also gave it a few text fields, where the only important one, for now, is "number". Here's how I'd like it to show up in the archives page:               Goalkeepers     -1     -21     -24     Defenders     -3     -4     -5     -11      So, what I want is for the posts to be ordered first by the categories and then, within the categories, by the numbers. I've managed to have them ordered by either categories or numbers (right now by numbers):               $querystr = "     SELECT $wpdb->posts.*     FROM $wpdb->posts, $wpdb->postmeta     WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id     AND $wpdb->posts.post_type = 'players'     AND $wpdb->posts.post_status = 'publish'     AND $wpdb->postmeta.meta_key = 'number'     ORDER BY ABS ($wpdb->postmeta.meta_value) ASC     ";     $pageposts = $wpdb->get_results($querystr, OBJECT);      But that's not how I'd like it. I guess I could do the same loop 4 times, but with different categories.


title: Am I using get_posts wrong?

text:
I have               <?php      $folioPosts = get_posts(array('category_name' => 'portfolio', 'numberposts' => 3));     if ($folioPosts->have_posts()) :     foreach ($folioPosts as $folioPost) :      setup_postdata($folioPost);     ?>
       <?php if (has_post_thumbnail()) : ?>
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail() ?>
       <?php endif; ?>
<a href="<?php the_permalink() ?>"><?php the_title() ?>

          <?php     endforeach;     else :     ?>
No folio posts to display ...
     <?php endif; ?>      I am getting > Fatal error: Call to a member function have_posts() on a non-object ... I think its because my args to get_posts are wrong. Did I do something wrong?


title: LaTex MarkUp - align equations

text: I'm very elated by the fact that it has LaTeX support. I would like to know whether the `\begin{align} \end{align}` environment could be used, because it looks very good since the equations are aligned. If not how can i make this LaTeX command look better?               \begin{align*}     \int \frac{1}{(2x^{2}+4x-2)^{-\frac{3}{2}}} \ \textrm{dx} &= \frac{\sqrt{2}}{8} \int\frac{\sec{t} \cdot \tan{t}}{\tan^{3}{t}} \ \textrm{dt} \\\ &= \frac{\sqrt{2}}{8} \int\frac{\cos{t}}{\sin^{2}{t}} \ \textrm{dt}     \end{align*}


title: menu items outside of blog

text: Is there way that I can echo out my wordpress menu items to a main site menu. The wordpress install runs in a subfolder of my main site. I thought there might be a way to do this that is similar to referencing wp- load as a include outside of wordpress Thanks


title: want to stop stripping out from my post content

text:
I have installed wordpress for my site. I am trying to insert posts using function `wp_insert_post()` from my self-made script.               content of my post contains video-embed code of google.     <object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/-T9omX2XD2s?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-T9omX2XD2s?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>      when I am running script to insert this content in my post, by my surprise this code got stripped out from post. I have surfed the internet and wordpress forum, I found that It is a SECURITY feature of wordpress. I want to remove this security feature from my own wordpress site. so what should I do to opt-out this stripping function? so that I can add above html code as a content of a post. Please give me the function name which is stripping out this codes from my content, so I can stop it working. My complete code.               <?php     require('./wp-blog-header.php');     $contactObject['postTitle'] = $_POST['post_title'];     $contactObject['videoCode'] = $_POST['videoCode'];     $contactObject['description'] = $_POST['description'];     $categoryIds = $_POST['categories'];          insertPosts($contactObjects,$categoryIds);          function insertPosts($contactObjects,$categoryIds)     {                  $videoCode = $contactObject['videoCode'];             $videoEmbedCode = '<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/'.$videoCode.'?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'.$videoCode.'?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>';                  $content = '';             if($contactObject['description'] != '')             {                     $content .= '
'.$contactObject['description'].'

';             }             $content .= $videoEmbedCode;                  // Create post object             $my_post = array(                      'post_title' => $contactObject['postTitle'],                      'post_content' => $content,                      'post_status' => 'publish',                      'post_author' => 1,                      'post_category' => $categoryIds,                  );                  // Insert the post into the database             $postId = wp_insert_post( $my_post );     }     ?>


title: Sort WP_User_Query by meta_key value with pre_user_query

text: I'm trying to order my users by their Member Number - which is a custom meta value. It seems I can't easily orderby a `meta_value`. I've read a few workarounds but I can't get my head around it. This is my code so far...               function sort_by_member_number( $vars ) {         if ( isset( $vars->query_vars['orderby'] ) && 'member-number' == $vars->query_vars['orderby'] ) {             $vars = array_merge(                 $vars->query_vars, array(                     'meta_key' => 'arcc_member_number'                 )             );         }         return $vars;     }     add_filter( 'pre_user_query', 'sort_by_member_number' );      `arcc_member_number` is a numeric value - how can I extend this to sort by that value?


title: Making custom field's 'Name' available in the dropdown list by default in a theme?

text:
My single.php file has the following code:               <?php // Set and display custom field         $intro_image = get_post_meta($post->ID, 'Intro Image', true); ?>
             <img src="<?php echo $intro_image; ?>" alt="" />
 <?php     ?>      The user will have to type Intro Image (once) in the 'Name' field in order to see it next time in the drop-down list. I think it would be better if the user can see 'Intro Image' right after installing my Wordpress theme (I feel that the user should select options that are available, not write them down themselves). I'm not sure if what I'm saying make sense. But how to have those 'Names' available in the drop-down list before writing them?


title: Query post & loop problem.

text:
i having trouble while i added query to loop. please have a look whats the problem. here is the link
      <?php $count = 1;      $the_query = new WP_Query( 'category_name=headline&orderby=post_date&order=desc' );              if ( $the_query->have_posts() ) : while (have_posts()) : $the_query->the_post();       if($count == 1) : ?>           <a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?>      <?php dynamic_excerpt(400); ?>      <?php else : ?>
      <a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?>      <?php dynamic_excerpt(400); ?>
           <?php if ($count== 2 || $count == 4 ){ ?>             <?php dynamic_sidebar('index-insert') ?>      <?php } ?>      <?php $count = $count + 0; ?>         <?php endif; ?>     <?php $count++; ?>      <?php endwhile; ?>


title: Pagination in a Shortcode. Get_next_posts_link not working but get_previous_posts_link works fine right next to it

text:
I'm trying to output a custom post type archive using a shortcode. Everything works fine except for the get_next_posts_link part. The weird part is that it's right next to a get_previous_posts_link that works perfectly. Here's the function               function output_tips() {     global $paged;     $paged = get_query_var('paged') ? get_query_var('paged') : 1;     $args = array( 'post_type' => 'ht_tips', 'posts_per_page' => 1, 'paged' => $paged, 'caller_get_posts' => 1, 'orderby' => 'date', 'order' => 'DESC' );     $loop = new WP_Query( $args );          $inner = '';          while ( $loop->have_posts() ): $loop->the_post(); global $post;              $title = '
'. get_the_title() .'
';              $content = get_the_content();              $output = '
' . $title . $content . '
';              $inner .= $output;          endwhile;           $prev = '
' . get_previous_posts_link( __( '← Previous' ) ) . '
';     $next = '
' . get_next_posts_link( __( 'Next →' ) ) . '
';          wp_reset_postdata();          $open = '
';     $close = '
';     $return = $open . $inner . $prev . $next . $close;          return $return;     }      Any idea why this might be?


title: How to change archieve frequency of the media file in uploads folder for wordpress blog

text: So far I can see my media file is divided into month and year as 2008/09 like directory. But I am getting concerned because I am currently hosting a community listing site that may incurr more than 1000 upload (which is the limit for most shared hosting for EACH directory). I realize recently that the shared site can not have more than 500,000 file/ file in combine. So I think it will be getting pretty limited after a while. Anyone has solution for this issue in term of changing the archieve frequency maybe into every week instead of every month? I googled it but can never find a answer for it all at! Or...am I getting into a wrong direction? Please help thank you all!


title: wp_list_pages by taxonomy?

text: I need help creating a Walker for wp_list_categories that filters through taxonomies and actually lists the pages at the end element. I'm completely lost on how to go about this. I've successfully implemented a Walker for the wp_list_pages function but that obviously doesn't apply in this case because my wp_list_pages Walker relied on child-parent relationships * * * Additionally, I'd like to be able to specify which terms I want to return. Basically, I need a list filtered by taxonomy and terms.


title: Which method is best to enqueue scripts

text: I'm currently authoring the development of a plugin for wordpress, and I'm having trouble figuring out which would be the best way to add scripts to the plugin. I'm in the process of adding more scripts, and I already have JQuery (through WordPress), JQuery UI (through googleapis). Eventually I'll be adding SWFUpload, but before I continue, I wanted to understand what would be the appropriate approach to my situation. From what I've gathered, and I'm not totally sure if I'm correct on it. There's 3 different ways to add/enqueue scripts.   1. Use the script already built inside WordPress - which I'm wondering could cause some issues with some webmasters using older versions of wordpress.   2. Download a stable version and add it to my plugin directory - which basically guarantees that the plugin will use the same version and will always be available.   3. Use the ajax.googleapis.com URL linking the script to enqueue - no changes to the version, but can connectivity with the webmaster's server or the googleapi server be an issue? The things I'm wondering about, is reliability, speed, and any standards to it, if any.


title: More than one search results page template

text: On my current project, I have to create 2, distinct templates to receive 2 distinct search results of the same site. Both researches are coming from different forms on different templates/pages. Thing is, there is only one search.php file in Wordpress, and I don't think it's possible to create another one. (like search-taxonomy.php) Is there a way to separate one search result of the other, and to then display the correct search page template in relation to which search form has been filled?


title: Replacing default display name to login name

text: I see a lot of forum threads about the possibility of changing the default WordPress display name to First Name and Last Name. By default, the default display name of my theme is set the First Name and Last Name and I would like to set it back to the login name by default. I'd like to know the bit of code I have to add to functions.php to get the job done. I am using Wordpress 3.8.1


title: Replacing Icons in the Dashboard

text: Is there a way for me to replace the icons in the WordPress Dashboard with custom ones? I'm imagining there's got to be a way to do this with the `functions.php` or, more ideally, with a custom-built plugin, but I have no idea how to do that kind of stuff, and Google has failed me. In particular, I'm looking to replace the Yoast SEO icon with a gray one to match the WordPress theme better: ![](http://i.imgur.com/nURHQLp.png)


title: I'm getting Georgia or Georgia-like on my blog when I don't want it wondering if wp-includes has been modified by a plugin

text: I'm trying to just use Lato which is used in twenty fourteen which is what is active in my http://janet.tokerud.com blog but getting something I used to use that doesn't fit this new theme. Thinking maybe when I did whatever I did - I think used a plug-in to get one the google fonts to show that it permanently changed something on the backend that is forcing this font to be used for body text in the blog post. Sorry I'm tech savvy but not a CSS professional or WordPress professional so I may be naming these things wrong. _**PROBLEM RESOLVED THANKS!_** See my comment below.


title: Add class name to post thumbnail

text:
I'm using post thumbnails to link to a page. Is it possible to add a class name to the post thumbnail image.
<a href="<?php the_permalink(); ?>" ><?php the_post_thumbnail(); ?>


title: Export local WP install to live - help needed

text: This question I'm asking has been asked a thousand different ways, and I refuse to believe I'm the only one with a basic need here so here goes: I'm taking a simple local install and putting it live. I've exported before, but it didn't seem to carry over any categories/settings/authors/etc. HOWEVER, that was almost a year ago, and it's entirely possible I didn't do things properly since I was just starting to learn WordPress. So, what I need is to ask "If I login as admin, and click 'export', does it..."   1. Does it export all posts and authors, including the post meta? (what authors wrote what posts)   2. Does it export all settings? (permalinks, discussion, reading, etc)   3. Does it export all media? (images, videos, etc) It's a simple list, but I'm being asked to take a very messy existing WP install and make it sexy in local then put it live with the new theme I built. I just want to know what to expect, so I can plan accordingly. Thank you all!


title: Check for files and database integrity

text: Someone started an automatic update of the WP core via dashboard today, and as it was taking too long, decided to cancel it. How do I check the files and the database for integrity to detect a possible corruption?


title: Catch own Exceptions

text:
I build some package with my own Exception but when I try to catch a exception I got fatal error: **Uncaught exception**. This situation is only when method with throw is passed by `add_action( 'init', array( $this, 'wp_some_method' ) );` Example:               class SomeClass {         public function __construct() {             add_action( 'init', array( $this, 'wp_some_method' ) );             echo '__constructor
';         }         function some_method(){             throw new \Exception('some message');         }         function wp_some_method( $post_type ){             throw new \Exception('Some second error');          }     }     try{         echo 'try
';         $o = new SomeClass();         //$o->some_method(); - this throw exception correct          } catch (\Exception $ex) {         echo $ex->getMessage();     }      Displayed on the screen: **try** **__constructor** And: **Fatal error: Uncaught exception 'Exception'**


title: How to process ajax requests correctly using ajax plugins

text: I've been stuck on this topic for a while. I followed Pippin's tutorial . According to a 2nd wordpress developer who I got advice from, this tutorial is now out of date/ not appropriate. He told me that I shouldn't `echo` things in the AJAX callback. > JavaScript should handle that. Also to send data in your callback, use > `wp_send_json()` or the higher level functions `wp_send_json_success()` and > `wp_send_json_error()`. All of them will `die` for you. No need to `exit` or > `die` afterward, like Pippin has done it in his tutorial. Which developer is correct? In the Codex, the example uses `echo` in the callback, just like Pippin has in his tutorial. Please can someone clarify? I've been getting conflicting advice & I'm confused by this topic.


title: How to keep a CPT from being visible on the front end?

text: Here's how I define the CPT:               $args = array(             'labels' => $labels,             'public' => FALSE,             'show_ui' => TRUE,             'capability_type' => SNG_CAP_SUPPORT,             'hierarchical' => FALSE,             'supports' => array(                 'title',                  'editor'             ),             'menu_icon' => SNG_PLUGIN_URL . '/images/admin-support.png',             'rewrite' => FALSE,             'has_archive' => FALSE );         register_post_type( SNG_SUPPORT_POSTTYPE, $args );      Basically when a user creates a post of this post_type there's a success message that says "view this post" which leads to the front end of my site _mysite.com/?sng-support=test-8_. I want to remove this message and link but I'm not looking for a CSS fix. There _MUST_ be a way to make this work? I tried playing with the args and I can't seem to figure out what I'm doing wrong... Essentially I don't want the posts to be accessible from the URL or the front end unless I specifically query for them. I appreciate any help! :)


title: Related Links Page with moderated, user suggested link submissions

text: Updating an old dinosaur of a site to Wordpress ( _3.5.1_ ),   one of the more popular pages on the old site is a “ **Related Links** ” page with links for and about kids. (e.g. _fitness, nutrition, education, bicycle safety etc._ ). We frequently receive email from teachers all over the U.S. indicating that -- _as the result of some sort of class project_ \-- their students have found sites they think relevant, asking if we would include the link(s) they’ve found on our “ **Related Links** ” page. On the new Wordpress site we would like to improve on the old “ **Related Links** ” page, providing users a means of submitting a request for inclusion ( _something like moderated comments?_   )   with a text-area to input the details of the request ( _comments?_ ) a **field for the suggested link** , a **field to suggest tags** ( _or categories_ ) as a means of categorizing the links, and a **user email field** for contact/validation. Ideally, approved link submissions would be **sortable by category, age or popularity** ( _via Google Analytics_ ), with a credit line for the submitting user e.g. ...               ( Courtesy of Little Suzie Smith, Mrs. Jones 3rd Grade Class 2012-2013 )      I fear this may require developing a plugin specifically for the case, but would sure feel silly re-inventing this wheel if there already exists the means to accomplish it without. Any Suggestions as to how this might be implemented ( _or approximated_ ) using an existing plugin and / or existing WP functionality ?


title: Change existing label in the admin bar with something else

text: In the admin bar an admin can create a new post by using the add new drop down. In there I want to change the label `Post` to something else. How can I do this? I just need the code to make the change in the admin bar as I have the code already to change the Post label everywhere else in the admin section. Bonus points if you can tell me how to change the order of the labels in the drop down too.


title: Set first level items to <h5> in wp_nav_menu()

text:
News & Features

Industry News
                     ............

      First Menu need h5 tag then others menu need ul li tage.


title: How to pass data parameter to ajax action function handler

text: I have the following js to process an ajax request:               $('#someelement').click(function() {                  var cokeValue = 'coke';                  var data = {                 action: 'load_post',                 another_par: someVar             };                  jQuery.post(ajax_object.ajax_url, data, function(response) {                 alert(response);             });       });      And this is my ajax handler function (hopefully my terminology is correct):               add_action('wp_ajax_get_coke', 'get_coke_ajax');     function get_coke_ajax() {             // need to get another_par in here !!!!!!!             die();     }      As you can see, the action is `load_post` which is fine, but I need to pass the `another_par` parameter to my ajax function so that I can assign its value to a variable and use it for my purposes.


title: Extra Title field for Comments

text: I want to display an extra title field for comments, that can be edited by the admin in the backend. NB, The extra title field also needs to display when the user is logged in. I have tried a range of plugins with no success. Can anyone point me in the right direction. Thank you.


title: How do I make pagination_links show as 01 02 03, instead of 1 2 3?

text: Based on: http://codex.wordpress.org/Function_Reference/paginate_links how to make these links show as 01, 02, 03... rather than the normal single digit? thanks so much


title: How to filter a wordpress core function?

text:
I would like to change the text in the wp media uploader. I managed to find the function at the media.php and i tried to using the filter to change the text like this:               function uploader_text() {     remove_action('post-html-upload-ui', 'media_upload_html_bypass' );     ?>
     <?php _e('mytext here'); ?>
     <?php     }       add_filter('post-html-upload-ui', 'uploader_text');      But I failed to do so. What I done wrong? **Update:** This is how I tried The related function in wp is like this:
                 <?php do_action('pre-html-upload-ui'); ?>
                         <?php _e('Upload'); ?>                         <input type="file" name="async-upload" id="async-upload" />                         <?php submit_button( __( 'Upload' ), 'button', 'html-upload', false ); ?>                         <?php _e('Cancel'); ?>

                 <?php do_action('post-html-upload-ui'); ?>
                       function media_upload_html_bypass() {                 ?>
               <?php _e('You are using the browser’s built-in file uploader. The new WordPress uploader includes multiple file selection and drag and drop capability. Switch to the new uploader.'); ?>
                 <?php             }             add_action('post-html-upload-ui', 'media_upload_html_bypass');      The text that i need to change is in media_upload_html_bypass() :               <?php _e('You are using the browser’s built-in file uploader. The new WordPress uploader includes multiple file selection and drag and drop capability. Switch to the new uploader.'); ?>      So I tried :               function uploader_text() {                          ?>
                     <?php _e('here is what i want to change the text.'); ?>
                          <?php                          }                  add_filter('media_upload_html_bypass', 'uploader_text');      Still not working.


title: videopress videos are not displayed when loading the content with ajax in a lightbox

text: I'm using videopress and I'm adding the videos into posts with the videopress shortcode, and when I visit the post I can see the videos and play them, but the problem is when loading the post with ajax and place just part of the content that contains the video in a lightbox, the videos are not displayed, someone can help me with this?, is it a problem with ajax when loading just part of the content?, thanks.


title: Comments from other blogs are getting added to my blog?

text: Today I started receiving a ton of requests to moderate comments on my blog, but when I looked at the comments they are clearly from multiple other people's blogs. What could be the cause of this and what do I do about this?


title: First post full width, rest in two columns

text:
Here is my loop               <?php if ( have_posts() ) : ?>                  <?php /* Start the Loop */ ?>          <?php $i = 0; while ( have_posts() ) : the_post();  ?>         <?php if ($i++ == 0) : ?>
             <?php get_template_part( 'content', get_post_format() ); ?>
              <?php else: ?>
             <?php get_template_part( 'content', get_post_format() ); ?>
              <?php endif; ?>     <?php endwhile; ?>      and my css               .entry-content-rest {         width: 48.5%;         float: left;         border: 1px solid #ddd;         border-radius: 7px;         }      This displays my content as follow               Post1          Post2      Post3          Post4      Post5      My problem is, say post 2 is longer (have more contents) than post 3, then my columns is displayed way wacky like this               Post1          Post2      Post3          open       Post4          Post5      Post6      Any suggestions to fix this