title: How to add Listbox / Select dropdown for shortcodes in WP 3.9 beta2 using TinyMCE?

text: I need a list-box for shortcodes in visual editor. With WP 3.8 I got it working like :                           createControl : function(n, cm) {                 switch (n) {              case 'example':                 var mlb = cm.createListBox('example', {                     title : 'Example Shortcode',                     onselect : function(v) {                        tinyMCE.activeEditor.selection.setContent(v);                      }                 });                      // Add some values to the list box         mlb.add('Shortcode', '[shortcode]Some Content Here[/shortcode]');              // Return the new listbox instance                 return mlb;         }      But these are not showing up in WP 3.9beta2. How to get it working? Thanks in Advance.


title: Force Plugin to English Translation

text: Here's my thing: I'm using a plugin that has multilang capabilities. The point is that the language translation in my country lang is very bad and it makes more complex than simpler my work. :D. So is there a way to force a plugin to not to use multilanguage and be showed, at least, in English?


title: Why do I get Fatal error: Call to undefined function get_most_recent_post_of_user()?

text: I am using WordPress 3.4.2. The codex doesn't say anything about this function being depreciated: http://codex.wordpress.org/Function_Reference/get_most_recent_post_of_user


title: Setting default category for display

text: The default category for the page News is news. But I want the _page_ news to show all posts. Not just _news_ posts. All posts, includes news posts and engineering posts. When you hit the main site is http://www.papermepress.com, it does indeed do this, as you can verify. But when you go to News it it only shows the news category. How do I fix so that it show both?


title: How to customize taxonomy archive template files for subterms?

text: I have a taxonomy called "location" where I have the term "Asia" and the sub- term "Thailand". Now I created the taxonomy archive template file according to the Wordpress Codex, which is working in the following format:   * taxonomy-$taxonomy-$term.php --> taxonomy-location-Asia.php Is there a possibility to create a template file also for the subterm, as following:   * taxonomy-$taxonomy-$term-$subterm.php --> taxonomy-location-Asia-Thailand.php


title: 404 when using pagination in a category

text: I always struggle with pagination in wordpress. I really wish that was a definitive guide to wordpress rewrite rules. I have a site setup this way:   1. permalink custom structure: /%category%/%postname%/   2. I have a page named "blog"   3. I have the reading settings making the page "blog" the Posts Page.   4. I'm only using the index.php to list all posts   5. No custom queries, just the regular loop Everything works beautifully as long as I am viewing all posts. No issue with pagination here.               All posts -> domain.com/blog/ (works)     All posts page 2 -> domain.com/blog/page/2/ (works)      However as soon as click in a category, let's say "news", and try to see the next page I get a 404.               News -> domain.com/news (works)     News page 2 -> domain.com/news/page/2 (doesn't work)      Nothing atypical in the .htaccess file, and no other custom rewrite rules are present.               # BEGIN WordPress     <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L]     </IfModule>          # END WordPress      So what I am doing wrong? This is pretty standard wordpress setup. I would also appreciate if someone could point me out to some awesome guide on wordpress rewrite rules. I have read a lot about them here, but there are so many different cases, I just want to understand how it works. **Update:** I ended up doing the following: Setting the permalinks to /date/post tile/ format Setting the category base to /category/ This way pagination works for all posts and posts under a category. In my opinion it's not ideal because I can only get it to work if I have a category base, and the category base needs to be a fixed name. So now I have:               All posts -> domain.com/blog/page/2     Category posts -> domain.com/category/category_name/page/2      Pagination works in both cases.


title: Wordpress edit.php category filter to show only posts from direct category and not posts from it child category

text: On the admin edit.php page, when i filter the posts by a particular category (using the built in dropdown) it shows all the posts related to that category, and all the posts that are 'under' its child categories. How can i change this functionality, so when i filter by a category it only shows posts from that category only, no child categories posts. Will appreciate any help, as i couldnt find any info about this online. thank you.


title: How to save posts position on homepage after random function?

text: I use the following code to display a random post on a homepage:               <?php  global $query_string; query_posts($query_string . "&orderby=rand"); ?>      When the page is refresh posts positions are reversed. Is it possible to retain posts positions for a while? I want that posts positions are change once an hour.


title: Tags outside the loop

text: I want to display the tags of the posts in my main page. I used:               global $post;     the_tags();      But it's only showing up for my FIRST page.


title: Search in particular category in wordpress

text: I am currently using the JSON API to get the data from wordpress http://wordpress.org/plugins/json-api/other_notes/ The plugin helps to retrieve the wordpress post data in JSON format I notice that I can get the post within some category               http://www.test.com/?json=get_category_posts&id=9      And I can also search the post               http://www.test.com/?json=get_search_results&search=keywords      However, are there anyway to implement search within some category? Thanks Also if JSON API is not applicable , are there other approach, I have thought of using wp_query, but do I need to provide the login info if I use the WP sdk in PHP / android? Thanks


title: What are the Entry classes for?

text: I've come across a few tutorials that make reference to `entry` classes; `entry-meta` and `entry-content`. Are these classes created by Wordpress or classes I should be creating? And what are they intended for?


title: Create a Theme Option with Google Analytics

text: I'd like to create a theme options page just to put a text area so my clients can add the Google Analytics code in the WordPress panel. I have looking for this, but I can't find anything specific just for GA code.


title: Is there a plugin for messaging users as an admin?

text: Does anyone know of a simple plugin that allows an administrator to send messages to users that have accounts, and allow those same users to reply to the message. I found one here, but the problem is that it allows any user to send any user messages. Only the admin should be able to send messages. Basically the idea here is to allow the admin to send messages to customers by giving updates as far as their services. Any ideas?


title: Search child pages from a specific page parent

text: Anyone know of an easy way to alter the default WordPress search from searching ALL pages, to searching only child pages from a specific page parent? I know of the filter you can use to alter whether pages or posts are searched:               function SearchFilter($query) {     if ($query->is_search) {         $query->set('post_type', 'page');     }     return $query;     }     add_filter('pre_get_posts','SearchFilter');      Maybe there is a way to add further information here to specify a particular page parent?


title: Buddypress registration page redirection loop errors after adding if(!is_user_logged_in)

text: I'm running WordPress Multisite install with BuddyPress (WP 3.9, BP 1.9). I'm using the code below to make the main website protected from not-logged-in users, and let them to visit only the landingpage, registration and activation pages. Registration and activation pages are native BuddyPress pages.               <?php     function shield() {         if( !is_user_logged_in() ) {              if( !is_page( array( 'landingpage', 'registration', 'activation') ) ) {                 wp_redirect( 'landingpage' );                  exit();              }         }     }     add_filter('get_header','shield',1);     ?>      The code works perfectly, except that it leads to redirection loop errors on registration and activation pages. I think it's because BuddyPress has similar functions for this kind of pages for logged in users - to redirect them away from those two. How to fix it? I would like to protect part of the site, but still allow registration. PS: To prevent questions about login - it's on landingpage.


title: How to wrap posts into divs?

text:
Does anyone know how I can turn this:
              <?php query_posts('showposts=4&cat=11'); ?>         <?php if (have_posts()) : ?>                  <?php while (have_posts()) : the_post(); ?>

<a href="<?php the_permalink() ?>" rel="bookmark" title="< ?php the_title_attribute(); ?>"><?php the_title(); ?>
         <?php the_excerpt(); ?>                  <?php endwhile; ?>         <?php endif; ?>

         1         2         3         4
          Prev     Next
      Into:

Welcome to the First Slide!

We hope you enjoy the jFlow Plus Slider - a light-weight slider for your web design needs. Read More!

Hey you made it to the Second Slide!

We Know you enjoy this plugin... it's not too hard to implement, right? Read More!

Woah You're on the Third Slide

You've completed quiet the journey! All the way from slide 1 to slide 3... congratulations! Read More!

      I need to wrap each post preview in to divs so jFlow can then organise them into slides like http://dre.im/how-to-create-a-jquery-carousel-with-wordpress- posts/ Thanks,


title: jQuery AJAX form validation

text: I am trying to create a custom login page for my site, namely `http://localhost/site/login`, the problem I am running into now is that when the user tries to log in and enters the wrong username or password, they are redirected to the `wp-login.php` page, which is problematic, as you can imagine, so I would like to add AJAX form validation to my custom form, but the problem is that I am unsure of how to go about this the best way. How can I validate a user using jQuery AJAX? This is what I have thus far: jQuery:               $('#selector').live('click', function(){         $.post('http://localhost/site/wp-login.php', { action: 'login' }, function(data){             console.log(data);         });     });      I do know that this is not the proper way of going about it, it is just to give you guys an idea of what I am trying to do. What would be the best way to achieve the desired effect? Thanks in advance!


title: Custom Post Type Plugin: Where Do I Put The Template?

text: I'm writing a custom post type plugin. Part of it I'm outputting to the template via shortcodes. But other parts need a custom post template, and I figured out how to use the template hierarchy for CPT's. But the custom template is in the theme, and I'm thinking the plugin should be self- contained, at least to start with. So what's the best practice here? How do we include template files in a CPT plugin? Can you point me to especially good examples of how this is done? Thanks for your help.


title: Breadcrumbs for Single Image page

text: As we know in different post we can use some image which we uploaded. This image can be used in many post but it has only one PARENT post. My question is how to track from which post the user came from. Example Home > post 1 > img 2   Home > post 3 ? img 2 If the image has only one parent post how to find out from which post the user is coming from? Edit: I think it will be better if I send the parent post Id. To generate the url I use get_attachment_link() . Do you know how I can add additional parameter in the generated link. Because I cannot just add ?parent=14 , because of the different permalinks which Wordpress can use. Thank you


title: Custom walker nav - Add sequential number as class

text:
I'm getting to grips with the walker at the moment, but i need some assistance in getting my desired effect. My walker function looks like:               class ik_walker extends Walker_Nav_Menu{         //start of the sub menu wrap         function start_lvl(&$output, $depth) {             $output .= '
';         }         //end of the sub menu wrap         function end_lvl(&$output, $depth) {             $output .= '
                 <button id="menu" class="menu-button" type="button" role="button" aria-label="Menu Toggle">                                    </button>
';         }         //add the description to the menu item output         function start_el(&$output, $item, $depth, $args) {             global $wp_query;             $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';             $class_names = $value = '';             $classes = empty( $item->classes ) ? array() : (array) $item->classes;             $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );             $class_names = ' class="' . esc_attr( $class_names ) . '"';             $output .= $indent . '
ID . '"' . $value . $class_names .'>';             $attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';             $attributes .= ! empty( $item->target )  ? ' target="' . esc_attr( $item->target     ) .'"' : '';             $attributes .= ! empty( $item->xfn )        ? ' rel="'  . esc_attr( $item->xfn      ) .'"' : '';             $attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';             $item_output = $args->before;             $item_output .= '';             $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;             if(strlen($item->description)>2){ $item_output .= '
' . $item->description . ''; }             $item_output .= '';             $item_output .= $args->after;             $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );         }     }      What I need is for each `a` within the `li` of the nav, to have it's own class that start with `c` then a number - starting at 1.                               I then need a `span` after each a, with a class when I can specify somewhere, if possible? I know how to get the `span` in there, but I can't figure out from my searches if you can indeed set specific individual classes as I need to do things like:                     Any help would be VERY much appreciated.


title: How can I display/hide certain content based on a Theme Option field?

text: I'm building a Theme Options page for my theme, and I've managed to get most of it working fine. But now I'm trying to show and hide certain parts in my theme based on a simple check box. An example: > Show featured content slider ? - Yes - No When the user selects yes I want to enable the following code in a certain template of my theme:               <?php locate_template( array( 'includes/slider.php'), true ) ?>      So how can I wrap this code so that it only shows when Yes is clicked? I think it's some kind of conditional statement but I have now idea how to approach this. Since I can't write php I need some help with this :) The name of the option is called bpslick_featured. Thanks in advance!


title: How to edit theme functions file to modify pagination?

text: By default, when adding `<!--nextpage-->`, the following links are displayed: Pages: 1 2 I need to replace "Pages:" with a graphic arrow which links back to the previous page, and append a graphic arrow to the end of the links that links to the next page. I'm guessing there's a way to do this in the functions file?


title: Displaying Posts from Custom Post Types

text:
I'm trying to display posts from regular and custom post types :
        <?php          // the query         $the_query = new WP_Query( 'cat=-4,-142,-143,-144' ); ?>              <?php if ( $the_query->have_posts() ) : ?>                                     <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<a href="<?php the_permalink() ?>">

<?php the_post_thumbnail('homepoststhumbnail'); ?>
<?php the_title(); ?>

 <?php the_excerpt(__('(more…)')); ?><?php the_field('questions'); ?>

             <?php endwhile; ?>                                                 <?php wp_reset_postdata(); ?>                  <?php else:  ?>
<?php _e( 'Sorry, no posts matched your criteria.' ); ?>
             <?php endif; ?>


title: How to insert a writing panel between the title and the page content?

text: I want a writing panel for a custom field called 'Sub-title' and would like it to appear in its logical place in the Page editor (that is, between the title and the Page content). Is that possible? I would like to avoid having to create a custom post type, since a Page + custom fields is all I really need.


title: How to prevent further updates of custom meta when using actions to set one meta based on another

text: I'm using rilwis' Meta Box plugin (see https://github.com/rilwis/meta-box) to add custom meta boxes to a custom post type. I then want to populate one piece of meta data based on the value of another. I'm doing this using the updated_post_meta action hook using some code similar to the following:               add_action( "updated_post_meta", "my_generate_extra_meta", 10, 4 );     add_action( "added_post_meta", "my_generate_extra_meta", 10, 4 );          function my_generate_extra_meta( $meta_id, $object_id, $meta_key, $meta_value ) {         // Only do this for resources post type             if (get_post_type($object_id) == 'resource') {             // Only do this if we're saving the _my_resource_meta_1 data             if ($meta_key == '_my_resource_meta_1') {                    $new_meta = do_some_processing_of( $meta_value );                    update_post_meta( $object_id, '_my_resource_meta_2', $new_meta );             }         }     }      But this seems to happen before the _my_resource_meta_2 is saved from the data submitted. So the value I save using update_post_meta gets overwritten by the submitted value (or deleted if the meta value was empty). What I want to know is, what is the best way to prevent subsequent updates of `_my_resource_meta_2` here? The best way I've found so far is to do something like:               $_POST['_my_resource_meta_2'] = $new_meta;     $_REQUEST['_my_resource_meta_2'] = $new_meta;      at the end of the action. But this feels like a nasty hack, and I guess you still need to do the update_post_meta in case the _my_resource_meta_2 is updated first, which means you do the update twice. Can anyone think of other solutions to this problem? Is there a better way? Thanks


title: Issues with the excerpt (wordcount/HTML/images)

text: Struggling here with the excerpt and options for it.   _(NOT looking for a plugin and not extracting from the content, we add seperate excerpt content)_   We want to have an excerpt limited to a max. amount of words, using HTML code when needed and showing an image. The theme we use didn't have the excerpt option so we add following:               <?php the_excerpt(); ?>       in the template. It now shows the excerpt, but it does not limit the output. (characters nor wordcount) Our next step is to solve the length "issue", I thought I was being being smart and used this snippet in functions.php (from codex itself):               function custom_excerpt_length( $length ) {     return 50;     }     add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );      Didn't do anything, maybe I'm overlooking something?! Already feeling dumb but still going on.. So I tried following code in the template itself. (replaced `the_excerpt();` and taken out the codex function).               <?php echo wp_trim_words( get_the_excerpt() , 50, "... read more.." ); ?>      Nice seems to work eh..not as thought, this code is limiting words (as wanted) to max 50 words but stripping html code and not allowing images...argh. So my question is: What code can I use which is able to limit the excerpt (to max Ie. 50 words), allows HTML and allows me to display an image and showing the ...read more link for our excerpt. _Note: tags aint as they should be because my reputation is not high enough.._


title: Removing orphan users in WordPress Multisite

text: I've set up WP Multisite and wrote a function to daily delete all the blogs apart from one. Now when you use the wpmu_delete_blog() function the blogs are removed however their users remain, and are not associated to any site. I want to get all those users and remove them straight after deleting the blogs. All the users I create are given the role 'demouser'. How can I do this?


title: How can I convert a Custom Taxonomy to a Custom Post Type?

text: I've not been able to find any information on this - a bit of an unusual request. I've decided I'm best off creating a Custom Post Type to handle my database of Artists and Albums on my music site, currently stored as a Custom Taxonomy. There's clearly more flexibility in CPTs than Taxonomies. I'm going to use Scribu's Posts2Posts plugin to connect my current CPTs (Videos, Lyrics, Reviews etc) with the Artists and Albums CPTs. Since I have a large-ish quantity in my Artists Taxonomy including lots of meta data, I'm looking for a way to carry the data to a CPT (and corresponding Meta Fields) - too much to do by hand. Has anyone else got this issue, and has anyone got a solution? **UPDATE** : I'm writing a function that I hope will achieve what I need. I'm a bit stuck however.               function make_posts_from_taxonomy($taxonomy, $post_type) {     // Get all Taxonomy     $args = array(     'parent' => 0     );          $taxonomy = 'hhie_artists';     $post_type = 'hhie_artists';          $terms = get_terms( $taxonomy, $args);          foreach ($terms as $term) {         get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );         $id = $term->ID;         $name = $term->name; //Title         $slug = $term->slug; //Slug         $description = $term->description; //Description          $new_post = array(               'post_title' => $name,             'post_content' => $description,             'post_name' => $slug,             'post_type' => $post_type,         );         //Insert post         wp_insert_post ($new_post);              } //End foreach          } //End function      This has worked. I've been able to create the new CPT posts. Remaining issues:   1. I can't work out how to call all the metadata associated with each `$term`.   2. How can I then pass each piece of metadata into each post?


title: Hooking Into Widget Output Loop

text: When wordpress sidebar outputs any particular `registered sidebar` it loop through all widgets that assigned through it and outputs it (i guess). Is is possible to hook into the loop and add some content, say **I want to add a ad code every three widgets**. **What I have tried?** Unable to find any leads. Tried to search on wordpress source code but not sure what to search. searching `widget` or `widget loop` doesn't help.


title: Gallery - custom html for inserting images

text: I have gallery (I'm using Cleaner Gallery plugin) with many images. I want to add asynchronous image loading with jQuery (I'm using JAIL to do that). But to use this JAIL plugin I need to change gallery output (need to use data-href tag with link to image). How can I do that? I've been trying to edit cleaner- gallery.php inside my plugin directory but id does not change anything! @edit: Changing cleaner-gallery.php doesn't give wanted output. I don't know why but maybe I have to edit some function from wp-includes/media.php? Do you know what function should I overwrite?


title: Multi-Site Plugin Activated (Not Network-Activated), What Happens?

text: Hey guys. I am working on a plugin and I am trying to figure out all of the possible scenarios in which the plugin can be used. I am aware of the new Multi-Site feature. If the plugin is network activated, then it will basically be forced upon all of the blogs within that website. What happens if the plugin is just activated, but not network activated? Does this mean that **it's giving** the user the choice of enabling it? In other words: does activating the plugin mean it will appear in each blog admin's plugin list, allowing them to enable it or not? If this is true, then that means that if the plugin is _not_ activated, then it won't show up in each blog admin's plugin list, correct? So the scenarios are:   1. network activated => forced upon all users   2. activated => each user now has the option to enable it or not   3. disabled => the user won't even see it in their plugin list Is this correct? Thanks, I would really appreciate any help.


title: One comment per user per post

text: How can i disable the comment form, if the user is already submitted a comment for the specified post? I am using this now, but this is only good for 1 post / user / website.               <?php     global $current_user;     $args = array('user_id' => $current_user->ID);     $usercomment = get_comments($args);     if(count($usercomment) >= 1){         echo 'disabled';     } else {         comment_form();     }     ?>


title: Can't get metabox value (a url) returned using WPAlchemy

text: I'm using the WP Alchemy class to add custom metaboxes to templates in the admin panel and pull results from those metaboxes into the theme front-end. Here is the relevant code in content-link.php (in the loop - in Twenty Eleven Theme).               <a href="<?php display_url_info(); ?>">         Right now the link shows just the permalink instead of the url in the metabox. If I hardcode a url in there instead, the custom url shows up on the post. I've verified it being properly stored under _custom_meta in the db (and successfully implemented metabox display in other templates. Here's the value in the db:               a:1:{s:5:"links";a:1:{i:0;a:2:{s:6:"domain";s:25:"http://stackexchange.com/";s:13:"post_link_url";s:48:"http://wordpress.stackexchange.com/questions/ask";}}}      Here's my plugin file:               $basic_metabox = new WPAlchemy_MetaBox (              array (         'id' => '_custom_meta',         'title' => 'Basic Meta',         'template' => ABSPATH . 'wp-content/themes/beernews-child-theme/custom/basic-meta.php',         'types' => array('post','link')         )          );             add_filter('beernews-child-theme_post', 'display_url_info');          function display_url_info() {              // usually needed         global $basic_metabox;              // get the meta data for the current post         $basic_metabox->the_meta(); ?>              <?php if ($basic_metabox->get_the_value('post_link_url')) {              echo $basic_metabox->the_value('post_link_url');          }          }


title: Show current page featured image in sidebar

text: How do I call the current post's featured image in the sidebar? and if there is none, then a backup image?


title: How to prevent a post from being deleted?

text: For auditing issue, I only want a post can be trashed, but not deleted - for all users. So I have a plugin like               add_action('before_delete_post', function($id) {             wp_die(0);         });      But seems not all delete action are ajax, so it will be show a black screen with return an error page with result "0" Feature wise the above code is ok, but are there any better way?


title: filter custom field values $min $max

text: The user needs to query posts by entering a $minPrice, $maxPrice and a category value. Here is my query which returns no results:               function result() {              $result = array(             'cat'        => '10,17,18,13',             'meta_query' => array(                 array(                     'key' => 'filter',                     'value' => array(  $min, $max ),                     'compare' => 'BETWEEN',                     'type' => 'numeric',                 )             ),         );              // The Query         $result = new WP_Query($result);         // The Loop         while ( $result->have_posts() ) : $result->the_post();             include (ROCKABLE_INCLUDES . 'houseLandPackage-post-excerpt.php');              endwhile;         // Reset Post Data         wp_reset_postdata();     }      So problem is im not getting any results back when i use $min and $max as the meta query values. I will get the correct "min - max" results back when i use "300" and "400" however. Here is what the url looks like when the query is submitted: `http://localhost:8888/provgreen/?mode=advanced&min=3000&max=4000&s=+&cat=17&sa=Submit+Query` This thread states that the below code is needed for my query to work.: http://wordpress.org/support/topic/searching-for-posts-with-custom-data-in-a- numeric-range-price?replies=4 Any help or pointers much appreciated. Here is the code i have in search.php               <?php         $selectedCategory='';         $selectedPrice='';         $newsearch='';              $newsearch=$query_string;         $newsearch.="&posts_per_page=8";         $newsearch.="&post_type=post";              if(isset($_GET["category"]) && $_GET["category"]!='') {             $selectedCategory=$_GET["category"];             $selectedCatId = get_term_by( 'slug', $selectedCategory, 'category' );             $selectedCatId = $selectedCatId->term_id;             $newsearch.="&cat=".$selectedCatId;         }              if(isset($_GET["filter"])&& $_GET["filter"]!='') {             $selectedPrice=$_GET["filter"];             $parts = explode("-",$selectedPrice);             $min = $parts[0];             $max = $parts[1];                  mam_custom_field_range('filter',$min,$max);         }              query_posts($newsearch);     ?>      this is in function.php               // Define the function that will create the join string     function mam_custom_field_range($filter='',$min=false,$max=false) {       global $mam_global_join,$wpdb;       if ($filter && ($min !== false || $max !== false)) {         $mam_global_join =           " JOIN $wpdb->postmeta acfr_$filter ON           ( $wpdb->posts.ID = acfr_$filter.post_id             AND acfr_$filter.meta_key = '$filter'";         if ($min !== false) $mam_global_join .= " AND acfr_$filter.meta_value >= $min";         if ($max !== false) $mam_global_join .= " AND acfr_$filter.meta_value <= $max";         $mam_global_join .= ')';       }     }     // Define the join filter function     function mam_posts_join ($join) {        global $mam_global_join;        if ($mam_global_join) $join .= $mam_global_join;        return $join;     }     // Add the filter to the hooks     add_filter('posts_join','mam_posts_join');      im using `<?php wp_dropdown_categories(); ?>` and some input fields for the min, max values in form.php


title: some things in child theme css not overriding parent

text: I am writing a child theme with Blogolife as its parent. (I'm doing it on a local server, so can't show you the actual page). I have made several changes to the CSS in the child theme's "style.css" file. Up until this point, all those changes showed up fine. However, I am now trying to get rid of a quotation mark image that the parent theme uses after a blockquote. Here is how the CSS appears in the PARENT style.css:               .quote blockquote {             background: #f8f8f8 url(images/q.png) bottom right no-repeat;             font-size: 19px;             font-style: italic;             line-height: 35px;             padding: 10px 20px 20px 10px;     }            blockquote {             background: #f8f8f8 url(images/q.png) bottom right no-repeat;             font-size: 19px;             font-style: italic;             line-height: 35px;             padding: 10px 20px 20px 10px;      }      I copied these portions into the CHILD style.css, and deleted the two "background" lines, which are the only places the q.png image is called (I checked). Why does the image still show up on my page? (I'm doing the development on a local server, and yes, I saved the child's style.css file ;) ) I also refreshed the cache. When I examine the blockquote element with Chrome Developer tools, the background image still appears in the CSS. I even tried adding a new background color to the blockquote element in my child's CSS using 'background-color:', and THAT shows up, but the stupid image is still there! Why is everything else in my child's style.css overriding the parent, but the deletion of the call to the image is not? Seems kind of arbitrary. Thanks.


title: Excerpt Now Showing on the Post Page

text: I followed the excepted answer to this question (Twenty Eleven home page show only excerpt) to a tee. And it worked just like I hoped for the _main_ page. But now when I click on the blog post and go to the _post's_ page, it also only has the excerpt. How can I make this change so that the excerpt shows only on the main page, but the full blog article on the actual post's page? My blog is located at http://sqlsalt.com for reference.


title: Filter 5 latest post from the loop

text:
Recently I made a theme for my wordpress blog. Now I wanna filter(remove) my 5 latest post from the main page(index.php) and show them into slider. Now my 5 latest posts are showing in the first page and slider simultaneously :( Pleas help Thanks # Update: Thanks for your reply. I couldn't solve my problem. this is my index.php source:               <?php get_header() ?>

                 <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-right')) : else : ?>                 <?php endif; ?>

                     <?php echo get_touchcarousel(2); ?>

Latest News

                         <?php if(have_posts()) : ?>                             <?php while (have_posts()) : the_post(); ?>                                 <article id="etc" class="post<?php the_category_unlinked(' '); ?>">

                                             <a href="<?php the_permalink(); ?>">
<?php the_title(); ?>

                                         <?php the_excerpt(); ?>                                         <?php the_post_thumbnail(array(260,140), array ()); ?>

                                  <?php endwhile; ?>                         <?php endif; ?>
                     <?php if(function_exists('wp_simple_pagination')) {                         wp_simple_pagination();                     } ?>

                     <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-left')) : else : ?>                     <?php endif; ?>

         <?php get_footer(); ?>

     <?php get_footer(); ?>      Would you please help me?


title: Create a new page for each form selection

text: I have a got custom page template which displays a drop down box that has list of countries.A user selects the box and clicks sumbit.Page then then displays the relevant details for that country .IT has also displays discription which is stored in a the database. The following sql queries are used to display data.                           $id = mysql_escape_string($_GET['id']);             $row_RsInt = $wpdb->get_results("SELECT * FROM wp_num_countries",ARRAY_A);             $totalRows_RsInt = count($row_RsInt);              <form id="formITFS" name="formITFS" method="post" action="">                                     <select class="itfsDrp" id="country" name="country">                                         <?php                                         foreach($row_RsInt as $row_RsInts){                                             $selected = $_POST['country'] == $row_RsInts['countryID'] ? 'selected="selected"' : '';                                             echo '<option value="'.$row_RsInts['countryID'].'" '.$selected.'>'.$row_RsInts['country'].'</option>';                                         }                                         ?>                                                                 </select><input name="imageField2" id="imageField2" src="http://xxxxxxxx/wp-content/themes/responsive/images/rates.png" type="image">                  </form>          <?php         if($_POST['country'])             $country_id = $_POST['country'];         else             $country_id = 1;              $countryinfo = $wpdb->get_row("SELECT * FROM wp_num_countries WHERE countryID = ".$country_id);         ?>           <form action="" method="POST" name="form" id="formn">         <div id="ITFSworks">          <?php echo $countryinfo->desc; ?>      I want to create a seperate page for each country .The page will contain more text.When a user goes to this new page he gets the same layout as the custom page template. So if my perma link is France-page , i want the drop down to be pre-selected with france and info of france dispayed under and so forth.. How can i best achieve this. I am using the latest wordpress. Whats the best way to do this.


title: How to use if condition to change $table_prefix in wp_config.php

text: I am testing a very big database (perhaps `wp_posts` contains hundreds of thousands of rows). As such, the query time, especially the searching query, is extremely long. I'm thinking if there is any other way to split the WP database to multiple tables with different table prefix so that the url structure does not change compared to the original database. I tried changing `$table_prefix` in `wp_config` to `wpa_`, then i created a sample posts with post name start with `a`. Then i changed `$table_prefix` in `wp_config` to `wpb_`, then i created a sample posts with post name start with `b`. In the next step, i replace the `$table_prefix` line with               // if query for post start with a, it will go to wpa_ tables,     // if query for post start with b, it will go to wpb_ tables     $prefix = get_the_title();           if ($prefix(0) !== 'a') {              $table_prefix  = 'wpb_';          } else {              $table_prefix  = 'wpa_';          }      When i tried openning my domain, i got the error `Fatal error: Call to undefined function get_the_title() in /home/todaytra/public_html/1/wp- config.php on line 62` I really need to perform this task, usual WPMU installation generates either subdomains or subfolders and it changes the permalink structure of all posts. I tried searching a lot but cannot find any information about this.


title: Wordpress query portfolio posts

text: On my template I have this code               <div class="blog_block">              <?php wp_reset_postdata();  ?>         <?php $nbmax= 9; ?>         <?php $tarali_query = new WP_Query('posts_per_page='.$nbmax.'&ignore_sticky_posts=1&paged='.$paged); ?>         <?php while ($tarali_query -> have_posts()) : $tarali_query -> the_post(); ?>             <?php get_template_part( 'content-blog', get_post_format() );   ?>                                                       <?php endwhile; ?>         <?php tarali_paging_nav(); ?>             </div><!-- blog_block -->      Which render **ALL** recent posts of my blog. How can I modify this code to query ONLY the posts which belongs to **Portfolio Category**?


title: Where is the template from the_post_thumbnail()?

text: My content.php is used both for my front page than for my single posts. The problem is that it calls the thumbnail with "the_post_thumbnail()" and the thumbnail returns with a particular width and height (`<img width="308" height="208"...`. I need to change get a different width and height depending if is_single(). Where is the template for the thumbnail or how can I archive this?


title: Change image url size in post editor (when cliking on image)

text: So I've search during some hours how to change image size in existing post. I know that wordpress create many image with different size (acording to my theme) for each uploaded image. But he didn't create it for old image that was existing and used before the theme change. So old image didn't have many size. I've used Regenerate thumbnails to recreate it. So far so good. New post automatically display size options when uploading new image before inserting in the post. But old post didn't have changed (automatically) the image url to the large size, they still have the original size. And there are no options when opening image (by double clicking on it in the post) to change the image url/size. Do you know a way to have the same option to choose the image size when editing and not only inserting ? or anything ? There is a way to select the desired image url and edit the source url for each image but it's quiet long...


title: adding custom stylesheet to wp-admin

text: im having troubles getting my custom stylesheet work on WP-ADMIN area. `plugins_url('style.css', __FILE__) );` do i have to create folder in my plugins named css or do i just copy my `.css` to the `wp-admin/css` directory? i tried both it doesnt seem to work for me. and what values should be replaced to `__FILE__`? sorry im kinda new to these stuff.               /*ADDS STYLESHEET ON WP-ADMIN*/     add_action( 'admin_enqueue_scripts', 'safely_add_stylesheet_to_admin' );         function safely_add_stylesheet_to_admin() {             wp_enqueue_style( 'prefix-style', plugins_url('style.css', __FILE__) );         }               /*ADDS MY CUSTOM NAVIGATION BAR ON WP-ADMIN*/     add_action('admin_head', 'custom_nav');     function custom_nav(){         include('custom_nav.html');          }


title: Posts and Taxonomies structure

text: I am stuck on geo logic structure while making tourism site information structure.   Having example Countries->Resorts/Visa_rules/Flight_rules->Cities/Excursions->Regions->Hotels all of the mentioned should be custom posts type or pages because all of them have own description with long text and a lot of photos. But same time previous level is a taxonomy for children. Also if I act Country as Post how can I connect other articles/news under it as it is not category? How to organize this map correctly? Positive moment is that I can link one taxonomy to different post types. But is it possible to have separate page to describe taxonomy itself?


title: ajax jquery update custom field meta value front end

text: There is probably a much easier way to do this. After much trial and error trying to get a postid from a url, I've opted to add the id to the permalink. However I have no idea how the custom value should be updated without a page refresh. Jquery               $(document).ready(function(){          $("a").addClass("external");          $("a").attr( "target", "_blank" );      });          jQuery(document).ready(function($) {     $('.external').click(function(event) {           // had to add the post id to the permalink in loop as url to postid didn't work           var currentID = $(this).attr('id');            var data = {             action: 'my_action',             whatever: currentID         };         // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php         jQuery.post(ajaxurl, data, function(response) {                //update the custom field value without a page refresh         });         });     });      functions.php               add_action('wp_ajax_my_action', 'my_action_callback');          function my_action_callback() {         global $wpdb; // this is how you get access to the database            $whatever = intval( $_POST['whatever'] );            // get number of views if we have any            $views = get_post_meta($whatever, views, true);             // update or add post meta     if(!update_post_meta($whatever, 'views', ($views+1))) {                 add_post_meta($whatever, 'views', 1, true);             }         die(); // this is required to return a proper result     }      content.php               <a href="<?php the_permalink(); ?>" id="<?php the_ID(); ?>"><?php the_title(); ?>         <?php echo get_post_meta($post->ID, 'views', true) ?>         // update the view ?


title: Error when updating plugins by FTP "Unable to locate WordPress Content directory (wp-content)."

text: I run apache2 on Ubuntu, i'm sure there is a configuration or permission problem causing this. When I attempt to update plugins through the admin control panel, after I enter the FTP login/pass and click Proceed. I get the error "Unable to locate WordPress Content directory (wp-content)." And wp-content does exist and have proper permissions from the default install.


title: How to hide the Text Area in the Post Edit screen

text: Is there a way to hide the text area box in my custom post edit screen? All entry is done through taxonomy check boxes and a couple custom fields. I want no entry in the text area. As an alternative, how can I place a "Enter Nothing Here" text message within the text area? I know this is a little bizarre, but is it possible? Thanks -- Mike


title: How to use a custom field for search engine optimization

text: My posts (not custom) have a custom field - this has very important information. Can I use this information to submit to search engines. Note: This is something like a product site and has many posts. I am looking for an automated way to do this.


title: Can't seem to see images on my machine but can on the server

text: Hello I just started using wordpress (complete noob) but I need a bit of help. I have installed wordpress and on a linux/centos webserver and this works fine. However when I use another machine, open a web browser, type in the url, the site looks different from what it looks like on my server. (On my web server, there is a choice to use the Graphical user interface as well) The difference is the images don't appear on my machine (Looks like it can't find the media files). Also when I click on any link (the 'Hello world', login etc.), it says Firefox can't establish a connection to the server at localhost. I can see the images on the webserver and all links are fine. So I don't now what the problem Just to let you know my wordpress url is localhost and my site url is also localhost if that may help.


title: How to get the post publish date outside the loop?

text: I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date. Here is my code:                global $wpdb;          $post_ids = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_status ='publish'" );          foreach($post_ids as $id){                $postdate = get_the_date("Y-m-d",$id ); //here is what I can figure out            .......           ......etc     }      When I echo the $postdate, it come out with a wrong date. Not the date that exist in the wp_posts table. How can I get the date properly?


title: add_image_size() zoom-crop

text: I've set up a bunch of additional image sizes in my functions.php theme file, with the crop parameter set to true. However, the images are resized but not cropped.                   if (function_exists('add_image_size')) {             add_image_size('frontpage_a-la-une_thumb', 400, 215, true);             add_image_size('single_thumb', 320, 9999, false);             add_image_size('category_a-la-une_thumb', 280, 215, true);                  add_image_size('xxs-square-thumb', 60, 60, true);             add_image_size('xs-square-thumb', 70, 70, true);             add_image_size('s-square-thumb', 98, 98, true);             add_image_size('square-thumb', 130, 130, true);             add_image_size('l-square-thumb', 198, 198, true);                  add_image_size('landscape-thumb', 150, 98, true);             add_image_size('portrait-thumb', 98, 145, true);         }      The GD library is installed, so is imageMagick, but no dice. What am i missing? UPDATE: Problem arises with images that are smaller than the set image size: i was expecting WP to create image versions by scaling them up, but it doesn't. So, my bad, sorry for getting that point wrong.


title: Getting page ID inside loop

text: I have a page template which has a loop to show blog posts. Inside the loop, there is `get_template_part('content', 'custom')` function to include the template (content-custom.php) which shows blog post content. Is it possible to get current page ID inside `content-custom.php` file?


title: My post titles is getting mashed up with my blog title

text: I installed the all in one seo pack plugin and after enabling it my post titles get "stuck" with my blog title without a space in the title. As you can see the post title is: `******.blogg.no` And my blog title is: `Sp**set Blogg` The title is now `*******.blogg.noSp**set Blogg,` I can't figure out how I can get these to separated. My all in one seo pack settings is`%post_title%` on the posts.


title: How do i remove all Bit.ly shortened links from site?

text: Bit.ly have black listed one site which i linked to which produces a warning. I have removed this link but want to remove all links which i have shortened using Bit.ly Is this possible?


title: Is sanitize_title enough to generate post slugs?

text: I want to generate slug for some strings without going through WordPress slug generation flow. Therefore, I want to know which functions it calls to get a neat slug. I tried sanitize_title() but it leaves %c2 %a0 in result.


title: Custom Meta Box calling JS function twice

text: I have a plugin adding a custom meta box to the comments editing page:               function on_admin_init() {     add_meta_box(      'commentrating',     __( 'Voto recensione', FB_DT_TEXTDOMAIN ),     array( &$this, 'meta_box_voto' ),     'comment', 'normal', 'high'     );     }     function meta_box_voto($data) {     ...     ?>     <script>     jQuery(document).ready(function() {              alert("ah!");            });     </script>     <?php     } ...      But the alert is called twice! Is this a WP or jQuery bug? Am I making any mistake? Thanks! P.S. If I put the alert into the first function it is only called once...


title: How to enable automatic search results in WordPress

text: I'm trying to find way to enable automatic search in WP. For example, I have a page `mysite.com/some-thing`. Within that webpage, I also want to display the content of the page `mysite.com/?=some+thing`. I don't want to use an `iframe` because I want the content of the second page (the search page) to be in the HTML source code of the first page. Is this possible to achieve? I'm thinking about using WP web scraper plugin, but it is difficult to implement the selector :-( Does anyone have any advice?


title: If meta_key has value = 6 | Change the wp_posts.post_date to current date

text: I have three sections: 1-New posts 2-Trending posts 3-Hot Posts I'm using a Vote plugin and i sort every section like this: New Posts:               $args = array(       'meta_query'=> array(         array(           'key' => '_wti_like_count',           'compare' => '<=',           'value' => 5,           'type' => 'numeric',       'posts_per_page' => 5     ) ) );     query_posts( $args );      * * * The result of this is: > SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts JOIN wp_postmeta ON > (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND wp_posts.post_type = > 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = > 'private') AND wp_postmeta.meta_key = '_wti_like_count' AND > wp_postmeta.meta_value <= '5' GROUP BY wp_posts.ID ORDER BY > wp_posts.post_date DESC LIMIT 0, 100 On this section only the posts from 0 to 5 Votes are displaying. Once it Reach 6 Votes .. It goes to the Trending section ->               $args = array(       'meta_query'=> array(         array(           'key' => '_wti_like_count',           'compare' => '>=',           'value' => 5,           'type' => 'numeric',       'posts_per_page' => 5     ) ) );     query_posts( $args );      * * * Where posts between 5 or more... are displaying an so on... My problem its that i ORDER them BY wp_posts.post_date and once an old posts get more votes than a new one it goes from News Posts to Trending Posts but it doesn't display on TOP of the Section... It goes below.. I wan't to be able to do something like this..               $args = array(       'meta_query'=> array(         array(           'key' => '_wti_like_count',           'compare' => '<=',           'value' => 5,           'type' => 'numeric',       'posts_per_page' => 5     ) ) );     query_posts( $args );      when it reach to 6 votes... I want to be able to update the wp_posts.post_date to current so like that every time an old post receive more than 5 votes .. it shows first in the trending section... not below something like _if 'value' = 6 update wp_posts.post_date to current_?


title: When I click on Add Product in woocommerce plugin, I get a blank white page

text: I just installed the woocommerce plugin into wordpress. When I click add product in the admin, nothing loads. It is a blank white page. Wordpress version is 3.4.2. Do I need to upgrade wordpress? This function works on another domain running the same theme and same version of wordpress.


title: Paging doesn't work?

text: I have my own custom post type, and 15 items there. This code shows all the items:               <?php   $loop = new WP_Query( array( 'post_type' => 'my_post_type', 'posts_per_page' => 15 ) );       while ( $loop->have_posts() ) : $loop->the_post(); ?>     (...)      When I change posts_per_page to "5" there should be 3 pages, but it displays only 5 items and there are no other pages (or at least I don't know how to access them). This code displays nothing:               <?php if (  $wp_query->max_num_pages > 1 ) : ?>       {menu or any html code}     <?php endif; ?>      Maybe I do something wrong? I have the whole code/loop in page-myposttype.php file. I've tried this code:                  $temp = $wp_query;         $loop= null;         $paged = get_query_var('paged') ? get_query_var('paged') : 1;         $loop = new WP_Query( array(          'post_type' => 'my_post_type',            'paged' => $paged,          'posts_per_page' => 2 ) );             while ( $loop->have_posts() ) : $loop->the_post(); ?>      But no luck... When I type wordpress/my_post_type/page/2 (page/3 etc.) manually I see other pages and they work & look fine. But I'm unable to echo the default navi... :(


title: Why would it take four reset password attempts to finally get the e-mail?

text: Following up from Locked out of my own blog and password reset not working: After posting the question I decided to give the password reset route one last try and this time the e-mail did come through and I was able to get back into the blog. It took me a total of four attempts to reset the password before it finally worked. Given that the first three e-mails were apparently sent but didn't arrive and the last one arrived very quickly, what should I be looking for in my set up that would cause this feature not to work? Or is this just a feature of e-mail that I must live with? There's been no indication that the e-mails were bounced by my ISP or that they've been marked as spam. My ISP is also my web host and domain name registrar. I'm still running Wordpress 2.9.2 (as I said before it's a very infrequently updated blog and the next task is to upgrade to 3.0.4), but I do remember having this problem before with previous versions.


title: Anonymous Postings

text: This is a repost of a question asked on stackoverflow, and was referred to this site: My client wants to create a form on his new WP site that when filled out and submitted will be submitted to his admin post queue to approve and if he approves gets posted on his site in the "blog" (which is actually a bunch of guitar like tabs). The form would be custom and have custom fields. Below is the form, but in the old design before I did a refresh on it. So, how hard would this be? He does not want it in the WP admin panel which i began to do, but outside in a page like /contribute ![](http://i.stack.imgur.com/LKgdM.png)


title: Listing all slugs?

text: I have a number of slugs and items in my custom category: SLUG - number video - 5 items music - 5 items [no-slug] - 5 items empty - 0 items blabla - 0 items I want to list all non-empty slugs (otpionally with number of items next to them), like: [ video (5) ] [ music (5) ] [ other (5) ] (empty and blabla omitted) Anyone knows how to do that? All I know is how to get a slug for particular item:               <?php $slug = $terms[0]->slug; ?>      ## UPDATE My taxonomy registration: ### functions.php               register_taxonomy("op", array("portfolio"), array(       "hierarchical" => true,        "label" => "Categories",        "singular_label" => "Category",         "rewrite" => true,     ));      ### page-portfolio.php               $taxonomy = "op";     function get_taxonomy_list_html($taxonomy) {       $term_links = array();       foreach(get_terms('Category') as $term) {         if (!empty($term->slug) && $term->count>0) {           $link = get_term_link($term,$taxonomy);           $term_links[] = "[ {$term->name} ({$term->count}) ]";         }       }       return implode(' ',$term_links);     }      Displays nothing :(


title: Locked out of my own blog and password reset not working

text: I have my own Wordpress installation for my infrequently updated blog. I have a habit of forgetting my password so have to request a new one and reset it every two to three months. I've done it again today and got the "Password Reset" e-mail (which arrives within seconds of requesting it). Following the link to actually reset the password gives me the "Check your e-mail for your new password." page but that e-mail never arrives. I've checked my spam folder and there's nothing in that. What's the quickest way of resetting my password and getting back into my blog? Do I have to go via the database? If so what do I need to reset there? I should add that the blog hasn't been hacked - I've checked the pages and they're all OK. No spurious links or content vandalised.


title: TinyMCE custom stylesheets for different post types

text: I use a custom stylesheet for TinyMCE, by placing custom styles in `editor- style.css` in my theme's directory. I am trying to figure out how to use a different stylesheet depending on what post type we are editing. One way of getting different styles in TinyMCE is to toggle a class in the TinyMCE iFrame's `<body>` tag. I have seen this in the New York Times' ICE editor plugin, a javascript version of Microsoft Word's "track changes" functionality that can be used with TinyMCE. That's how it toggles visibility of edits without changing the post's HTML. Here's a self-contained example of this:               var toggleBodyClass = function() {              var ed = tinyMCE.activeEditor;         var body = ed.getBody()         var cm = ed.controlManager;              if(ed.dom.hasClass(body,'code-view')) {             ed.dom.removeClass(body, 'myCustomClass');         } else {             ed.dom.addClass(body, 'myCustomClass');         }              ed.execCommand('mceRepaint');     }      This doesn't allow me to use a separate stylesheet per se, but I can use `.myCustomClass` to create alternate all the alternate styles I want in `editor-style.css`. The thing is, I'm not sure how I could set up something like this to be conditional on post type. Is there something I can add to `functions.php` to achieve this?


title: Get sidebar parameters (before_widget, before_title, etc.) from within a widget

text:
Is it possible to dynamically get sidebar parameters from within a widget? That is, I am trying to access the `before_widget`/`after_widget`/`before_title`/`after_title`/`name` parameters of the containing sidebar. Suppose we have a sidebar registered like so:               register_sidebar( array(         'name' => "Homepage Sidebar",         'id' => 'homepage-sidebar',         'before_widget' => '
',         'after_widget' => '
',         'before_title' => '
',         'after_title' => '
',     ) );      How would I access those values from inside my widget's `widget()` function? Like, how would I do something like this:               public function widget( $args, $instance ) {         // outputs the content of the widget         if ($someCondition)             echo $sidebar->before_title . 'My widget title' . $sidebar->before_title;         echo 'You are looking at ' . $sidebar->name;     }      Is this possible?


title: Front end post editing using a form

text: I have a custom-post type with the standard meta boxes and some custom fields. How could I edit a post through a form in the frontend?


title: Possible to combine two custom post types?

text: I have a Roster page which contains two sections. The first section contains the artist with their pictures, short bios, and website links; and the second section contains the combined videos of every artist in the roster. Similar to this: ![roster](http://i.stack.imgur.com/X9tER.jpg) Normally, I'd create two separate post types; one for 'artist' and another for 'artist videos' but I was wondering if there was a way I can somehow combine the two? So in the admin panel, it would look something like this: ![admin](http://i.stack.imgur.com/DRVf5.jpg) If possible, how would I go about doing this? Or am I over-thinking this (as I often do) and is there an easier way?


title: Count how many posts have a custom field set

text: I've added some code to my templates which automatically adds custom fields to cache some data that each post pulls in. Is there a way that I can track how many posts have had this custom field set?


title: Problem with running javascript in a shortcode

text: I am trying to create this plugin for my site that will allow create short codes to pull data from the iTunes Search SDK. I already have the iTunes Search SDK javascript plugin working that pulls the data from the search SDK but I am running into an issue with placing the required javascript into the shortcode. The code I have looks like this:               <?php     add_action('init', 'peb_init');          function peb_init() {         add_action('admin_head', 'peb_admin_head');     }          function peb_admin_head() {         echo '<script type="text/javascript">';         require_once('https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.js');         require_once('js.php');         echo '</script>';     }               add_filter('widget_text', 'do_shortcode');          add_shortcode('appPrice', 'appPrice');     function appPrice($atts)      {         $atts = shortcode_atts(             array(                 'id' => '',                 'class' => '',                 'container' => ''         ), $atts);         return '              <script type="text/javascript">         $(document).ready(function() {             var url = 'iLookup.php';                      query = $id;                      $.getJSON(url, {id:query}, function(json) {                 $('#results').html('Price: '+json.results[0].price+'<br/>');                 });              });     </script>              ';               }      If anyone has any ideas as to why this doesn't work I would be very appreciative. If there is not enough info given I will be glad to provide more. NOTE: There is no error message it just doesn't work. I have tried using the console log and it still doesn't work. The rest of the plugin works fine with the exception of the script.


title: How to change a user's password programatically

text: I am trying to create a totally different profile page (not the one provided by Wordpress), since the layout and feel of the default profile page is too "Wordpress" for the users. Now I am successful in being able to present a page that can modify user meta data like firstname, lastname, city, zip code, etc. Now what stumped me is changing the password of the user. Is there any built- in wordpress function, say change_user_password($user_id, $new_password)? I'm surprised that I can't look for anything that does this. Worse comes to worst I'm doing an `UPDATE wp_users SET user_pass = md5($new_password) WHERE ID = $user_id`, but I would be really amazed if there is no function for this one.


title: Adding metadata to user generated taxonomy terms

text: I need to add some data to _user generated_ custom taxonomy terms and expose the settings to the user. I planned to use dynamically generated **submenu pages** , **tabbed navigation** or **sections** to create a logical division per term. However, as you probably know, there's no _core_ way of passing arguments into _add_menu_page_ , _add_submenu_page_ and _add_settings_section_ so I can't generate them. Managing text fields was easy:   * I generated terms using _get_taxonomies_ and looping trough them adding fields   * added some HTML to make this handful of fields look like they were _divided into sections_ ,   * saved them into options as an array with respectively named keys for easy access from inside the theme So far, so good. But I need to add images and having only **one form** to send multiple images forces me to use _name=array[]_ attribute. It makes them loose their connection to _the term_ and renders them useless inside a loop. Am I missing something (besides years of WP Plugin development experience)? RtL


title: Need small coding with Custom Fields Search

text: WP Custom Fields Search is a great plugin but I've a problem regarding the plugin returning results using the homepage. When I click the submit button, results are shown on the homepage instead of the search.php page! Searching on the web, I've read that the plugin should output search results on the search page template or, if search.php is missing, on the homepage. My theme has search.php but the plugin is not using it: **I need to force the plugin to output search results in the search results page**. Looked at the plugin's code and quite sure that some code should be changed in the “extra_search_fields.php” file but I'm not sure where and how to force the results to output on the search template instead of the homepage. Guess that at about line 230 is where to hack the code:               function renderWidget($params=array(),$p2 = array()){         $title = $this->getTitle($params);         $inputs = $this->getInputs($params);         $hidden = "<input type='hidden' name='search-class' value='".$this->getPostIdentifier()."'/><input type='hidden' name='widget_number' value='".$p2['number']."'/>";         $formCssClass = 'custom_search widget custom_search_'.$this->nameAsId();         $formAction = get_option('home');         if(function_exists('locate_template'))             $formTemplate = locate_template(array('wp-custom-fields-search-form.php'));         if(!$formTemplate) $formTemplate = dirname(__FILE__).'/templates/wp-custom-fields-search-form.php';              foreach($inputs as $k=>$v){             if($v->isHidden()){                 $hidden.=$v->getInput(false);                 unset($inputs[$k]);             }         }         include($formTemplate);     }          function isPosted(){         return $_GET['search-class'] == $this->getPostIdentifier();     }     function getPostIdentifier(){         return get_class($this).'-'.$this->id;     }     function isHome($isHome){         return $isHome && !$this->isPosted();     }     function rewriteHome($homeTemplate){         if($this->isPosted()) return get_query_template('search');         return $homeTemplate;     }      Can someone please help me?


title: Image media upload problem in page editing modus?

text: I can't figure this out, uploading an image when i am editing or adding a page doesn't work correctly. During upload i get a http error. Debugging shows async-upload.php gives a 500. The funny thing is the image is uploaded. When i refresh the page and hit "add media" i can see the image in the library, but without the important "meta" data as ATTACHMENT DISPLAY SETTINGS >> size. And i notice size should be defined for the gallery to work properly. How can i fix this?


title: Are there any plugins yet that support Facebook Like, Google +1 and allow Social Interaction tracking on Google Analytics

text: I know that Google +1 is quite new (at time of writing), but I wondered if there were any plugins that support these. By "Social Interaction tracking on Google Analytics" I mean - that use this code - http://code.google.com/apis/analytics/docs/tracking/gaTrackingSocial.html?utm_source=helpCenter&utm_medium=helpCenter&utm_campaign=social&utm_content=socialPluginTracking The alternative is to find a plugin that supports the first two and add my own analytics, but I wondered if someone had done it already.


title: How do i schedule cron in wordpress for each second?

text: I want to schedule a cron job in Wp3.5.1 to sending email to those customer whose appointment is pending. here some code am trying: **For the testing am scheduling corn for each second to insert row in table.**               // insert row every second     add_action('wp', 'my_activation');     function my_activation() {         if ( !wp_next_scheduled( 'my_event' ) ) {             wp_schedule_event( time(), 'hourly', 'my_event');         }     }          add_action('my_event', 'do_this_event');     function do_this_event() {         global $wpdb;         $wpdb->query("INSERT INTO `wordpress-testing`.`wp_test` (`id`, `text`) VALUES (NULL, 'b');");     }          wp_get_schedules('my_event');          //custom recurrence     add_filter( 'cron_schedules', 'cron_add_every_sec' );     function cron_add_every_sec( $schedules ) {         $schedules['hourly'] = array(             'interval' => 1,             'display' => __( 'Do Secondly' )         );         return $schedules;     }      May am going wrong to do this. So please help me through. **Is cron run automatically after activation once OR its need to recurring visit after scheduled time past?**


title: Exclude a custom category from a list

text:
I have some code that is generating a list of custom categories for a custom post type. This is the code:                   $html .=    '

view more:
';         $k = 0;         foreach ( $terms as $term )         {             $terms = get_the_terms( $post->ID, $taxonomy );             $k++;             if ($term->name != "") $html .= '
slug . '" class="' . $term->slug . '">' . $term->name . '
';         }              $html .= '
';      Any idea how I might go about tweaking this to exclude specific custom categories from the list? I'm thinking I need a line before the foreach to tell it to skip certain category ID's? Many thanks, Paul


title: Count widgets in position and set class

text:
(Please be gentle, I'm transitioning from Joomla development.) I am using Twitter Bootstrap for this client and I would like the "bottom" widget position to work "automatically" for my client as I am used to in Joomla where if there are 2 modules published in a position, then the appropriate classes will be added on each div to make multiple columns. (Ex: each module would be wrapped in a ".col-md-6", if there are three, then there will be 3 columns because the module would be wrapped in ".col-md-4" etc.) I see that I could make a bottom1, bottom2, and bottom3 position and do it that way, but it adds extra confusion for my client. Especially, when I need to have a lot of these positions. I know Wordpress must be able to do this, but I can't seem to figure it out. (I would use Joomla! but they would like to have a blog for their website and need a custom content types as well.) Any help would be appreciated. Below are the "bits" I have gathered but aren't making sense how to put them all together. Thank you. I have this function to register my widget in **functions.php** :               function my_widgets_init() {         register_sidebar( array(             'name' => 'bottom',             'id' => 'bottom',             'before_widget' => '
',             'after_widget' => '
',             'before_title' => '
',             'after_title' => '
',         ));     }     add_action( 'widgets_init', 'my_widgets_init' );      and this function that does the calculation (found this on Stack Overflow) in **functions.php** :               function count_sidebar_widgets( $sidebar_id, $echo = true ) {         $num_widgets = wp_get_sidebars_widgets();         if( !isset( $num_widgets[$sidebar_id] ) )             return __( 'Invalid sidebar ID' );         if( $echo )             echo count( $num_widgets[$sidebar_id] );         else             return count( $num_widgets[$sidebar_id] );     }      My html that displays the widget in **index.php** :               <?php if( is_active_sidebar('bottom') ) { ?>
             <?php dynamic_sidebar('bottom'); ?>             <?php count_sidebar_widgets( 'bottom' ); ?>
     <?php } ?>      Thank you for your time and attention.


title: Display Referring Category on single post?

text: My site is built in such a way that every single post (in a custom post type) is accessed via a category archive (custom taxonomy). Every post may have more than one category assigned, but I want to display only the category from the archive that came previously. Lets say post "Bob Brooks" is assigned cat apple, banana and carrot. I browse to site.com/category/carrot/ and click on the result "Bob Brooks". on site.com/bob-brooks/, I want it to show "carrot" in a subheader on the template, but not the other categories. And I obviously want it to show the correct cat dynamically. How do I do that?


title: Change Wordpress url for newly formed posts or pages

text: We have website which uses wordpress and have around 2000 posts. The format for url we choose was http://www.abc.com/xyz/post-title but not we want to change it to http://www.abc.com/abc/post-id/post-title something like stack stackexchange, but since we do have a decent google juice for the existing urls we don't want to loose that. I know some people told me we can use Permanent redirect and the juice will flow with it. but i am not very confident on that. Is there a way we can customize wordpress so all future posts follow the new url pattern and past pages remains the same. Any solutions to this is greatly appreciated.


title: Trying to regain access to a wordpress based website

text: My Dad has a website based on wordpress, he went into the wordpress dashboard and modified the home page incorrectly appending an extra level to it, then when he exited it made changes resulting in website being messed up and more importantly the login to wordpress has disappeared not allowing him to change it back. I manually fixed the url to display the wordpress dashboard login, yet even when login it doesnt work, it takes be back to the wrong page. I don't currently have access to the wordpress database but I do have access to the files generated from the database so my plan was to edit the correct file to set the home page path back to what it should be, hoping that will then allow me to get into Wordpress dashboard. But I have very little knowledge of Wordpress, anyone help me here please.


title: How to get excerpt of the recent posts

text:
Right now, i am using code below to show title and its link of recent posts from my custom post category, but for one of my category i want to show excerpt, how can i achieve that. CODE i am using to display title:               <?php         $recent_posts = wp_get_recent_posts(array('post_type'=>'jokes'));         foreach( $recent_posts as $recent ){             echo '
' .   $recent["post_title"].'
 ';         }     ?>


title: How to disable the main wordpress stylesheet and enable another one

text: I'm trying to disable the main stylesheet of my site using a plugin to replace `style.css` with `style_pink.css` or `style_blue.css` So if an user clicks on `pink button` the `style_pink.css` should be activated and `style.css` should be deactivated and so on. I'm trying to use `wp_deregister_style( $handle )`. Please suggest an appropriate handle and a way to achieve this.


title: Advanced Custom Fields - disable radio buttons checked before

text: and at the beginning my apologizes for my language skills On my webpage, i created Taxonomy field with single available value (radio buttons) and related with pages. For example when i'm creating a new page( or editing existing one ) i've got list simillar like below   * Category 1      * Subcategory 1     * Subcategory 2   * Category 2 And now my question: is it possible that block( disable ) somehow checked earlier categories ( and subcategories ), to block possibility of choosing two the sames categories ? Thank you in advance! Update: I just wrote checkbox instead of radio buttons, sorry for mistake.


title: Add filter on certain thumbnail sizes only

text: How to run this filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium' ....               add_filter( 'wp_get_attachment_image_attributes', 'wpse8170_add_lazyload_to_attachment_image', 10, 2 );     function wpse8170_add_lazyload_to_attachment_image( $attr, $attachment ) {     $attr['data-original'] = $attr['src'];     $attr['src'] = 'grey.gif';     return $attr;     }      Thanks


title: change the post time on multiple posts

text: I have about 60 posts queued and ready to post on specific dates, but I forgot to set the post time. I really don't want a bunch of posts posting at 3AM, so I need to change the times on all these posts. Is there any way to do this, programmatically or with a plugin?


title: How to change the thumbnail size to a specific category?

text: I am using thumbnail on my blog posts. I added the following code in my **functions.php** for that purpose               add_theme_support('post-thumbnails');       set_post_thumbnail_size( 328, 228, true );       It's working fine and all thumbnails are **328 x 228** Now I want to change the thumbnail size only for a specific category **ID is 9.** Post under category ID 9's thumbnails must be **100 x 150.** how can I do that?


title: cat_is_ancestor_of() for custom taxonomies

text: I'm trying to use cat_is_ancestor_of() for custom taxonomy categories but it's not working. Is there any other way to check if a category is child of another?


title: How can I query all post with currrent taxonomy term?

text: I created the taxonomy 'machine types', and added several terms to it, like 'cranes' for example. The url to that term now looks like this: domain.com/machine-types/cranes How can I make this url query for only posts with the term cranes? And the same for all other terms, without creating a template for each term. I think I must ask for the current term and store it in a value, and query for that, right? How?


title: Get all pages to display at once

text: I'm doing a theme that is supposed to be ease to create, but I have now reached a standstill and need to get past this. Is there a way to display/show all pages at once? Or can I create a custom query to display all the pages with templates and not only the content? ## Something like this:               -------------     | 1 | 2 | 3 |     -------------      Number represents the page which is shown in fullscreen mode and when the pagelink is clicked we slide to the page.


title: Can we create a child theme for a premium child theme built on Genesis framework?

text: I have a child theme from Genesis framework. How can I create a child theme of it. Actually I need to do some changes, so if I'm changing in my child theme, then if any future updates comes I can not update. Is there any way?


title: Cancel post save

text: I need to abort the post saving process when the post content contains a specific string and then display a message to the user. I found a method to display the message but didn't find a way to refuse post saving. So far here's what i've done                add_action( "pre_post_update", "checkPost");      function checkPost($post_ID) {           $post = get_post($post_ID);                $postContent = $post->post_content;                if ( wp_is_post_revision( $post_ID  ) )                return;                if(preg_match("/bad string/", $postContent) == 1) {                     //                // cancel post save                //                     // then                add_filter("redirect_post_location", "my_redirect_post_location_filter", 99);           }      }           function my_redirect_post_location_filter($location) {           remove_filter('redirect_post_location', __FUNCTION__, 99);           $location = add_query_arg('message', 99, $location);           return $location;      }           add_filter('post_updated_messages', 'my_post_updated_messages_filter');      function my_post_updated_messages_filter($messages) {           $messages['post'][99] = 'Publish not allowed';           return $messages;      }


title: PHP Notice error (when on 404 page)

text:
I have a `404.php` template for my theme. I also have `WP_DEBUG` in wp- config.php set to `TRUE`. Consider this 404 template:               get_header(); ?>
         <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
             Whatever.

          <?php get_footer(); ?>      I get the following error: **Notice** : Trying to get property of non-object in **.../path/post- template.php** on line **30** Now I know the error is caused by the call to `the_ID()` on line 4. And the easiest solution would be for me to just remove it in the template. However, there are places in other template parts, `header.php` for instance, that either calls the same function or uses `$post->ID`. An example would be `$project_meta = get_post_meta($post->ID, 'show_project_meta', true);`. This is shared and works fine in any other template, i.e where the page has a post/page ID. What can I do for the 404 page? Is there a way to fix this? Thanks.


title: How to troubleshoot 404s in Wordpress admin

text: There are several threads on Wordpress.org about this problem, but none with solutions. I just went from localhost (MAMP) to a live server (Dreamhost) and I'm getting constant 404s when submitting actions (such as changing a title) or trying to load pages in the admin (such as post/page/cpt lists). The problem is WP is running up against memory limits (see support message below). What is the best systematic way to evaluate/troubleshoot memory use in the WP admin? Plugins tend to be implicated in this sort of problem; are there any other usual suspects?               `I've checked into why you've     been receiving these 404 errors, and it seems your scripts have been     getting automatically killed by our Process Watcher script due to your     site(s) going over Memory limits on the shared server.          2011-07-08 08:53:59 procwatch2 INFO: Process(pid=12921, name='php5.cgi',     uid=_, tty=None, cpu=17.5, rss=155764.0, vsize=264456.0): kill     for total RAM     2011-07-08 08:54:19 procwatch2 INFO: Process(pid=13248, name='php5.cgi',     uid=_, tty=None, cpu=29.8, rss=197348.0, vsize=305212.0): kill     for total RAM     2011-07-08 08:54:40 procwatch2 INFO: Process(pid=13253, name='php5.cgi',     uid=_, tty=None, cpu=39.9, rss=197376.0, vsize=305188.0): kill     for total RAM`


title: Conditional wp_mail statement on post

text: I am currently posting from the front end using a similar model as http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/. I want to send an email to certain addresses based on the value of the "problem_type" field. This is what I have so far. This does not send anything at all, but I am at a dead end. Ideas? I only need 3 different emails. 1 if value is computers, 1 if value is phones, and every other value can be sent to a 3rd email address.               function new_post_creation_email($pid) {         $problem_type = get_post_meta($pid, 'problem_type', true);         $description = 'post_content';              if ($problem_type == 'phones') {             $to = '1st email here';         } elseif ($problem_type == 'computers') {             $to = '2nd email here';         } else {             $to = '3rd email here';         }              $subject = "New Ticket in ' . echo get_post_meta($pid, 'problem_type', true) . ";         $message = "A user profile has been updated\n\n";         $message .= print_r($description,true);         @wp_mail( $to, $subject, $message);     }          add_action('wp_insert_post','new_post_creation_email');      Obviously the "1st email here" etc have been replaced with text email addresses in the real code.


title: Use rich text editor in comments?

text: I've been trying to get the TinyMCE editor working in the comments field but I've been unable to do so. Another suggestion I found was http://nicedit.com, the editor is working but the comments are not saved in rich text. TinyMCEComments seems to do it but hasn't been updated in a while, it's not working for 3.2. Did anybody got this working? Thanks!


title: Advenced custom fields auto fill problem

text: I need help. I am using advanced custom fields and by using them i am making a new post. But something went wrong when i enter the site where are my end forms there is filled out information. If i enter a new user there are the same information in those forms. Can someone help me ? Maybe something have stuck in my data base ? I am using this code to create new post. code here 2x files. http://pastebin.com/4yRRy9Nv


title: Prevent the Editor From Moving My

text: I know variations on this have been asked all over the WordPress world, but I can't seem to find what I'm looking for. I have HTML that looks like this:                My Section Title      I find that if the anchor tag is empty, browsers tend not to scroll precisely to it when the name fragment is added to the URL. So, I want to have the mark up shown above. The problem is that when I enter that markup into the "Text" tab of the editor and switch to "Visual" mode, TinyMCE changes it to this:                My Section Title      I have a filter on `tiny_mce_before_init` similar to the one shown here where I set the `entities` key to allow for ` `, but I have no idea why it's moving the space outside of the anchor tag. I tried using the `extend_valid_elements` setting like this: `'a[name|class|id|text|href|style|target|rel|#text]'`, but that only made things worse (two ` ` where added after the anchor and it was still emptied). Any help is greatly appreciated.


title: My website resets when accessing the index page

text: So my wordpress theme and website is on a stage server, since it's under production. And this issue happens once in a while. Basically, if I log in as a user, and when I enter the index page, the site resets (front end). It appears as if I'm logged out, and some of the changes on the actual index page (including the header and footer) are not being shown. This only happens when clicking on the index page, either view a link or typing the actual address. If I click on another link, or access another page, suddenly everything is back to normal. But then if I enter the index page again, the same problems occurs. Anyone got any ideas? I'm using W3 Total Cache. Can it be a cache issue or a cookie issue? I'm clueless since the problem only seems to occur randomly, and sometimes completely disappear. The only error I get is: [11-Feb-2014 13:07:24 UTC] PHP Notice: Undefined variable: raw_welcome_message_text in /storage/content/40/10769050/stage.12345.com/public_html/wp- content/themes/stage.12345.com/index.php on line 29 I just solved this with the php empty. I doubt that this has anything to do with the actual problem though.


title: Search should search all posts under the category searched for

text: I have a situation where I want all posts to be retrieved from the category list. A proper explanation can be: - If I searched for "garden" - it should get all posts from the category garden. - I am close to it, but not able to modify the pre_get_posts to get it done. Here is my code:               $keywords = explode( ' ', $_GET['s'] );                  $cats = get_categories( array('taxonomy' => 'sector', 'hide_empty'=>'0') );             //print_r( $cats[0] );             foreach($keywords as $keyword ) {                                            foreach ($cats as $cat) {                     if (                          (strpos($cat->cat_name,$keyword) !== false)                          OR (strpos($cat->slug,$keyword) !== false)                         OR (strpos($cat->name,$keyword) !== false)                          OR (strpos($cat->category_nicename,$keyword) !== false)                      ) {                         $cat_IDs[] = $cat->cat_ID;                         $cat_slugs[] = $cat->cat_name;                     }                     //$idObj = get_category_by_slug($keyword);                           }             }             // $cat_IDs and $cat_slugs - now have categories I want to search                 // I was trying this query->set, but it gives no result            $taxQuery = array(                     array(                             'taxonomy' => 'sector',                             'field'    => 'id',                             'terms'    => array( $cat_IDs[0] )                         )                     );             $query->set( 'tax_query', $taxQuery );             $query->set('s', '' );      The above code is part of my pre_get_post filter. I am not familiar to advanced queries using meta_query or tax_query. Someone experienced, must be knowing what I am doing wrong. The link is here: http://www.ourlocalmag.com/superdev/listings Custom Post Type: listings Custom Taxonomy: sector $cat_IDs is being populated with correct category IDs. (confirmed) If you try searching for "garden" or "health" - it founds no post. I am confused with this. Please help. Thanks.


title: WordPress User Roles, Custom Post Types, and Admin views

text: My friend mentioned that there is a simple way to modify what users see in the admin sidebar based on their user role. I have a large number of custom post types, one for each user, and I need to limit these users (currently given the role 'author') access to only their own post type and the Posts (not even Pages). I also want to hide Widgets from them. Is there a bit of PHP I can stick in my functions.php file to accomplish this easily?


title: Theme's text domain & language.PO file not working

text:
I can't get my translations to work in my theme. Here is what I have In functions.php, I have:               load_theme_textdomain( 'transparent', get_template_directory_uri() .'/languages' );      I have > .../theme/languages/transparent-en_US.po, which contains:               # English translations for Transparent package.     # Copyright (C) 2014 Steven Doig     # This file is distributed under the same license as the Transparent package.     # Automatically generated, 2012.     #     msgid ""     msgstr ""     "Project-Id-Version: my-pluginname 1.0\n"     "Report-Msgid-Bugs-To: \n"     "POT-Creation-Date: 2012-08-06 13:46-0400\n"     "PO-Revision-Date: 2013-03-21 11:20+0400\n"     "Last-Translator: Automatically generated\n"     "Language-Team: none\n"     "MIME-Version: 1.0\n"     "Content-Type: text/plain; charset=utf-8\n"     "X-Poedit-SourceCharset: iso-8859-1\n"     "Content-Transfer-Encoding: 8bit\n"     "Plural-Forms: nplurals=2; plural=(n != 1);\n"     "X-Generator: Poedit 1.5.4\n"               #: header.php:58     msgid "thanks-for-visiting"     msgstr "Hello!  Thank you for visiting.  Take a look around and subscribe to the "          #: header.php:60     msgid "subscribe-by-email"     msgstr "subscribe by email"          #: header.php:62     msid "for-updates"     msgstr "for updates."      In header.php, from line 58 I have:
<?php echo __("thanks-for-visiting", 'transparent'); ?><a href="<?php bloginfo('rss2_url'); ?>" title="<?php bloginfo('name'); ?> RSS feed">RSS feed          <?php if (of_get_option('feedburner', '') !== '') {?>             or <a href="http://feedburner.google.com/fb/a/mailverify?uri=<?php echo of_get_option('feedburner', 'no entry');?>&loc=en_US" target="_blank"><?php echo __("subscribe-by-email", 'transparent'); ?>          <?php } ?>         <?php echo __("for-updates", 'transparent'); ?>
      In my style.css I have the following               /*     Theme Name: Transparent     Theme URI: http://websitetechnology.com.au/category/themes/transparent/     Description: Transparent responsive two-column theme.     Tags: green, two-columns, right-sidebar     Author:Steven Doig     Author URI:http://tech.doig.com.au     License: GNU General Public License v2 or later     License URI: http://www.gnu.org/licenses/gpl-2.0.html     Version:1.2     */      However, on the front end, I see: > thanks-for-visitingRSS feed for-updates Can you see why this translation is not working?


title: 'wp' hook supposed to trigger when editing a post?

text:
I'm trying to figure out if this is by design, a bug or a feature I should try to request. I created a plugin and added the following code:               function test_wp() {         echo '
It worked
';     }     add_action('wp', 'test_wp');      I'm essentially looking for instances where the 'wp' hook does/doesn't get triggered. It doesn't load on the admin dashboard, which is obvious since it's not loading any single WP object. Whenever I click into "All Posts" it does appear to get triggered. Which is what I expected to happen. Now, when clicking edit on any existing post, it appears 'wp' hook is not getting triggered on the post editor pages. It seems to me that the 'wp' hook should be getting called here, since it's loading a post and it's respective data directly onto this page. Yet the trigger doesn't seem to load. Am I missing some logic behind it not loading here? I am able to trigger the 'posts_selection' hook, which according to the Action Reference list happens right before 'wp' hook runs. That said, I have no idea what 'posts_selection' is actually doing, since the documentation for it is empty. I am currently running WordPress 3.6.1 and had the same issue in 3.6.0. I haven't tried any versions prior to 3.6.


title: Why in this page can't use this CSS class also if the .css file is correctly imported?

text:
I am not so into HTML and CSS and I am finding some problem with this WordPress theme that I am developing using _BootStrap*_ CSS framework. If you open this page you can easily understand what is the problem: http://lnx.asper-eritrea.com/diritti-umani/ As you can see in the previous page there is an immage (named **Hum_righ_big.jpg** ). I have to aligne it at the center of the page (and not on the left as it is at this time) and to do it I use **Tiny MCE** (that is a visual editor) in the backend of my website.

      So as you can see this img tag have the following class associated: **aligncenter** that have the following CSS code:               .aligncenter {         display: block;         margin-left: auto;         margin-right: auto;     }      As you can see in the previous page these are the imported CSS styles files:               <link rel='stylesheet' id='bootstrap-css-css'  href='http://localhost/wordpressAsper/wp-content/themes/AsperThemeV2/assets/bootstrap/css/bootstrap.css?ver=all' type='text/css' media='all' />     <link rel='stylesheet' id='fancybox-css-css'  href='http://localhost/wordpressAsper/wp-content/themes/AsperThemeV2/assets/plugins/fancybox/jquery.fancybox.css?ver=all' type='text/css' media='all' />     <link rel='stylesheet' id='flexslider-css-css'  href='http://localhost/wordpressAsper/wp-content/themes/AsperThemeV2/assets/plugins/flexslider/flexslider.css?ver=all' type='text/css' media='all' />     <link rel='stylesheet' id='customstyle-css-css'  href='http://localhost/wordpressAsper/wp-content/themes/AsperThemeV2/assets/css/stili-custom.css?ver=all' type='text/css' media='all' />      Now I have a strange behavior. If I put this CSS class code:               .aligncenter {         display: block;         margin-left: auto;         margin-right: auto;     }      into the **stili-custom.css** file I obtain no result and my immage still remain on the left but if I put this CSS class into the **bootstrap.css** file it work fine (the immage is aligned on the center). Why if I put it into **stili-custom.css** (and not **bootstrap.css** ) I can't use this CSS class in the previous page? What am I missing? How can I solve this issue? (I want put this class into **stili-custom.css** because this is a custom style and not belong to bootstrap framework)


title: custom theme's search not working

text: I've created a custom theme. It's pretty simple. However, the search function is not working. Does the search results page not use the theme's `page.php`?


title: get_the_tag_list() returns bad links

text:
I have created a custom post type named 'portfolio' and assigned the default 'post_tag' taxonomy to it. In single-portfolio.php template I'm using the following code to view each post's tags:               echo get_the_tag_list('
Tags: ',', ','
');      The problem is that the link of each tag is not correct and finally redirects into a 404 page. The link that `get_the_tag_list()` returns looks like: > http://www.mywebsite.com/?tag=web-design but in order to work properly it should be something like: > http://www.mywebsite.com/?tag=web-design&post_type=portfolio Any suggestions on how to fix this?? **Note:** I have also tried get_the_term_list() function but it works the same way...


title: Menu is not visible in appearance

text: I have added following code to my `function.php`               function register_my_menu() {        register_nav_menu('header-menu',__( 'Menu' ));     }     add_action( 'init', 'register_my_menu' );      And here is my code where menu is located.               wp_nav_menu( array( 'theme_location' => 'header-menu' ) );      What might be the issue ?


title: Nice permalink for search results with NiceSearch plugin

text: I'd like to know how I can rewrite a search results URL that also contains a ".html" into the end of URL. I have taken the code from the Nice Search plugin which works fine to change http://example.com?s=key+word into http://example.com/search/key-word:               function txfx_nice_search() {         $change = array('+',' '); //tanda plus dan spasi         if ( is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/search/') === false ) {             wp_redirect(get_bloginfo('home') . '/search/' . str_replace($change, '-', str_replace('%20', '-', get_query_var('s'))));             exit();         }     }          add_action('template_redirect', 'txfx_nice_search');      Is there a way to add ".html" in a search results permalink? So the result in permalink URL will be hxxp://example.com/search/key-word.html and the page result will be contain the "key word".