title: My Server Doesn't Allow timthumb; How Can I Remove It?

text: I have searched around but I've found no simple way for doing this. I have themes I bought from ReadyThemes.com that all have timthumb as the image resizer. I would prefer to use Wordpresses default resizer, or something similar. I have seen people recommending to switch to the_post_thumbnail but I can't figure out how to do this. The suggestions aren't a one size fits all fix, and I don't want to butcher the code. Looking through my code, for example I found this:               <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_directory'); ?>/custom/imgresize.php?src=<?php echo $image[0]; ?>&w=200&h=200" alt="<?php the_title(); ?>" />      and this:               <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_directory'); ?>/custom/imgresize.php?src=<?php echo $image[0]; ?>&w=60&h=60" border="0" align="left" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" />      It calls the timthumb script with imgresize.php. Personally, I feel the best fix would be to replace all the code in imgresize.php with a way to call the_post_thumbnail, but I don't know how to do this. What can I do to fix this?


title: Check whether a custom taxonomy term has published posts?

text: I'm making a magazine theme for a client and using a custom 'issue' taxonomy. There is a new issue every week, and I also have a function that get's the latest issue. But the editor creates a new issue a few days before the articles for that issue are published. My current function uses max() to just find the highest numbered issue:               function get_issues() {         $output = array();         $hlterms = get_terms('issue', array('hide_empty' => false));         foreach($hlterms as $term){              array_push($output, $term->name);         }          return $output;     }     function get_current_issue() {         $current_issue_no = max(get_issues());         $current_issue = get_issue_by_number($current_issue_no); // Not important for question         return $current_issue;     }      All the terms in 'issue' are numbers (as strings) like 101,402, etc. I use the highest number to return an Issue object, but that's not really important here, because if I can get the correct number I can then just pass that to the already working instantiation function `get_issue_by_number()`. So how can I find out whether that 'issue' that is returned has published posts? The idea is that the `get_current_issue()` function would only return the latest issue that is considered active by the publisher. They create articles beforehand and give them a publish date a few days from upload time. So ideally I could write a function that would return issue 101 even if 102 exists because 102 isn't assigned to any active posts. But then once those posts became active on the set date the function would begin returning 102. All thoughts are welcome, happy to change my approach if anyone has a better way to do this. So, a quick example of what I would hope to accomplish: I have two 'issues', 123 and 124. I created 123 a while ago and have since assigned published posts to it. But I just recently created 124 and there are no published posts attached yet. My function should return issue 123 _not_ 124, even though 124 is technically more recent. The fact that issue 123 has a number of published posts assigned, while 124 has none would determine this result. Then once I publish a post assigned to issue 124 it would become the current issue.


title: woocommerce hook publish product

text: I want to add an action whenever the admin publishes a product, but the WP hook publish_post does not trigger then - even though a wc product is just another type of post. I haven't found a woocommerce hook that triggers when a product is published. Any thoughts?


title: Limiting the number of users

text: I was wondering if there is a way to actually _limit_ the amount of users that can register to a Wordpress site? As an example, I am wanting to create a small site that will hold information for a customer, where they can only have a maximum of (for example) 50 users. The idea is that you will need to log in to view the site and only a set amount of users are allowed to be created. Maybe somebody knows of a plugin that might do this?


title: Including Custom Meta with posts_where query

text:
I have been looking around to see how to do this but the solutions i've found don't seem to be working for me. I'm making an AJAX powered search for some wordpress custom post types. I have got pretty far and everything is working great. Except now I am stuck on how to include the custom fields of the custom post type in my search (as well as the content and title). I just want to add to the SQL statement doing the searching but i'm not very well versed at SQL. I have tried Here is what I have so far in my functions.php to query the database once the search term is sent by the AJAX call:               function display_all_products() {                  global $term;             $term = trim(strip_tags($_POST['s']));                 if(!empty($_POST['s']))                 {                     add_filter( 'posts_where' , 'product_posts_where' );                 }                 $args = array(                      'posts_per_page' => 50,                     'paged' => 1,                      'post_type' => 'product',                      'order' => 'DESC',                 );                      $the_query = new WP_Query( $args );                       if($the_query->have_posts()) {                     while ( $the_query->have_posts() ) {                         $the_query->the_post();                              $pid = get_the_ID();                         $refno = get_post_meta( $pid, 'refno', true );                         $yr = get_post_meta( $pid, 'yr', true );                         $pieces = get_post_meta( $pid, 'pieces', true );                         $figures = get_post_meta( $pid, 'figures', true );                         ?>

<?php the_title(); ?>

<?php the_post_thumbnail(); ?>

 <?php _e('Referance Number', 'AuctionTheme');?>: <?php  echo $refno; ?>

 <?php _e('Year', 'AuctionTheme'); ?>: <?php echo $yr; ?>

 <?php _e('Pieces', 'AuctionTheme'); ?>: <?php echo $pieces; ?>

 <?php _e('Figures', 'AuctionTheme'); ?>: <?php echo $figures; ?>

                                        <?php}                 }                 wp_reset_query();             die();     }          add_action('wp_ajax_show_all_products', 'display_all_products');     add_action('wp_ajax_nopriv_show_all_products', 'display_all_products');          function product_posts_where( $where ) {                  global $wpdb, $term;             $searchTerms = explode(' ', $term);                  $i = 1;             $where .=" AND (";                  foreach ($searchTerms as $word) {                 if($i === 1) {                     $where .= " ({$wpdb->posts}.post_title LIKE '%$word%' OR {$wpdb->posts}.post_content LIKE '%$word%')";                 } else {                     $where .= " OR ({$wpdb->posts}.post_title LIKE '%$word%' OR {$wpdb->posts}.post_content LIKE '%$word%')";                 }                 $i++;             }                  $where .=")";              return $where;     }      Adding this to the product_posts_where function makes the whole thing fail and removes the data from the custom fields!               $where .= " OR ($wpdb->postmeta.meta_key = 'refno' AND $wpdb->postmeta.meta_value = '%$word%')";


title: Trying to load category thumbnails on wordpress page

text:
I'm trying to show some Wordpress category thumbnails on my homepage, but it seems my code is breaking the rest of my site. It kills the page and anything under my code won't load. Any help would be appreciated on how to get this working. Thanks!               <?php              global $post;         $temp_post = $post;         $args = array('numberposts' => 1, 'category' => 40, 'orderby' => 'date', 'order' => 'DESC');         $posts = get_posts($args);         foreach ($posts as $post) : setup_postdata($post);         if (has_post_thumbnail()) {             $thumbnail = get_post_thumbnail($post->ID, 'thumbnail');             $title = get_the_title();             $output = $title . "
" . $thumbnail;         }         endforeach;         $post = $temp_post;         wp_reset_postdata();         return($output);          ?>      **EDIT**               <?php          global $post;     $temp_post = $post;     $args = array('numberposts' => 6, 'category' => 227, 'orderby' => 'date', 'order' => 'DESC');     echo '
';     $posts = get_posts($args);     foreach ($posts as $post) : setup_postdata($post);     if (has_post_thumbnail()) {         $thumbnail = get_the_post_thumbnail($post->ID, 'thumbnail');         $link = get_permalink($post->ID);         $title = get_the_title();         echo '
';         echo '' .$thumbnail . '
';         echo '' .$title . '';         echo '
';     }     endforeach;     echo '
';     echo '

';     $post = $temp_post;     wp_reset_postdata();      ?>


title: How to protect media directory with .htaccess?

text: I am trying to protect the uploads directory with .htacess. But when I browse media section in admin panel, I see user/pass popup.   My guess is, WordPress use `fopen` to find if the file exists. I found mod_rewrite rule allowing `fopen` but I can't figure out how to use those rules with basic HTTP authentication. Any help is highly appreciated. following is the rewrite rules for allowing fopen:               RewriteEngine On       RewriteBase /          RewriteCond %{THE_REQUEST} ^.+$ [NC]       RewriteRule .* - [F,L]


title: hook for lostpassword form

text: Im trying to add captcha to my remember `lost password` form: I've added the input with the `lostpassword_form` hook and is ok. now in the processing I need to add a error when captcha is invalid:                add_action( 'lostpassword_post', 'processCaptcha' );           public function processCaptcha()      {          if($_POST['captcha']!=$captcha){            global $errors;                 $errors->add('invalid', __('ERROR: invalid captcha.'));          }      }      When I try to catch the `$error` with empty or invalid username/email shows:               WP_Error Object     (         [errors] => Array             (             )              [error_data] => Array             (             )     )      Any idea how to fix it?


title: styling isnot working in wordpress theme

text:
I am working in an wordpress theme.Where i have created some template part in a folder named "template_part".When i call the template part from page.php function in wordpress the styles are not working.how can i solve the problem.I am giving the codes of the template part below
                                 <?php                          $args = array('category_name'=>'খেলা', 'post_type' => 'post', 'showposts' => 5);                         $the_query = new WP_Query( $args );                         $count = 0;                             if ( $the_query->have_posts() ) {                             while ( $the_query->have_posts() ) {                                 $the_query->the_post();?>
 <?php echo the_title();?>
                                     <?php $count++;                                 }                                 } else {?>                                     no posts found                                 <?php }                                     /* Restore original Post Data */                                 wp_reset_postdata();                             ?>

      i want to style the "tmp1_style" class.I am trying to style them from style.css.i want to add background image on the template part.The image file is in img folder.Now how can i solve the problem?????


title: List all content by post type

text: I am writing a plugin in which I need to list post/page/attachment by each type. First I get all post type:               $post_types = get_post_types (array('public'=>true));      Then I create a loop and query posts for each post type, and print out:               foreach ($post_types as $type_name => $post_type) :          $args = array(             'post_type' => $post_type,             'numberposts' => -1,             'post_status' => null,             'post_parent' => null, // any parent             );                   $posts = get_pages($args);               if ($posts):                             foreach ($posts as $post) :             print_r($post);                          endforeach;         endif;     endforeach;      However, on plugin page, I don't see anything print out. Could anyone please give a hint? Thanks a lot!


title: infinite loop on page with comments after changing comments.php and header.php

text:
I am using version 3.3.1 of wordpress but I'm following a tutorial that used version 2.7. After changing my header.php and comments.php code, I'm getting an infinite loop when I view the single post page with comments. Here is the change I made in the `<head>` tags in header.php:               <?php if(is_singular()){ wp_enqueue_script('comment-reply');} ?>         <?php wp_head(); ?>      Here is the full comments.php code:               <?php          if(!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])){         die('Please do not load this page directly!');     }      if(post_password_required()){     ?>
This post is password protected.
     <?php         return;     } ?>          <?php     //Display the comment loop     if(have_posts()) {     ?>
<?php comments_number('Be the first to comment!', 'One Comment', '% Comments'); ?>

             <?php wp_list_comments(array('avatar_size'=>80, 'reply_text'=>'Reply to this comment.')); ?>

<?php paginate_comments_links(); ?>
         <?php      }else {         //If no comments so far               if('open' == $post->comment_status) {             ?>
Have your say!
         <?php         } else {             ?>
Comments currently closed!
             <?php         }     }          if('open' == $post->comment_status) {         ?>

<?php comment_form_title(); ?>

                 <?php cancel_comment_reply_link(); ?>
                  <?php             if(get_option('comment_registration') && !$user_ID){                 ?>
You must be logged in to comment
                 <?php             } else {                 ?>             <form action="<?php echo get_option('site_url'); ?>/wp-comments-post.php" method="post" id="commentform">                      <?php                 if($user_ID) {                     ?>
Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?>
                      <?php                 } else {                     ?>
                         <input type='text' name='author' id='author' value="<?php echo $comment_author;?>" />                         Name

                         <input type='text' name='email' id='email' value="<?php echo $comment_author_email;?>" />                         Mail <?php if($req) echo '(Required field)';?>

                         <input type='text' name='url' id='url' value="<?php echo $comment_author_url; ?>" />                         Website
                 <?php                 }                 ?>
                     <?php comment_id_fields(); ?>                     <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'])?>" />

<textarea id='comment' name='comment' cols='50' rows='10'></textarea>
                      <?php                 if(get_option('comment_moderation') == '1'){                     ?>
Comment moderation is enabled, no need to resubmit any comments posted.
                 <?php                 }                 ?>
<input type='text' name='submit' id='submit' value='Submit' />
                 <?php do_action('comment_form', $post->ID); ?>             </form>             <?php             }             ?>
         <?php     }      The loop persists if I remove only the header.php code. Without changing comments.php, it looks like the single post and the comment form code between tags are both infinitely looping. If I remove the comment form code between the tags, the single post is still infinitely looping. The tutorial video I was watching did not show this infinite loop problem, yet I am using the exact code as the tutorial. UPDATE: the tutorial I was following is this one `single.php` pastebin


title: Adding Radio Options or Select Options to Meta Box Title

text: I am adding Radio Options and Select Options to miscellaneous Meta Box titles. The HTML is rendering just fine in the title of each appropriate Meta Box title. There seems to be a bit of interference with some of the Meta Box functionality. When selecting an option (whether it's a radio option or select option) the meta box is collapsing unexpectedly. If you click anywhere on the Meta Box title bar, it's supposed to expand/collapse the Meta Box contents (Which is normal Meta Box functionality). However, it's interfering with choosing an option field which is on the Meta Box title bar. Is there any way of disabling the expanding/collapsing functionality of the Meta Box which has form elements in the Meta Box title bar? Or is there a way to change it's functionality to NOT trigger the expand/collapse functionality when clicking directly on one of the form elements? Here is a screenshot of what I'm talking about in-case there's any confusion. ![HTML Form Elements in Meta Box Title](http://i.stack.imgur.com/tlEUl.png) I've tried setting an extremely high `z-index` to my form elements and labels, etc.. However, the expand/collapse even from the Meta Box title is still triggered.


title: Insert HTML inside link in a walker

text:
I've got a custom nav walker that (theoretically) pulls the featured image from the most recent post in a custom taxonomy, and displays the the image after the link in a `wp_list_categories`. The problem is I need the image to display above the category name, within the link. I can't seem to figure out how to do this. This is my custom walker:               class CategoryThumbnailWalker extends Walker_Category {         function start_el(&$output, $category, $depth, $args) {             parent::start_el(&$output, $category, $depth, $args);             $posts = get_posts(array(                 "child_of"         => $category->term_id, // may need to be disabled; we'll see                 "post_type"        => "projects",                 "project-category" => $category->slug,             ));             if ($posts) {                 foreach ($posts as $post) {                     if (has_post_thumbnail($post->ID)) {                         $output .= get_the_post_thumbnail($post->ID, "gallery-small");                          } else {                         $output .= "";                     }                     break;                 }             } else {                 $output .= "";             }         }     }      and here's my `wp_list_categories`:               $category = $wp_query->get_queried_object_id();     wp_list_categories(array(         "child_of"         => $category,         "depth"            => 1,         "hide_empty"       => false,         "hierarchical"     => 1,         "orderby"          => "name",         "pad_counts"       => 0,         "post_type"        => "projects",         "show_count"       => 0,         "show_option_none" => "",         "taxonomy"         => "project-category",         "title_li"         => "",         "walker"           => new CategoryThumbnailWalker()     ));      And here's what it all outputs:
                      Education


title: Auto-modifying original [full size] images

text: Is there a way to make WordPress process Full size images, which by default it leaves unmodified?


title: Vimeo thumbnails

text: I use Advanced Custom Fields to show Vimeo videoes on a site I am creating for a client - The client pastes the vimeo ID (the last letters in the url) in a field, and the video is shown. But I would also like to show thumbnail of the video, I am using the following (not working code) for this:               <?php     $imgid = the_field('video_link');     $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php"));     echo $hash[0]['thumbnail_medium'];       ?>      This code only shows the video-ID on the page. But if I, instead for "the_field('video_link')" writes the video-ID in the code - the thumbnail URL _is_ displayed. Does anyone know what I am doing wrong? :)


title: I want to understand plugin implementation of custom posts / taxonomies / metaboxes

text: I want to find a long-term GUI/plugin-based solution to working with custom posts types, custom taxonomies, and custom fields/metaboxes. To this end I have been reviewing all the major custom post-type related plugins. A long list. I have discovered something which I am confused about, hence my question. I was not able to find an answer to this question after much research online. I notice that NONE of the plugins I have installed appear to be cross compatible. If I create a custom type in one, it **will not** show up in ANY of the others. If I create a custom taxonomy in one plugin it **will** (in most cases) show up as being assignable to a custom post type created in a different plugin… which makes sense to me. But it **will not** show up as editable in any other custom-type plugin. The same goes for custom fields/metaboxes. Having read through the custom types info in the Wordpress Codex this behaviour doesn't make sense to me. I have, perhaps wrongly, assumed these plugins are adding code to the functions.php file, and that each plugin would be able to access the code of the other. > My concern is that if I use a particular custom types (etc.) plugin and then > later on it is not updated to support future WP versions, I may end up > losing all my custom-types/taxonomies/fields functionality. I would then > have to set up all the types, etc., again using a more current plugin. A few > of the plugins I've seen have an export and perhaps an import feature. But > as far as I can tell this is for exporting and importing the data of that > particular plugin (although I am not 100% certain about that). _Is my concern a valid one? Or am I missing an essential point somewhere? If I set up a lot of custom content using a plugin, and that plugin ceases to function down the road, will I have to set everything up again?_


title: Importing users? From another wordpress site

text: Is there a way to import users from another wordpress site? Both sites are new. I just don't want to go through the trouble of adding the same users profile information and password.


title: How can i create page through plugin

text: I am developing WordPress plugin.This plugin has own login system.Which means users can register into the system. Then they can login. if the user login, i want to redirect them to their own profile page.This page should not be accessible while user is in logout or plugin is in inactive.So how can i create page through plugin. Thanks


title: Retain select value in select box

text: How are you all. I am just struggling to make my custom select box keep retain select value in form when page is reload or user come on form via different navigation. my select box is:               <?php           $args = array('post_type'=> 'portfolio', 'posts_per_page' =>100, 'offset'=> 0);           $myposts = get_posts( $args );           foreach ( $myposts as $post ) : setup_postdata( $post ); ?>           <option value="<?php the_title(); ?>"><?php the_title(); ?></option>           <?php endforeach;      in Core Php I know how to do this but in wordpress I am displaying post name in selectbox, so how can i achieve this, help would be appreciated....Thanks


title: How to filter WordPress search, excluding post in some custom taxonomies?

text: I want to filter WordPress search (and also WordPress listing of posts) on 2 values of a custom taxonomy. I tried this code, filtering my custom taxonomy named "marque", excluding 70 or 67 IDs (nb : in my back-office, posts can only be classified into one term of my taxonomy a time) :               // Filtering on listing     function filtre_listes( $query ) {         if ( !is_admin() ) {             $query->set( 'marque', '-70,-67' );         }         return $query;     }     add_action( 'pre_get_posts', 'filtre_listes' );          // Filtering on searches     function filtre_recherches(&$query)     {         if ( $query->is_search && ( !is_admin() ) )             $query->set('marque', '-70,-67');         return $query;     }     add_action('parse_query', 'filtre_recherches');      But it doesn't seems to work. I use WordPress 3.0.5. Any idea ? Thanks a lot, and sorry for my approximative english !


title: Getting post id from wp_insert_post_data function?

text: I'm trying to use the function get_the_tags() from outside the 'loop'.   I understand this can be achieved by using the post ID like `get_the_tags($postID)`. Does anyone know how I can get the post ID from inside a wp_insert_post_data function? I've tried using 'guid' which is suggested here, although I've had no luck. I'm also not sure that's even the post ID. Any help with this will be appriciated. Thanks. EDIT:   Here's the code I'm working with:               function changePost($data, $postarr) {            $postid = $postarr["ID"];       $posttags = $postarr['tags_input']; // This doesn't work.            $content = $data['post_content'];       $subject = $data['post_title'];       if($data['post_status'] == 'publish') {         sendviaemail($content, $subject, $postid, $posttags);       }          return $data;     }          add_filter('wp_insert_post_data','changePost','99',2);      As you can see, I want to send the post ID, post tags, content and the subject to another function called "sendviaemail". Everything is okay, except I don't know how to get the tags from the post.


title: Set user after wp_create_user?

text: I have a form that creates a new user by using:               wp_create_user()      This works, but after this I want to auto log in the user. I tried using:               $creds = array();     $creds['user_login'] = 'username';     $creds['user_password'] = 'password';     $creds['remember'] = true;     $user = wp_signon( $creds, false );         if ( is_wp_error($user) ) {            $msg =  $user->get_error_message();            die($msg);         } else {             $output_form = true;         }      But this creates a "headers already sent" error message because it's not at the top of the page. Is there a way to auto log in the user after I have created the user?


title: Inquiry form like on URL

text: ![enter image description here](http://i.stack.imgur.com/MuCXT.jpg) I need to make an inquiry form on my website. This demo form is what I need. How can I make this thing? I tried Formcraft and Gravity but I don't succeeded. In the first time I want to choose the color and the type for PVC. After that, line after line, I need to choose few values (`Open type` is combo field, `L` and `H` are numeric fields in `mm`, and number of pieces is combo type). In the bottom of form I need two buttons (Another product line and Send). If I press Another product, another line appear to be filled. How to solve this?


title: Using Custom Meta Capabilities on Custom Post Type

text: I am trying to create a product post type. I have already done so and been using it successfully in the development of a product review panel. I am trying to give a certain role the ability to create and manage these products so that vendors could come in and put their own products in. I have looked in other Member Plugin and I understand it 100%. I read this post: » **Meta Capabilities for Custom Post Types** -- JustinTadlock.com And it explains how to add the capabilities. My issue being when I create a custom post type if I make the declaration of `'capability_type' => 'product'` in the `register_post_type()` for product the post type is no longer created. As if I gave it some sort of incorrect input. I have read the Codex and this parameter is a string and defaults to `'post'`. Which works if you supply that value. I have tried just copy and pasting the code from the aforementioned post linked above. I have tried doing this in a different install of WordPress. I have not tried doing a completely fresh install and disabling all plugins however. That is what I am going to do now. I am hoping some one has had this problem before (people in the comments on the above article have and I commented there). Here is my current post registration code               register_post_type( 'bounty_product', array(       'labels' => array(          'name' => 'Products',          'singular_name' => 'Product',          'add_new' => 'Add New',          'add_new_item' => 'Add New Product',          'edit' => 'Edit',          'edit_item' => 'Edit Product',          'new_item' => 'New Product',          'view' => 'View',          'view_item' => 'View Product',          'search_items' => 'Search Products',          'not_found' => 'No Products found',          'not_found_in_trash' => 'No Products found in Trash',          'parent' => 'Parent Product'),       'description' => 'Used for the product review section',       'public' => true,       'show_in_menu' => true,       'menu_position' => 20,       'has_archive' => true,       'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'custom-fields' ),     ));      To this I have tried adding bellow the `'public' => true`:               'capability_type' => 'product',             'capabilities' => array(                 'publish_posts' => 'publish_product',                 'edit_posts' => 'edit_product',                 'edit_others_posts' => 'edit_others_product',                 'delete_posts' => 'delete_product',                 'delete_others_posts' => 'delete_others_product',                 'read_private_posts' => 'read_private_product',                 'edit_post' => 'edit_product',                 'delete_post' => 'delete_product',                 'read_post' => 'read_product',             ),      This simply breaks the custom post and it seems to be the `'capability_type' => 'product'` line that is the problem.


title: Pointing Existing featured images to s3 bucket

text: Our wordpress site is moved to another server and we moved all the images to amazon s3. Updated the post_content and guid to s3 path. On verifying found that the images which are set as featured images are not displaying since it still refers to the site url path. Although giving the define('upload') in the config file fix this issue, it then shows error while making a new upload. I am using plugin amazon s3 and cloudfront plugin for uploading to s3 bucket. How can I fix this so that my newly images upload to s3 and my existing featured images point to s3? thanks


title: struggling to set up WP tests

text: I want to contribute to a guys plugin (TimberWp). I'd like to do it with tests. his plugin has a test dir that looks just like the wp-cli scaffolded dir. all v standard. Iv'e managed to get as far as installing wp-cli, phpunit (already had that) and I got past the couldn't connect to mysql issue (make it use the mamp php5.4 version) now, running:               WP_TESTS_DIR=~/sites/kindling/wp-unit-tests phpunit      gives me Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /Users/willbarker/sites/kindling/wp-unit- tests/includes/bootstrap.php on line 7 So i made sure my path to phpunit is set in my php.ini                 timber git:(master) ✗ php -r 'foreach (explode(":", get_include_path()) as $path) echo $path . PHP_EOL;'     .     /Applications/MAMP/bin/php/php5.4.4/lib/php     /usr/local/bin/phpunit      So i am out of ideas how to get phpunit working with WP. Have i got the right version of phpunit? its a phar, is that why i can't include files from it? I'm obviously confused / running into the extent of my knowledge. Here is my installed phpunit version:               ➜  timber git:(master) ✗ phpunit --which      PHPUnit 3.7.28 by Sebastian Bergmann.


title: Where did my Theme Editor go?

text: I have 2 blogs, both are versions 3.x One of them, "Blog 1" is a multi-user blog. I can't edit the themes under Appearance->Editor , because it doesn't appear. "Blog 2" is a single instance blog, and I can see the Appearance->Editor What's the difference ? How do I get the editor to appear ? Could it be file permissions ? If so, which directory(ies) do I need to check ? Thanks ![enter image description here](http://i.stack.imgur.com/uIH7b.jpg)


title: Site Title in my Search URL

text: First off, I am still learning Wordpress by building my own theme. Go easy on me. My search URL displays my sites title. Example: `/My%20Site?s=horror` Is there an issue with my searchform.php that is causing this? If its the `bloginfo();` then what can I use as a replacement?               <form action="<?php bloginfo('search'); ?>" id="searchform" method="get">       <input name="s" class="nav-search" type="text" placeholder="Search Videos">     </form>


title: How to work around case sensitivity of HEX values?

text: Setting up the WP Customizer options, where it only writes CSS to the head if the value is not the default for that setting. BUT... sometimes the customizer will save the HEX value in all caps and other times it's lowercase. The defaults are all set as capitalized values, and even if it appears they're capitalized values in the customizer itself, it will still sometimes print lowercase HEX values in the CSS, adding unnecessary code. Is there a way to override the case-sensitivity of HEX values in this instance?               $cssoutput = '';          ////* save the styles to the cssoutput     if ( $bg !== '#F5F5F5' ) {         $cssoutput .=             "body { background-color: " . $bg . "; } \n";     }     if ( $title !== '#333333' ) {         $cssoutput .=             ".site-title a { color: " . $title . "; } \n";     }     echo      "<style type=\"text/css\">" . $cssoutput . "</style>";      Results in this when it shouldn't be writing the value at all -               <style type="text/css">body { background-color: #f5f5f5; } </style>      Also, I should note it appears to be a random action, some mixed HEX values are all capitalized and others are lowercase, even if they're all entered and saved as capital values.


title: Editing content for mobile

text: I'm thinking about the best solution for separating content that should be displayed on different devices in the backend, e.g. desktop and mobile. The most obvious solution would be to define special CSS classes through TinyMCE that could indicate if a certain text should be displayed on mobile or not. But how about custom fields? How to make a separation here that would not involve a complex output mechanism in the frontend? Are there any best practices or UI solutions for such an approach? Thanks in advance, Jürgen


title: How to use the password_reset hook to validate new password and display error

text: When a user resets their password via the link in the password reset email, I know I can use the `password_reset` hook to get the user object and the new password. I want to validate the new password to ensure that the strength requirements are met, but I'm not sure on how to generate the error messages so that they display above the form. When I did this on the profile page via the `user_profile_update_errors` hook, I had a `WP_Error` I could add to, but not with this hook. What would be the best way to handle this?


title: WP_query - Filter by tax_query and meta_query using multiple select

text: I have a Publications Post Type, a Writers Taxonomy and a Publications Custom 'Meta Box' Value; `parent_id`. In my `archive-publictions-post.php` template I am trying to filter the `WP_Query` Class, with the `tax_query` and `meta_query` Parameters. With the code below I can get all Publications to show on page load and I can get filtered results when I select both a Term and a Parent together but do not when selected individually? I am not sure about how the `meta_query` & `tax_query` `relationship` parameter should be used in this case?               <?php       // The code from: archive-publictions-post.php            // Set Var Filter       $publications_filter = $_POST['publications'];            // Set Terms Arguments       $term_args = array(         'orderby' => 'name',             'order' => 'ASC',              'hide_empty' => false,             'parent' => 0,             );       // Get Publications Terms       $terms = get_terms('publications-tax', $term_args);            $writers_args = array(          'post_type' => 'writers-post',          'posts_per_page' => -1,         'post_status' => 'any',         'order' => 'DESC',       );        // Get Writers Posts       $writers = get_posts($writers_args);              echo '<select name="publications[]" multiple>';           // Set var as an array           $all_writers = array();           foreach($writers as $writer){             // Set all terms to our array             $all_writers[] = $writer->ID;             echo '<option value="'.$writer->ID.'">'.$writer->post_name.'</option>';           }           foreach($terms as $term){             // Set all terms to our array             $all_terms[] = $term->name;             echo '<option value="'.$term->name.'">'.$term->name.'</option>';           }                   echo '</select>';                  echo '<input type="submit" value="go">';       ?>       </form>      `WP_QUERY $args`:                  //Start Args              $publications_results = isset($_POST['publications']) ? $publications_filter : $all_terms;              $publication_values=array();         $writers=array();         foreach ($publications_results as $key => $value) {           if (is_numeric($value)) {             $writers_values[] = $value;           }           else{             $publications_values[] = $value;           }         }         $args = array(              'post_type' => array('publications-post','writers-post'),           'order' => 'DESC',           'post_status' => 'any',           'orderby' => 'date',           'tax_query' => array(array(             'taxonomy' => 'publications-tax',             'field' => 'slug',             'terms' => $publications_values           ))         );               if($_POST['publications']){           $args['meta_query'][] =            array(             'key' => 'parent_id',             'value' => $writers_values,             'type' => 'numeric',           );         }      Thanks


title: WordPress sections in htaccess kills FrontPage permissions

text: I have WordPress running in the public_html directory of my web server (i.e. the primary domain on my account points to this directory). There are subdirectories off of this folder that are for other websites (e.g. /subdomain for the “subdomain.com” website). Some of these websites in subdirectories are edited using FrontPage. I have found that the .htaccess file in the root, when configured for WP, messes up the FrontPage permissions and makes it impossible to use FrontPage (FrontPage never prompts for authentication and throws a 404 error). From web searches I’ve discovered that others have encountered this problem (e.g. https://my.bluehost.com/cgi/help/375) , but I have not had success implementing the fixes others proposed. Here are the details: ## When this .htaccess file is in the root, FrontPage works fine:               # -FrontPage-          AuthUserFile /home/user/public_html/_vti_pvt/service.pwd     AuthGroupFile /home/user/public_html/_vti_pvt/service.grp               <Limit GET POST>     order deny,allow     deny from all     allow from all     </Limit>     <Limit PUT DELETE>     order deny,allow     deny from all     </Limit>          AuthName myrootdomain.com     IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*      * * * ## I would like to have WP sections in this root .htaccess file and tried to put the following .htaccess file in the top-level public_html directory:               #-FrontPage-          AuthUserFile /home/user/public_html/_vti_pvt/service.pwd     AuthGroupFile /home/user/public_html/_vti_pvt/service.grp          <Limit GET POST>     order deny,allow     deny from all     allow from all     </Limit>     <Limit PUT DELETE>     order deny,allow     deny from all     </Limit>          AuthName myrootdomain.com     IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*          RewriteRule ^subdir-name/.*$ - [PT]           ErrorDocument 404 /index.html     <files wp-config.php>     order allow,deny     deny from all     </files>     Options +FollowSymLinks     RewriteEngine On     RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]     RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]     RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})     RewriteRule ^(.*)$ index.php [F,L]     <IfModule mod_deflate.c>     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/xhtml+xml application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp      BrowserMatch ^Mozilla/4 gzip-only-text/html     BrowserMatch ^Mozilla/4\.0[678] no-gzip     BrowserMatch \bMSIE !no-gzip !gzip-only-text/html     </IfModule>     Options -Indexes     # 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      * * * HOWEVER, when the above .htaccess file with WP components is installed, it breaks FrontPage authentication. The .htaccess file in my _vti_bin file of “subdomainN” (which is a domain edited by FrontPage) looks like this:               # -FrontPage-          Options +FollowSymlinks          <Limit GET POST>     order deny,allow     deny from all     allow from all     </Limit>     <Limit PUT DELETE>     order deny,allow     deny from all     </Limit>     AuthName mydomain.com     AuthUserFile /home/user/public_html/_vti_pvt/service.pwd     AuthGroupFile /home/user/public_html/_vti_pvt/service.grp      * * * … and the .htaccess file in my _vti_aut and _vti_adm subdirectories of subdomain N looks like this:               # -FrontPage-          Options +FollowSymlinks          <Limit GET POST>     order deny,allow     deny from all     allow from all     require group authors administrators     </Limit>     <Limit PUT DELETE>     order deny,allow     deny from all     </Limit>     AuthType Passthrough     AuthName myrootdomain.com     AuthUserFile /home/user/public_html/_vti_pvt/service.pwd     AuthGroupFile /home/user/public_html/_vti_pvt/service.grp      * * * Any suggestions on what I need to tweak to get FrontPage authentication to work AND WP components in the .htaccess file?


title: Adding theme support for a custom header image

text: I'm using `add_theme_support( 'custom-header', $defaults );` to support custom header images in my theme. The `$defaults` are described in the Custom Headers article               $defaults = array(         'default-image'          => '',         'random-default'         => false,         'width'                  => 0,         'height'                 => 0,         'flex-height'            => false,         'flex-width'             => false,         'default-text-color'     => '',         'header-text'            => true,         'uploads'                => true,         'wp-head-callback'       => '',         'admin-head-callback'    => '',         'admin-preview-callback' => '',     );      There is no explanation in the Codex for the following. What do they mean?   * wp-head-callback   * admin-head-callback   * admin-preview-callback


title: How to make a plugin auto-add item to nav menu

text: I'm building a contact information plugin that writes data to a page. So far, so good. What I would like is to build a function into the plugin that adds a navigation item to the main nav bar on the site (there will only ever be one nav bar at a time), and ensures the item is at the bottom of the nav bar.


title: Repositioning 'Reply' Link in Comments

text: I'm calling my comments the ol' fashion way:               <?php wp_list_comments('avatar_size=60'); ?>      I would like to be able to position the 'Reply" link where I choose. Right now, it defaults to the bottom of the comment. Sure, I can move it via CSS - but what if I want to place it after the dater or username?


title: PHP Script within wordpress theme

text: I have a php script that I'd like to utilize within my wordpress theme. I'd like to restrict access to the page based on users belonging to particular groups so it's important to keep it within wordpress for that reason. I've tried at least 9 different plugins and the closest one I could find was a plugin that wrapped the code into a unique shortcode to be placed on page. However, the script wasn't functioning as it should. Lastly, it's important that I do NOT display the php code for users to view in page source. Can this be accomplished and if so, how? Thanks so much!


title: Plugin development: How many plugin and WordPress version combinations to support?

text: I'm developing a plugin (my first plugin), and I wonder how to think about [supporting and testing various plugin version and WordPress version combinations]. For example, if I develop a plugin, and release versions 1.0 and 1.1 and 2.0. Meanwhile, WordPress releases versions 3.2, 3.3 and 3.4. Now, at the one extreme: Should I assume that people upgrade their WordPress installations, and upgrade the plugin as well? That is, I would test the most recent plugin version against the most recent WordPress version, only? Or, at the other extreme: I assume that, for various reasons, people are not able to upgrade to the latest WordPress release. So I test plugin version 1.0, 1.1 and 2.0 against WordPress 3.2, 3.3 and 3.4. (That is, 9 combinations.) What would be reasonable to do? (What do people usually do?) (I'd be happy to provide more details — what would you need to know?)


title: Insert <ul> Into Sub-child Menu

text: This code displays a list of child categories of the parent category while a user is on a child category or single post. The styling around this list is displaying even when a list isn't being generated. Take a look here where you'll see an empty black box - I've colored it black simply to make it stick out. Not relevant, but this code is impacted by another code in my functions.php. How do I correctly insert the tags into this code and prevent a list from being generated when no child categories exist?               <?php       $categories = get_the_category();           echo '<ul style="background:#000">';       foreach($categories as $category){           $parent = $category->parent;           if($category->parent == 0){           }           else{               wp_list_categories("child_of=$parent&title_li");                }           echo '';       }       ?>


title: How to detect first visit of a user?

text: I want to build an alert for users who visit my WordPress blog. Is there a conditional function like `is_home()` to detect if someone visits the blog the **first time**? I want to send the alert to every new user no matter on which site he entered.


title: Registering tags taxonomy for a custom post type

text: The actual post type support categories and I want to add also support for tags. I have this code:               register_taxonomy(         'category_' . $slug,         array( $slug ),          array(             'hierarchical' => true,             'label' => "$slug Categories",             'singular_label' => "$slug Category",             'rewrite' => true         )     );      So, I was trying to duplicate this for supporting tags but is not working. This is the entire code for portfolio post type :               $portfolio_slugs = get_option("zeitgeist_portfolio_slug");     if(is_array($portfolio_slugs))         foreach ( $portfolio_slugs as $slug ){             add_action('init', 'create_portfolio');             register_taxonomy("category_".$slug, array($slug),              array("hierarchical" => true, "label" => "$slug Categories", "singular_label" => "$slug Category", "rewrite" => true));             register_taxonomy("tags_".$slug, array($slug), array("hierarchical" => false, "label" => "$slug Tags", "singular_label" => "$slug Tags", "rewrite" => true));                    function create_portfolio() {         $portfolio_slugs = get_option("zeitgeist_portfolio_slug");         $portfolio_counter = 0;         $portfolio_names = get_option("zeitgeist_portfolio_name");         foreach ( $portfolio_slugs as $slug ){             $portfolio_args = array(                 'label' => __("Portfolio '".$portfolio_names[$portfolio_counter]."'"),                 'singular_label' => __($portfolio_names[$portfolio_counter++]),                 'public' => true,                 'show_ui' => true,                 'capability_type' => 'post',                 'hierarchical' => false,                 'rewrite' => array('slug' => $slug, 'with_front' => true),                 'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', 'excerpt')             );             register_post_type($slug,$portfolio_args);         }     }          function portfolioSingleRedirect(){         global $wp_query;         $queryptype = $wp_query->query_vars["post_type"];         $portfolio_slugs = get_option("zeitgeist_portfolio_slug");         if(is_array($portfolio_slugs))             foreach ( $portfolio_slugs as $slug ){                 if ($queryptype == $slug){                     if (have_posts()){                         global $pcat;                         $pcat = "category_".$slug;                         require(TEMPLATEPATH . '/single_portfolio.php');                         die();                     }else{                         $wp_query->is_404 = true;                     }                 }             }     }     add_action("template_redirect", 'portfolioSingleRedirect');


title: Require re-login when logged-in user attempts to access restricted page

text: I need to restrict access to certain frontend pages, based on a user_meta field. All works fine, except when the user is already logged in but with the wrong credentials. In that situation I would want them to be redirected to the login form (with a message encouraging them to logout and login again with suitable credentials - I can do that bit). Instead, the user ends up with the "redirecting in a way that will never complete" message. I think the only bit of my code that's relevant to this issue is:               if(!$user_is_approved) {         wp_redirect(wp_login_url( get_permalink() ));         exit;     }      What's the best way of achieving this?


title: How can I create an automatic drop down menu with my tags?

text: I have another post type which isn't the default one. I have four taxonomies attached to that post type. And I have many tags attached to these taxonomies. I would like to create a drop down menu that pull automatically all the tags by their taxonomy. For example: Post type: Culture Taxonomy 1: Books Under that, all the books (tags) Taxonomy 2: Movies Under that, all the movies (tags) etc.. Thanks!


title: Taxonomy term description with style, only if the description exists?

text:
I am attempting to add a conditional function to my index.php that will return the description of a term in my custom taxonomy on the page for that term above the list of posts only if the description exists. I want it to be in a styled div (id="term-descr"). So I tried:
     <?php echo term_description() ?>
           It worked fine on terms I had the description for, but on all other pages I ended up with the styled outline of the div with nothing in it, which looks funny. I think the function returns a br or something when it returns no value. So I tried to come up with a conditional function to make this work, something like:                    <?php if (term_description() != 0 ) echo {?>
     <?php term_description(); ?>
     <?php } ?>      which doesn't work. I'm wondering if there is an easier way to do this or if I'm missing something.


title: Newsletter Plugin That Allows Multiple Lists?

text: I have tried a few plugins _(wysija, newsletter, xyz newsletter)_ , but no one met my requirements so far. What I want is each page to have a sign up form and then the person that signs up would be added to a different list depending on the page they signed up from. I'm looking for premium or free plugins, and want to avoid third party solutions as well.


title: Convert date format in meta

text: I have been storing date format in meta key/value. I have been storing in this format (mm/dd/YYYY) now I need to convert that into (YYYYMMDD) SO I can run a date match in query. Please advice how can I do that ?


title: Send email daily from WordPress site

text: I customized a calendar plugin which shows today's birthdays and current month's list of wedding anniversaries in the home page of the site. I wrote a code in that plugin's displaying page using `wp_mail` and mail will send. But this happens only when the site is visited. My code:               if($dat==date('Y-m-d'))/*$dat is the date of event from DB*/      {      if($eid!=''){ /*if recipient email id is not null*/      if($se!=1)  /*if email is sending first time then($se=db column 'send'value) $se=0 otherwise it is 1*/      {      $to=$eid;      $sub="Birthday Wishes";       $msg='Happy Birthday '.$ev_title[$j];      $headers= 'From:Mysite <noreply@mysite.com>' . "\r\n".'Content-type: text/html';        $attachments=array(WP_CONTENT_DIR . '/plugins/spider-event-calendar/images/happybday.gif');       $rx=wp_mail($to,$sub,$msg,$headers,$attachments);       $wpdb->update($wpdb->prefix.  "spidercalendar_event",array('send'=>1),array('id'=>$ev_id[$j]));/**/        //echo "email send";        }       else{           //echo "email already sent";         }       }      }      I heard about `wp_cron` but when I searched in this forum about how to write `cron` in WordPress I saw an answer like > Unfortunately the WordPress cron jobs are only triggered when your site is > visited If it is true then how can I send emails daily even without visiting the webpage? Is there any other way for this?


title: Rendering Custom Post Types independently of the theme in use

text: By using a plugin called "Custom Content Type Manager", I have implemented in my blog a simple Custom Post Type called "game review" which is simple a post, plus some extra fields which represents the rating of the game for graphics, sound, etc... However, I could not find a plugin which helps in rendering/displaying this custom type. I understand, that I can create a page called `single-game- review.php` and this will be used to render it, but I found this not very convenient. The problem is that whenever I change theme, I have to recreate the file. Also the logic of the theme is duplicated in the new file. An idea would be to redefine the function `the_content()` so that when it's used on "game review" post, the output is actually the content of the post itself plus the extra fields rendered for example as unordered lists. In this way I can change these without breaking the rendering of the custom post type. There are plugins which can do that? Or I have to do it by hand in a completely unsupported way that breaks ad the first update?


title: How reduce wordpress login session timeout time?

text: I want to logout user autometically when user is idle for more than 10 minutes.That mean suppose user is logged in to a site and user didn't browse any pages for more than 10 mins.when he browse any page after 10mins, it will logout user and redirect to login page.Any Solution? Advance Thanks.


title: Genesis menu position change

text: Sorry for silly question, I'm pretty new in WordPress and Genesis. I want to move Genesis menu above header. How can I do that?


title: Making tags appear as an Unordered list <ul> instead of a 'cloud'

text: I'm developing a a site using the wp e-commerce plugin, and it handles tags in pretty much the same way it would if I were using it for a blog instead of a store. The issue is that I want to use the tags as a secondary kind of navigation menu so that customers can view all items made from a certain material no matter what product category the item is in. My issue is that the theme-functions page within wp e-commerce is causing certain tags to be in huge fonts as these tags are related to more products. What I want to do is be able to display each of the tags as links within `<ul> <li>` with each tag using the same sized font. I understand some basics of php, but not enough to fully decode the theme functions file and edit it. I have considered waiting until I've got all of the products into the system then handcoding the list of tags, but then if my client wants to add more tags in the future they obviously won't be included. If anyone has any insights or ideas Id be very greatful. I would post the code in question here but its about 200 lines long - but if it's needed in order to find the solution pls tell me so that I can add it.


title: Wordpress 3.1.2 Network Enabled non-www to www

text: OK so i am drawing a blank. I have setup a WordPress 3.1.2 Network site and want the main site to appear with www.mydomain.com not mydomain.com and i can get that to work but the back-end on the network admin breaks when i go to add a site it gives me the error "Are you sure you want to do this". When i disable the redirect of non-www to www it works fine. I have setup the wp_options table with site home and url of www.mydomain.com so i do not get this at all. I had it working in 3.0 but now 3.1 not working


title: Problems in creating a static site with WordPress

text: I want to create a static, company brochure site. I created a page called "HOME" and I was able to change the reading settings to static, and select "HOME" from the drop down box. I then created a page named "ABOUT-US". It appears in the main menu, but when I click on it I get a 404 error. I also need to create an page called "ADVANTAGES", with sub pages (e.g. Advantage-A, Advantage-B, etc.). How can I do this? I am new to WP. I've tried blogging and its fine. Can anyone suggest a tutorial or book for this? It would be a great help. I Googled it in vain, it was no big help.


title: Saving custom post in custom form

text: I'm tring to save a custom post in a custom form. When I submit the form, all data gets processed, and then I need to save it to the db. I'm trying to do this using `update_post_meta`, but that requires a post id which I don't have at that point. How do I obtain that? Or should I use a different approach for saving the data? Also, when saving a custom post from wp-admin, I hooked the `save` function to `edit_post`. Because this is a custom form, there is no default hook. I assume that the post itself, without the metadata, gets saved automatically there, so I do I need to reproduce this functionality in the save function of my custom form? So I actually want to know how to save a custom post (and its meta values) from scratch (without any hooks and post id's). The code:               function dating_user_create_account_validate() {         $errors = array();              // Truth verification         if(!isset($_POST['dating_user_truth_field']))             $errors[] = "Je moet aangeven dat je de gegevens naar waarheid hebt ingevuld. Vink het selectievakje onderaan het formulier aan.";              // Empty field validation         $fields = array('email','gender','sexuality','day','month','year','region','city');         $unset_fields = array();         foreach($fields as $field)             if(!isset($_POST['dating_user_'.$field.'_field']) || $_POST['dating_user_'.$field.'_field'] === '')                 $unset_fields[] = $field;              function alias($k) {             $aliases = array(                 'email'     => 'E-mailadres',                 'password'  => 'Wachtwoord',                 'gender'    => 'Geslacht',                 'sexuality' => 'Geaardheid',                 'birthday'  => 'Geboortedatum',                 'region'    => 'Regio',                 'city'      => 'Stad',             );             return $aliases[$k];          }         if(sizeof($unset_fields) > 0) {             $errors[] = implode(', ', array_map('alias', $unset_fields)) . ' niet ingevuld.';             return $errors;         }              // Email validation         if(!is_email($_POST['dating_user_email_field']))             $errors[] = 'Vul a.u.b. een geldig E-mailadres in.';              // Nonce verification         $nonces = array('email','gender','sexuality','birthday','region','city');         foreach($nonces as $nonce)              if(!wp_verify_nonce($_POST['dating_user_'.$nonce.'_box_nonce'],'dating_user_'.$nonce.'_box'))                 die($nonce." nonce ongeldig");              // Duplicate email check         $mail_args = array(                 'post_type'      => 'dating_user',                 'meta_key'       => '_email_meta_value_key',                 'meta_value'     => $_POST['dating_user_email_field'],                'posts_per_page' => 10,         );         $mail_res = new WP_Query($mail_args);         if($mail_res->have_posts()) {             $errors[] = 'Dit E-mailadres is al in gebruik. Kies een andere of vind je wachtwoord terug bij Account > Wachtwoord vergeten.';             return $errors;         }              $password = generateRandomString(15);              $final_data = array(             'email'     => sanitize_text_field( $_POST['dating_user_email_field'] ),             'password'  => wp_hash_password($password),             'gender'    => $_POST['dating_user_gender_field'],             'sexuality' => $_POST['dating_user_sexuality_field'],             'birthday'  => $_POST['dating_user_day_field'].'-'.$_POST['dating_user_month_field'].'-'.$_POST['dating_user_year_field'],             'region'    => $_POST['dating_user_region_field'],             'city'      => $_POST['dating_user_city_field'],         );              //so I've got no $post_id         foreach($final_data as $data_key => $data_value)             update_post_meta($post_id, '_'.$data_key.'_meta_value_key', $data_value);              send_email($final_data['email'], $password);              header('Location: '.$_SERVER['PHP_SELF'].'/account-aangemaakt/');     }


title: How to add a byline to all the pages?

text: I am signing up for google authorship, and they require me to add a byline to my site. But I have almost 500 pages of content on the site and can't do it manually. Would anyone be able to suggest how I can add the byline to every page?


title: Widgets not displaying in theme customizer

text:
I am developing a new theme and I am using several sidebars in this theme. All works fine, but the widgets are not showing up in the theme customizer section. All widgets are working fine under "appearance -> widgets" section but not in "appearance -> customize". I am using wordpress 3.9.1. This is how I declared them in functions.php               if(function_exists('register_sidebar'))      {              register_sidebar ( array (                 'name' => 'Widget Area 1',                 'id' => 'widget-1',                 'description' => 'Widget Area 2.',                 'before_widget' => '
',                 'after_widget' => '
',                 'before_title' => '
',                 'after_title' => '
' ,         ) );                        register_sidebar ( array (                 'name' => 'Widget Area 2',                 'id' => 'widget-2',                 'description' => 'Widget Area 2.',                 'before_widget' => '
',                 'after_widget' => '
',                 'before_title' => '
',                 'after_title' => '
' ,         ) );                   register_sidebar ( array (                 'name' => 'Widget Area 3',                 'id' => 'widget-3',                 'description' => 'Widget Area 3.',                 'before_widget' => '
',                 'after_widget' => '
',                 'before_title' => '
',                 'after_title' => '
' ,         ) );              register_sidebar ( array (                 'name' => 'Widget Area 4',                 'id' => 'widget-4',                 'description' => 'Widget Area 4.',                 'before_widget' => '
',                 'after_widget' => '
',                 'before_title' => '
',                 'after_title' => '
' ,         ) );          }      And this is how I call them.               <?php         if (! function_exists ( 'dynamic_sidebar' ) || ! dynamic_sidebar ( 'Widget Area 1' )) :          endif;?>      It is showing fine when I have one widget area but as soon as I add multiple ones it disappears from customizer.


title: Wordpress Central User Database

text: I run multiple Wordpress sites, I would like to centralize the users table so that users can access all the sites with a single username. Why do this? I run video communities What do I need? User X can access sites a b c d without registering to each website. The question is.. is it feasible? if so how? Can anyone please advice a better aproach of what do I need to achieve this.


title: Query child's child categories

text: I'm building a query to get the child's child categories. For example : I have a parent category named 'animal' and others like 'food' and 'sport'. I want to get animal's sub categories. I do :               $parent_cat = get_cat_ID( $cat_name );     $args = array(         'type'      => 'post',         'parent'    => $parent_cat,         'order'     => 'DESC'     );     $categories = (array) get_categories( $args );      And no problem, with a foreach I get my animal's sub categories. In my sub categories, I also have categories (this is a 3 levels hierarchy). I do the same :               $child_cat = get_cat_ID( $sub_cat_name );     $args = array(         'type'      => 'post',         'parent'    => $child_cat,         'order'     => 'DESC'     );     $sub_categories = (array) get_categories( $args );      And... it returns the others parents categories 'food' an 'sport'. Why that ? Where am I wrong ?


title: Can I use wpdb to insert query results into a post?

text: My website currently consists of content drawn from database queries, displayed with php. Specifically, there are 4 modules, each of which queries a different database to get all records that match the current date and display them in order. Is there a way to use wpdb to do similar queries and pull them into individual posts? The result I'm looking for is something similar to my current configuration: a WordPress site with only 4 posts, but the content within the posts changes depending on the date.


title: form to generate url

text: i have a form on my site to generate url and it works good but the user should wait until the whole page is loaded to be able to use it properly , i think that happens because i use window.onload and i should use $(document).ready instead of it , but i couldnt replace it i need someone to help me with it               <script type='text/javascript'>     window.onload = function() {     document.forms['filterform'].onsubmit = filterLoad;     };          function filterLoad() {     var     url,     colourSel = this.elements['department'],     shapeSel = this.elements['country'];          url = (colourSel.options[colourSel.selectedIndex].value)+(shapeSel.options[shapeSel.selectedIndex].value) ;           window.location.href = url;          return false;          }          </script>                         <form   id="searchform" name="filterform">     <select class="chosen" name="department" id="searchfield" >     <option value="http://www.mysite.com/">choise 1</option>     <option value="http://www.mysite.com/">choise 1</option>     </select>          <select class="chosen" name="country" id="choose">     <option value="?qatar=show&action=Filter">qatar</option>     <option value="?ksa=show&action=Filter">ksa</option>     </select>          <label for="search"><button  class="submit" onclick="filterLoad()"  /></button></label>          </form>


title: URLs unchanged after migration

text: I have my company's blog at http://blog.analytixsolutions.com and now I've moved it to http://blog.aixsol.com but I have the URLs still pointing to the former address. I used the commonly recommended search and replace plugin to change the URLs in the backend. I also fired the following queries in phpmyadmin without any success.               UPDATE wp_options SET option_value = replace(option_value, 'OLDURL', 'NEWURL') WHERE option_name = 'home' OR option_name = 'siteurl';          UPDATE wp_posts SET guid = replace(guid, 'OLDURL','NEWURL');          UPDATE wp_posts SET post_content = replace(post_content, 'OLDURL', 'NEWURL');          UPDATE wp_postmeta SET meta_value = replace(meta_value,'OLDURL','NEWURL');      What am I doing wrong here? This is the tried and tested technique I've used to migrate a lot many other sites prior to this.


title: How to update permalink on the fly?

text: So, Wordpress automatically generates the slug/permalink on the fly based on the post title after you click away from editing the title. Is there an action/filter hook for me to change those on the fly? Like, for example, if the title is "How to update permalink on the fly?", normally the slug would be "how-to-update-permalink-on-the-fly", but instead I want it to be "update-permalink-fly-1005364" (no propositions and added post ID). I know the slug is generated in the post.php somewhere but I don't want to modify core file. Please help and thank you.


title: Multisite domain mapping breaks CSS

text: I have set up a multisite (sub directories) and all my plugins/CSS was working fine. Then I added domain mapping and managed to point a domain `example.com` to a site ID 4. All still working fine. However, when I make `example.com` for site ID 4 'primary', the CSS seems to break. My plugins (e.g. responsive slider) no longer works, my CSS also. The moment I un-check the 'primary', all seems to work fine. Any ideas what could be happening?


title: Remove Adminstrator Hyperlink from a user having role to add and see users

text: I have create a user role using Advance Access Manager wordpress plugin having role to see, add and remove users name as site_admin. When user login with his Id he is able to see the adminstrator and edit his profile. I remove that thing by using this code. Remove Ability for Other Users to View Administrator in User List? But the problem is the 'Adminstrator' hyperlink is still there. I want to remove that 'Adminstrator' hyperlink and in 'All' hyperlink the total count should be all user except the Adminstrator. It shows `All(3) | Adminstrator(1)| Subscriber(1) | site_admin(1)` I want to remove 'Adminstrator' Hyperlink from this links and set count for 'All(2)'. Thanks in advance.


title: How do I add text in a shortcode?

text:
I think this might be an easier question but I can't figure it out. How can I add simple text inside a short code? For example:               $return_string .= '
'.read more.'
';      So, I don't just want to return text, but I want to return text and a link. I am using this shortcode to query the posts, but I want to add a "read more" link after each excerpt, but I cant figure out how to just add the text "read more." Any help would be appreciated!


title: Show only 1 term of a current posts taxonomy

text: I've been using this code to display the taxonomy term of the current post.               $terms = wp_get_post_terms($post->ID, 'custom_cat');     foreach($terms as $term){         print_r($term->name);         unset($term);     }      Which is fine, except now I have some posts with 2 or more terms associated with them and it's throwing off my layout. Is there a way that I can show only 1 of the terms?


title: Wordpress removing data attributes for scheduled post

text:
Hi I'm using the smarty templating engine in wordpress to generate HTML like the one below:

<input type="checkbox" class="ecom_compare_products" data-asin="B0009Y7APU" value="B0009Y7APU"/>

Case Logic JDS-2 USB Drive Shuttle 2-Capacity (Black/Blue)

      The problem is that it seems like Wordpress is removing the data attributes from this markup when the post is published. The markup above is what I actually got when I sent an email to myself.               $post_content = $smarty->fetch( 'product_detail.tpl' );          wp_mail('mymail@gmail.com', 'debug posting of products', 'content: ' . $post_content);          $post = array(         'post_title' => $item_name,         'post_content' => $post_content,         'post_type' => 'post',         'tags_input' => $amazon_keywords,         'comment_status' => $allow_comments,         'ping_status' => $allow_pingbacks,         'post_status' => 'publish'     );          wp_insert_post($post);      But when I edited the post that was published here's what I got:

         Case Logic JDS-2 USB Drive Shuttle 2-Capacity (Black/Blue)

      Its really weird. I don't have an idea how it turned out to be like this. But what's even weirder is that this only happens when the post is published using a scheduled event which I trigger by calling it from AJAX. The code for the mons_post_product is the actual publishing of the post.               add_action('ecom_scheduler', 'mons_post_product');          function ecom_schedule_event(){              wp_schedule_single_event(time(), 'mons_scheduler');     }          add_action('wp_ajax_schedule', 'mons_schedule_event');     add_action('wp_ajax_nopriv_schedule', 'mons_schedule_event');       When hook up the method in the admin_menu there's no problem:               add_action('admin_menu', function(){       mons_post_product();     });      Any ideas?


title: Ajax requests from front-end with jQuery Fancybox

text: I would like to be able to use the jQuery Fancybox's Ajax feature to request datas from the front-end. Here is a part of the code i'm using on the plugin part :               wp_localize_script( 'wpPluginjs', 'ajax_vars', array(                'url' => admin_url( 'admin-ajax.php' ),                'nonce' => wp_create_nonce( 'ajax-nonce' )             )     );      And on the js part :               var url = ajax_vars.url;     var nonce = ajax_vars.nonce;          $( "#list" ).fancybox({         maxWidth    : 800,         maxHeight   : 600,         openEffect  : 'none',         closeEffect : 'none',         title       : false,         type: 'ajax',         href: ajax_vars.url+'&nonce='+ajax_vars.nonce     });      But i actually keep having the following error when i click "#list" :               "NetworkError: 404 Not Found - http://mywebsite.com/wp-admin/admin-ajax.php&nonce=7bbd764db8"      I tried with a basic jQuery Ajax request and it worked like a charm. It seems that there is a problem with Fancybox, it's still unable to find the correct "`admin-ajax.php`" url. I also unsuccessfully tried to add `wp_localize_script()` to the `wp_enqueue_script(`) function that loads jQuery Fancybox. Any help would be greatly appreciated.


title: diginews theme, add image under navigation bar

text: I'm trying to add an image to the header under the navigation bar. I added the following line before at the bottom.               <img src="public_html/wp-content/uploads/2014/03/books300x200.jpg" height="80" width ="80">      and all i see is a broken image under the navigation bar. This is the site i am working on: samsarchives.com Am i trying to do it the wrong way?


title: Specific routing for CPT

text: I'm developing site for art gallery. A have Artist CPT (internal name artsin_artist) which is defined in my functions.php like following:               register_post_type('artsin_artist', array(         'labels' => $labels,         'public' => true,             'hierarchical' => false,             'supports' => array('title'),             'has_archive' => true,             'rewrite' => array('with_front' => true, 'slug' => 'artists'),             'publicly_queryable' => true,     ));      So i have good working archive http://artsindika.ru/artists/ and artist's page http://artsindika.ru/artists/arthur-ter-martirosov/ . Every artist has some number of works, works are not dedicated post type, but it is a simple associative array (i have used AdvancedCustomFields Repeater plugin for this feature). Now I need to have a page with following url structure artists/%artists_cpt_slug%/%work_index%. For example for second work of Arthur Ter-Martirosov i need to have following url structure: /artists/arthur-ter-martirosov/2. I tried to use a lot of recomendations about working with Wordpress rewrites, but i always have archive page as a result of routing. I mean that i need work_index query variable in my template to show approriate work. Now i am using following code for my rewrites:               function add_artists_query_vars($aVars) {         $aVars[] = "work_index";          return $aVars;     }          add_filter('query_vars', 'add_artists_query_vars');               function add_artists_rewrite_rule($aRules) {         $aNewRules = array('artists/([^/]*)/([0-9]+)?$' => 'index.php?post_type=artsin_artist&post_name=$matches[1]&work_index=$matches[2]');         $aRules = $aNewRules + $aRules;         return $aRules;     }          add_filter('rewrite_rules_array', 'add_artists_rewrite_rule');      Please tell me what I'm missing and what direction I need to move on?


title: Combine multiple custom field values into single value

text: I'm sure this is a fairly basic question but I can't seem to get it right. I have multiple custom field values for addresses in my custom post type and I want to save them as a single value or array so I can display them in one call rather than many. I would also like to output the address comma separated, but first need to preg replace any commas entered by the user in the wordpress backend so I don't end up with, for example, '10 high street,, London,, W11 1TT' I have this currently:               <?php global $post;     $address_name = get_post_meta( $post->ID, '_mfl_entry_address_name', true );     $address_street = get_post_meta( $post->ID, '_mfl_entry_address_street', true );     $address_line_2 = get_post_meta( $post->ID, '_mfl_entry_address_line_2', true );     $address_line_3 = get_post_meta( $post->ID, '_mfl_entry_address_line_3', true );     $address_postcode = get_post_meta( $post->ID, '_mfl_entry_address_postcode', true );     ?>      How would I put these into a single value called 'address', clean out any commas added by the user, then output the address with each value separated by a comma, except the last one? Thanks for any help


title: WordPress Ignoring My Custom Post Type Templates?

text: WordPress is 404ing all of my Custom Post Type posts. Have I missed a step here? I’m using the following to set up my CPT:               function custom_post_types() {         register_post_type(         'creativework',         array(           'labels' => array(             'name' => _x('Works', 'post type general name'),             'singular_name' => _x('Work', 'post type singular name'),             'add_new' => _x('Add New', 'Work'),             'add_new_item' => __('Add New Work'),             'edit_item' => __('Edit Work'),             'new_item' => __('New Work'),             'all_items' => __('All Works'),             'view_item' => __('View Work'),             'search_items' => __('Search Works'),             'not_found' =>  __('No Works found'),             'not_found_in_trash' => __('No Works found in Trash'),              'parent_item_colon' => '',             'menu_name' => __('Works')           ),           'public' => true,           'menu_position' => 5,           //'rewrite' => array('slug' => 'work'),           'supports' => array('title', 'editor', 'thumbnail'),           'has_archive' => 'true'         )       );     }          add_action( 'init', 'custom_post_types' );      I originally had an underscore in the type (`creative_work`), rewriting the slug to just be “work”, but I had no idea which permutation WordPress would use to find the template—I tried file names like `single-creative_work.php`, `single-creativework.php`, `single-work.php`, all under `themes/roots/` (I was using Roots as a baseline theme), with the contents:               <?php get_template_part('templates/content', 'work'); ?>      But `themes/roots/templates/content-work.php` was never displayed. Instead it seemed that `themes/roots/page.php` was being served up? When I manually edited `page.php` to `get_template_part('templates/content', 'work')` as a test, it seemingly used the template I wanted but then it had the post ID or something wrong where it was displaying the homepage for ANYTHING under `website.com/creativework/`. In an attempt to eliminate all possible conflicts, I deactivated Roots in favor of Twentythirteen, and disabled all plugins except one, the one I wrote to set up the CPT (code at the top). Now, whenever I hit `website.com/creativework/` or `website.com/creativework/post-title` (following the permalink from “View Work” in the post editor, or in Search results), I get a 404 instead of the homepage, despite both `single- creativework.php` and `archive-creativework.php` existing under `themes/twentythirteen`. **EDIT:** `website.com/?creativework=post-title`, however, works. I am hopelessly confused by all this. What is the correct, foolproof way to set up a custom post type template, step-by-step? Ideally I want to know how to do this in Roots, but for now I will settle on just how to get it working at all.


title: How to write RewriteRule for login in multisite

text: In my wp multisite mysite.com, I want any login request to be sent to my custom login page at mysite.com/login. I found this rewrite rule:               RewriteRule ^(.*)/login/$ http://mysite.com/login/ [L]      It works, but it does not send the user back to the previous page after login. The previous page could be on mysite.com or mysite.com/subsite1. Thanks


title: Custom Post type registering as page post type

text: I'm having trouble getting my custom post type to correctly register. It seems to be identifying as a page post type and using that template. I also can't access the archive page for it. Any idea on what's wrong?               add_action( 'init', 'register_cpt_women' );          function register_cpt_women() {              $womenLabels = array(              'name' => _x( 'The Women', 'women' ),             'singular_name' => _x( 'The Women', 'women' ),             'add_new' => _x( 'Add New', 'women' ),             'add_new_item' => _x( 'Add New Woman', 'women' ),             'edit_item' => _x( 'Edit Woman', 'women' ),             'new_item' => _x( 'New Woman', 'women' ),             'view_item' => _x( 'View Woman', 'women' ),             'search_items' => _x( 'Search Women', 'women' ),             'not_found' => _x( 'No women found', 'women' ),             'not_found_in_trash' => _x( 'No women found in Trash', 'women' ),             'parent_item_colon' => _x( 'Parent Woman:', 'women' ),             'menu_name' => _x( 'The Women', 'women' ),         );              $womenArgs = array(              'labels' => $womenLabels,             'hierarchical' => false,             'description' => 'The Women Listing',             'supports' => array( 'title', 'editor', 'thumbnail' ),             'public' => true,             'show_ui' => true,             'show_in_menu' => true,             'menu_position' => 6,             'menu_icon' => '/wp-content/themes/ssekoDesigns/assets/img/ico-jobs.png',             'show_in_nav_menus' => true,             'publicly_queryable' => true,             'exclude_from_search' => false,             'has_archive' => true,             'query_var' => true,             'can_export' => true,             'rewrite' => true,             'capability_type' => 'post'         );              register_post_type( 'women', $womenArgs );          }


title: How to analyze wordpress plugin performance

text: Is there any plugin that I can use to determine the performance of the plugin that I'm writing? I'm currently checking out the following plugins to determine any problems that might cause low performance:   * cron-view   * log deprecated notices   * p3 profiler   * core-control But what I want to do is to be able to log how much time a method takes before it returns a value. The plugin that I've created is heavy on API access so I'm trying to cache everything that can be cache in the database and on the file system using the transients API. Is there a plugin that can do this? how can I do this using the functions available in PHP? **Update** There's this PHP function called `microtime()` and it seems like the one that I need, but is there any way I can hook it up in Wordpress without having to do something like the function below on every function in the plugin?               public function fetch_data(){       $start = microtime(true);       $query->amazon($params);       $time_spent = microtime(true) - $start;       //log to file     }


title: How to automatically register widgets on new blog?

text: Is there a way to automatically register widgets when a new site is registered with a multi site setup? E.g. inside `wpmu_new_blog`?


title: Decreasing the Memory Consumption of a WordPress Site?

text: The test site requires a lot of memory when viewing some category/archive pages. I met with the following error messages yesterday: > Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to > allocate 48 bytes) in /var/www/t/wp-includes/load.php on line 552 > > Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to > allocate 40 bytes) in /var/www/t/wp-includes/meta.php on line 307 The problem was solved by adding the "define('WP_MEMORY_LIMIT', '210M');" line to the wp-config.php file. But this is not good enough. The production site will have much more data than the test site, which means I have to add the "define('WP_MEMORY_LIMIT', '2100M');" line to the wp-config.php file. And 2100M may not be large enough as the time goes by. How to decrease the memory consumption of the WordPress site dramatically? Any help is appreciated.


title: Wordpress loading index page instead of archive.php

text: I have               index.php     archive.php     ...      When I go to domain.com, it loads index.php, which is expected. But, when I go `www.domain.com/page/2/`, it loads the correct posts (as in, the posts in the second page), but uses in **index.php template**. I want to load the **archive.php template**. How is this achievable?


title: Putting two themes together to create a complete site

text: I know my way around WP as probably an intermediate user. In the near future, I will have to integrate the design of a template from a completely different theme into a theme I'm currently using. The idea is to keep the look of the front page of one theme the same, and the use the design of another theme's regular blog post pages -- and sort of hack them together. My question is the following: Would the best course of action be the following:   1. Define a new template page in the preexisting theme and copy the code from the other theme's template page across to that;   2. Check for any associated files (e.g. header.php/footer.php, rename them so as not to interfere with the theme's preexisting files), copy them across, and then change the names of the links in the template page accordingly;   3. Obviously copy the stylesheet, JS and any associated images across. Or is there a better way to do this? Many thanks.


title: Shortcode Displaying Custom Post Types

text:
I have a problem with a shortcode that I'm creating. I have 5-10 different custom post types, and rather than creating a template for every individual post type, Id rather use a normal page and import the posts via a shortcode. So to explain further, I have a page called Attractions and a post type called 'Attraction'. On the page I insert the shortcode -> [feed type="attraction" limit="5"] This outputs all the posts under the custom post type "attraction". The problem I'm having, is getting it to paginate correctly. Ive read a thousand ways to paginate custom post types, and the code I'm currently using tends to work according to so many people, however I cannot get this to work inside the shortcode. Is there a reason for this? Currently the page displays fine, with five posts, but doesn't echo the next, previous posts links. If I type in the url + /page/2 the second page correctly displays with the next 5 posts in the section. So it seems pagination is working, however I cant access them because no Next/Previous Link appears. The benefit to doing it this way, is that I can use a normal page, import the posts, and I can include content above and below the shortcode called in. Hope this all makes sense. Heres my shortcode code -->                   function section_feed_shortcode( $atts ) {         extract( shortcode_atts( array( 'limit' => -1, 'type' => 'post'), $atts ) );              global $paged;         $q = new WP_Query(  array (              'posts_per_page' => $limit,              'post_type' => $type,              order => 'ASC',              orderby =>'menu_order',              'paged' => $paged ) );              $list = ' ';              while ( $q->have_posts() ) { $q->the_post();                  $list .= '
'              . '
'              . '
' . get_the_title() . '
'              .'
' . get_the_excerpt() . '
'             . '' . 'View »' . ''             . '
'             . '' . get_the_post_thumbnail($page->ID, 'listing-thumb')  . ''             . '
';         }              return          '
'          . $list          . '
' . next_posts_link( __( '← Older posts' ) ) . '
'         . '
' . previous_posts_link( __( 'Newer posts →' ) ) . '
'         . '
' .         wp_reset_query();          }     add_shortcode( 'feed', 'section_feed_shortcode' );


title: Website in multiple Language

text: I want to make Sit in Wordpress in which I want to make content in ENglish and Gujrati Language . WHen Admin create a Page in English at that time Admin want to create content with Gujarati Language. Then what I need to do? Please Help


title: Given two custom post types: Automatically add meta fields from one custom post type to another

text: Custom post type "Company" has:   * Restaurant name field   * Restaurant description field   * ..and other more fields Custom post type "Restaurant" has:   * Restaurant name field   * Restaurant description field How can I make it so that whenever I add a new Company (the restaurant fields are filled out), it will automatically add a new Restaurant whose fields/details are the same with the newly added Company? My idea is:   * Whenever I create a new Company, I will add the restaurant details to a "restaurants" table in the database   * Also, whenever I create a new company, I will get the latest entry from "restaurants" table and somehow append them to create a new Restaurant post Is this even possible? If not or if you have another idea to solve the problem, please share. Feel free to suggest multiple plugins if they manage to get the job done. Providing an example would be extremely helpful. Thanks!


title: NextGEN Gallery: how to get URL to change when you click next <!--nextpage-->

text: I want something that works like the Wordpress next page tag `<!-- nextpage-->`. That is, when someone clicks the next URL would change to something like: > >     www.test.com/galleries/goodimage1 >     www.test.com/galleries/goodimage2 >   My ultimate aim is something like this: zimbio.com/photos/Kristen+Stewart/Twilight+Saga+Breaking+Dawn+Part+2+San+Diego/52ERwSDaFIF, but I am not sure where to start.


title: read more doesn't display

text:
I have been reading in the codex about the read more issue. It says when using the_excerpt, the character limit is 55 and then the _read more_ should display which should look like this [...] I am not seeing that in my excerpt. I have also tried several filters for testing.               function custom_excerpt_length( $length ) {         return 20;     }     add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );          function new_excerpt_more( $more ) {         global $post;         return 'ID) . '">Read the full article…';     }     add_filter('excerpt_more', 'new_excerpt_more');      Neither of them work. I found that if I post the information in the content and use the more button which makes the `<!--more-->` then I see a link for the more button. I don't want to have to push that every time. So I looked up some posts on here but didn't find anything that helped. So I was wondering if I am doing something wrong in my query.               // The Query     $the_query = new WP_Query( array( 'category_name' => 'news', 'order' => 'ASC'));          // The Loop     while ( $the_query->have_posts() ) :         $the_query->the_post();         global $more;         $more = 0;         ?>
<?php                 if ( has_post_thumbnail() ) {                     ?>
<?php the_post_thumbnail('news'); ?>
                 <?php } ?>                                   <?php the_title(); ?>                                  <?php the_date(); ?>                                      <?php if( has_excerpt()){                             the_excerpt();                     } else {                             the_content('Read More');                      } ?>
      <?php         endwhile;         // Restore original Query & Post Data         wp_reset_query();         wp_reset_postdata(); ?>      All my research says that the filters should work or adding stuff into the content should work. Things like:                the_content( 'Read More' );      Is there something I am missing? I want to get the excerpt working so that I can limit the word count and automatically insert the read more link.


title: Setting multiple default background images?

text: The following code lets me set a default background image. Is it possible to set multiple custom backgrounds?               add_theme_support( 'custom-background', array(         'default-image' => get_stylesheet_directory_uri() . '/images/image1.png',        ) );


title: WPAlchemy MediaAccess "Add Media" button opens new page instead of pop up

text: I'm using WPAlchemy for a custom meta box that lets you upload media. however the "Add Media" button is taking me to the "add media files to your computer..." as a new page (as if it were just a regular link) instead of opening as a pop-up on the same page. I tested my media upload button in a regular post situation and it popped up.


title: To generate Flickr Gallery in my wordpress site which plugin to use

text: recently I've checked some of the plugins that generate album from flickr photos but most of them don't work. Here is my purpose: I want to display images that are hosted in my flickr account. Suppose, I went to a tour. Now I want to show my readers those photos as a gallery. Not all the photos from the photostream will be included, only those which are seperated by tags or somehow. I hope you've understood my problem. Now, which plugin to use (it has to be free btw)? I'm almost get tired checking most of the available plugins and finding not working on the latest wordpress. So, I need your help. If there's no possible way to fetch photos from flickr now, is there any other way to host my photos on different location and then creating gallery in my wordpress site? Please make sure that it goes fine with the current version of wordpress software.


title: Custom Post Title as search term

text: is there any way to include custom post title as search term. I create custom post types - VHS, DVD, Blu Ray. Then in search box when I write DVD I want to list all posts from custom post type DVD. Thank you all in advance :)


title: Auto complete search engine plug-in

text: I have a wordpress website template that has 2 search engines. It's a yellowpages like website with the "What" and the "Where". Is there any way this would work on both? and Have the "what" list only the categories and the "where" just list the cities and such?


title: Bulk editor is deleting/removing custom taxonomy

text: I'm trying to modify a bulk editor function to accomplish two things:   * Stop the bulk editor from removing existing post taxonomies (these are custom taxonomies, in this case stock market tickers associated with a post) when post is updated via bulk edit.   * Make sure the bulk editor keeps the existing post taxonomies   * Remove the box to edit the custom taxonomies altogether.  I don't think this is a meta issue, because doing any of the meta/bulk edit hooks have gotten me nowhere. Here's an image of what I'm talking about: ![enter image description here](http://i.stack.imgur.com/phefN.png)


title: wp.media update options and force render on uploader

text: Elliot here from the "Advanced Custom Fields" plugin. I'm working on integrating the new WP 3.5 uploader into the ACF plugin and can't find much documentation about the new uploader at all! Creating an uploader frame is easy, that can be done like this:               // Create the media frame.     acf.media = wp.media({         title : 'title',         button : {             text: 'button',         },         multiple: true     });      However, what if you want to change multiple to false and for another field? Basically, I would like to create only 1 wp.media object, but then update the options when needed (when you click "upload image", etc) and force a render refresh on the uploader. I've played around with stuff like this:               acf.media.title.get().refresh()      But that doesn't work... Any help will be greatly apreciated Cheers Elliot


title: Text snippets shared across posts

text: I'd like to add a "fast facts" section to a wordpress site - an area in the sidebar where snippets of text are rotated. Where is the best place to store things like this? Widgets don't really allow repeated items grouped in a good way & i don't want to add a post type as that would be available as a page with a URL