Why in this archive page that call query_posts() function show only the last 10 posts?

I am pretty new in WordPress theme development and I am finding 2 problem with this **posts archive page** : http://lnx.asper-eritrea.com/archivio/ The previous page have to show ALL the blog posts into an unordered list. The main problem is that are shown only the last 10 published posts. The other problem is related to the warning caused of an erroneus call to the **query_posts()** function. This is the PHP code that generate the posts loop:               <?     // get the term using the slug and the tag taxonomy     //$term = get_term_by( 'slug', 'featured', 'post_tag' );     // pass the term_id to tag__not_in     query_posts();     ?>               <?php     if (have_posts()) :         echo '
';         // Start the Loop.         while (have_posts()) : the_post();                  /*              * Include the post format-specific template for the content. If you want to              * use this in a child theme, then include a file called called content-___.php              * (where ___ is the post format) and that will be used instead.              */                  echo '
';             get_template_part('contentArchive', get_post_format());             echo '
';              endwhile;         echo '
';          else :         // If no content, include the "No posts found" template.         get_template_part('content', 'none');          endif;     ?>      So why the previuos loop show only the last 10 records? How can I fix it and show all the blog post? What can I do to fix the **query_posts()** call? I think that maybe the 2 problems are related togheter because maybe I have to use a paramether to say to show all blog posts.


Clicking on a new blog post shows the homepage

I'm a newbie to WP and have recently come upon an issue after installing the plugin WP Permastructure. When I click on new blog posts, the static homepage is displayed. However, clicking on posts created prior to installing the plugin do NOT take me to my homepage and instead display the correct content. I've tried uninstalling the plugin (to no avail). The blog page works fine in the 2010 theme, however (I'm using a custom theme). Any and all suggestions are appreciated, thanks for the time.


Get next and previous page of paginated post

A lot of a site I'm creating for a client is going to be posts with different pages for posts like "Top 10 " etc. This means I need to paginate the posts to create different pages. The best way I've found to do this is by using `<!-- nextpage-->` in the content to separate the post up and create the pages. To navigate through the pages, I've tried to use `get_pagenum_link`. There is here my full code:               function postPagination() {         global $paged;         $paged = (get_query_var('page')) ? get_query_var('page') : 1;         $output .= "
";             $output .= "Previous Page";             $output .= "Next Page";         $output .= "
";         return $output;     }      I have two main problems:      1) The links are in the form `http://domain.dev/2014/03/03/post- title/2/page/2`, which returns 404. Also, if I press the Next Page link, it will return `/post-title/2/page/3`, i.e the /page/3 part is correct but it's still on page 2. If i go to `/post-title/page/3` or something, it will just redirect back to the first page. `/post-title/3/` works fine. I'm assuming this is something to do with permalinks.      2) The Previous Page code doesn't work at all, it just returns the Current page link, e.g if you're on page 2, the Previous Page link will return `/post- title/2/`. i.e it doesn't even have the `/page/2` bit on the end. Sorry if that's confusing, happy to answer any questions and re-explain if necessary. I should also mention that this code is a function which is in functions.php and will be called in content pages. Thanks for any help in fixing my two problems so the Previous/Next links work correctly:)


wp_enqueue_style for Plugin with multiple stylesheets

I'm making a navigation plugin which adds animations to your wordpress navigation. I read in Wordpress Codex that I would need to use wp_enqueue_style(). First, How do I use this code for multiple css files? in my main plugin file. Now according to this question, I would add stylesheets like this:               function add_my_stylesheet()      {         wp_enqueue_style( 'myCSS', plugins_url( '/css/myCSS.css', __FILE__ ) );     }          add_action('admin_print_styles', 'add_my_stylesheet');      Since my plugin requires multiple stylesheets to be added, which of the two codes should I use?               function add_my_stylesheet()      {         wp_enqueue_style( 'myCSS', plugins_url( '/css/myCSS.css', __FILE__ ) );     }          add_action('admin_print_styles', 'add_my_stylesheet');          function add_my_stylesheet1()      {         wp_enqueue_style( 'myCSS1', plugins_url( '/css/myCSS1.css', __FILE__ ) );     }          add_action('admin_print_styles', 'add_my_stylesheet1');      Or               function add_my_stylesheet1()      {         wp_enqueue_style( 'myCSS1', plugins_url( '/css/myCSS.css', __FILE__ ) );         wp_enqueue_style( 'myCSS1', plugins_url( '/css/myCSS1.css', __FILE__ ) );     }          add_action('admin_print_styles', 'add_my_stylesheet1');      Now I know where to add this code. But how do I call the stylesheet I want to use? Also, just to clear what my plug would do: The main plugin file would only load the stylesheet required. And the options page would allow the user to select which of the stylesheet to require. for example, in php format I would use the following:               <link href="nav-<?php echo $name; ?>.css">      The $name should be the one selected from the options page, but how do I call in the required stylesheet? I hope my question is clear enough.


standard post with extra parameter brings permalink problem

This problem concerns several rewrite rules, but i'll stick to one, for clarity. In my theme, i use a parameter "parentid" which gives me the page/post/custom post i've clicked on (the parent). **in content.php** instead of               <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?>      i put               <a href="<?php the_permalink(); ?>&parentid=30" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?>      In this example i arbitrarily set parentid=30, in my code,i would have a value retrieved by get_query_var('p') for instance. **in functions.php**               //I declare the custom query var     function add_query_vars($query_vars)     {         $query_vars[] = "parentid";          return $query_vars;     }     add_filter('query_vars', 'add_query_vars');      and **in header.php**               $parentid = get_query_var( 'parentid');      So in my case, i have links like               ?p=12&parentid=30      using permaling rewriting, how to add the custom parameter "parentid" ? I tried               function wp_insertMyRewriteRules($rules)     {         $newrules = array();         $newrules['([^/]+)/([^/]+)$'] = '?p=$matches[1]&parentid=$matches[2]';         return $newrules + $rules;     }     add_filter('rewrite_rules_array','wp_insertMyRewriteRules');      but "obviously" it doesn't work. With that rule, the url becomes               /wordpress/nom-de-l-article/&parentid=30/      instead of               /wordpress/nom-de-l-article/30/      In fact, in this case, the generic rewrite rule is applied my rule is ignored because using the plugin Monkeyman Rewrite Analyzer, my rule, first in the list, has the parameter "p" crossed with the comment : this query variable is not public and will not be saved My questions :   * what rule should i write, to take into account this custom parameter for a "standard" post (?p=xx&parentid=yy)    * Why parentid is not retrieved when the rewrite is active ? if i echo get_query_var( 'parentid'); without rewrite i get "30" but with rewrite, i get "&parentid=30" !


WP welcome email depending on user role

I'm looking for a way to customize the welcome email, ONLY for new users with a certain role. (I use the Gravity Form User Registration Add-On to allow visitors to vote, thereby registering as "Voter".) I've managed to customize the email for all new users:               function customize_activation_email_voter($message) {     return 'To confirm your vote, click on the following link: %s';     }     add_filter('wpmu_signup_user_notification_email', 'customize_activation_email_voter', 20, 2);      But not for only "Voters". One problem is that there is no regular user metadata stored in the WP database yet, because technically, the user is not yet a user - that happens only after activation (in my case, confirmation of the vote). Is there a way to get the user's role before the activation of their account?


Large image size stuck on old value, even for new images

I changed the 'Large' image size in Settings > Media > Image Sizes from the default to max-width 586px. That was wrong, so I changed it back to max-width 1024px. However, the smaller size seems to have stuck. When I upload new images now, the size option for Large is 586px wide, even if the image is larger than that (e.g. 1600 x 2133) Wordpress version is 3.7.1 I have some custom image sizes, which were working correctly before I changed the Large size, and now will not insert as any larger than 586px wide. Here's the relevant section in functions.php for the custom image sizes:               if ( function_exists( 'add_image_size' ) ) {          add_image_size( 'top-stories-home', 1014, 672, true );         add_image_size( 'full-width-desktop', 576, 9999 );         add_image_size( 'text-wrapping', 350, 9999 );     }     add_filter( 'image_size_names_choose', 'my_custom_sizes' );     function my_custom_sizes( $sizes ) {         return array_merge( $sizes, array(             'top-stories-home' => 'Home Top Stories',             'full-width-desktop' => 'Post Photo wCaption',             'text-wrapping' => 'For Wrapped Text'         ) );      }      Here is a screenshot of the Dashboard: ![Media Settings Image Sizes](http://i.stack.imgur.com/5XPxz.png) And here is a screenshot of the dialog you get when you click 'Add Media' inside a post: ![Attachment Details](http://i.stack.imgur.com/gOYsn.png)


How can i show pagenavi in my author.php?

With this query in author.php i show all posts from a specific author_id/name/slug. But the problem is when i set the minimum of posts to show in the page. I have tried with posts_per_page= but if i set for example 6(for show last 6 posts) and i put my pagenavi code at the end of the foreach, i can't see the pagenavi. And also another problem is that it count the six posts only for a specific blog_id and not for all blogs_id. This is my code:                        <?php        $original_blog_id = get_current_blog_id(); // prendi blog corrente        $bids = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); // inserisce l'ID nell'Array            foreach($bids as $bid):            switch_to_blog($bid); //switch             ?>                                     <?php                 $posts = get_posts('author='.$curauth->ID.'&posts_per_page=6');            foreach($posts as $post): setup_postdata($post);            ?>               <?php     endforeach ;          switch_to_blog( $original_blog_id ); //switched back to current blog     ?>                    </ul>                    <!-- End Loop -->     <?php wp_reset_query(); ?>         <?php if (function_exists ('wp_pagenavi')) {wp_pagenavi ();};?>                          <?php get_sidebar(); ?>          <?php get_footer(); ?>


WP Debug set to true but still wsod

I'm trying to do my first wordpress plugin, and I've added this on my wp- config.php               define('WP_DEBUG', true);          define('WP_DEBUG_LOG', true);          define('WP_DEBUG_DISPLAY', false);      but i still have white screen of the dead...


WordPress site front page fails to load in IE

_Disclaimer: I'm a front-end guy dabbling in back-end work._ I have WordPress serving up a company Intranet site on a CentOS VM in a multiple vhost setup (LAMP). It resides at `http://intranet.domain.com/` and is only accessible inside our network. The site has been working well in Chrome and Firefox, but for some reason, the front page fails to load in IE for a few users. They can get to other parts of the site (i.e. `http://intranet.domain.com/news/`) by appending the path to the URL... and those pages load just fine. Up until today, it's only affected a few other people in our company. Today, it's finally showing itself on my machine - so I can **finally debug it!** ## DNS Config at the moment DNS Config shot   1. Using Windows Server 2008 DNS.   2. Research led me to create a new Forward Lookup Zone called `intranet.domain.com`.   3. I was directed to create an unnamed A record that pointed to the the IP of the CentOS box. ## Apache vhost config Intranet vhost config shot ## Troubleshooting **IE 11, Win 7 x64.**   1. Open IE w/ `http://intranet.domain.com` set as homepage. Fails to resolve.   2. Refresh. Still nothing.   3. Append `/news/` to URL and the page loads without issue.   4. Click home link. Fails to resolve.   5. Pings to `intranet.domain.com` return from proper internal IP: 192.168.50.89.   6. Test in Chrome & Canary... `intranet.domain.com` **Loads w/o issue**.   7. Test in Firefox & Aurora... `intranet.domain.com` **Loads w/o issue**.   8. Test `http://capsule.domain.com` in IE (setup the same way intranet is in DNS)... loads w/o issue.   9. Notice that it redirects to `http://capsule/wp-admin/`...   10. Test `http://intranet/` in IE. Loads!   11. Close IE, open IE (`intranet.domain.com` still set as Home)... Fails.   12. Config IE to open `http://intranet/` and `http://intranet.domain.com/` in two tabs at startup.   13. Close IE, open IE ... FQDN tab fails. `http://intranet/` LOADS. ## What gives? Anyone encountered anything like this? * * * ### Update (3/5) Looks like opening the site in IE's **InPrivate** mode at the fqdn works. Then, closing IE and reopening it normal mode and all is well. Stumped as to why this is... but that _workaround_ has gotten the affected users into the site successfully.


Fixing plugin for wpdb::prepare

A previous developer created a plugin for a website I manage and everything seems to work okay, except I'm getting the error "Missing argument 2 for wpdb::prepare()". I understand that the arguments need to be added, but I'm not clear how to add them in to this specific code, or what arguments to add in this case. The code is below. Any pointers would be amazing. The error comes up after the fourth closing curly bracket, before "$judges =". It seems also like the query should now be $wpdb->prepare, but again, I'm not clear in this instance how to implement that into this code. UPDATE: Apologies, but I am a big bone-head. The code below is the real code from the plugin. I had looked at the wrong line of code previously.               $categories = $wpdb->get_results($wpdb->prepare(sprintf("SELECT c.categoryid as id, c.name, c.public, COUNT(jc.categoryid) as submissions FROM ".$wpdb->prefix."judge_category c LEFT JOIN ". $wpdb->prefix. "judge_submission_category jc ON jc.categoryid = c.categoryid %s GROUP BY c.categoryid %s",$_where, $_order)));      Based on the feedback already provided, I'll see if I can make it work now and I'll post the correct answer once I figure it out, unless anyone else spots it first.


Post curl function save twice using plugin hook function wordpress

when i save a data with my curl function using hook to save a data twice.               public function __construct() {                 add_action('init', array(&$this, 'init'));                 add_action('admin_init', array(&$this, 'admin_init'));                 add_action('admin_menu', array(&$this, 'add_page'));                 add_action('admin_notices', array(&$this,'socipilot_admin_notice') );                 add_action('admin_bar_menu', array(&$this, 'socipilot_adminbar_links' ), 1001 );                 add_action('add_meta_boxes', array(&$this, 'add_meta_box' ) );                 add_action('admin_enqueue_scripts', array(&$this,'socipilot_enqueue_scripts'));                       add_action('save_post', array(&$this, 'save'));                 //add_action('publish_post', array(&$this, 'save'));                 //add_action('edit_post', array(&$this, 'save'));                 //add_action('pre_post_update',array(&$this, 'save'));                      add_filter('plugin_action_links_'.SOCI_PILOT_PLUGIN_BASENAME, array(&$this,'ts_add_plugin_action_links'));                 // Listen for the activate event                 register_activation_hook(SOCI_PILOT_FILE, array(&$this, 'activate'));                 // Deactivation plugin                 register_deactivation_hook(SOCI_PILOT_FILE, array(&$this, 'deactivate'));             }                             public function save($post_id) {                    global $post;                                   // Autosave, do nothing                         if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )                                  return;                         // AJAX? Not used here                         if ( defined( 'DOING_AJAX' ) && DOING_AJAX )                                  return;                         // Check user permissions                         if ('post' == $_POST['post_type']){                             if ( ! current_user_can( 'edit_post', $post_id ) )                             return;                         }                          // Return if it's a post revision                         if ( false !== wp_is_post_revision( $post_id ) )                                 return;                                   // Check if our nonce is set.                     if ( ! isset( $_POST['socipilot_inner_custom_box_nonce'] ) )                     return;                      $nonce = $_POST['socipilot_inner_custom_box_nonce'];                              // Verify that the nonce is valid.                 if ( ! wp_verify_nonce( $nonce, 'socipilot_inner_custom_box' ) )                     return;                             if(isset($_POST['soci-pilot'])):                             $all_sociuser_posts = $_POST['soci-pilot'];                             foreach ($all_sociuser_posts as $key=>$val){                                 $mydata[] = sanitize_text_field($key);                             }                                  if(!empty($mydata)):                                           $mydata1 = get_post_meta( $post->ID, '_socipilot_meta_value_key', true );                                      if(!empty($mydata1)):                                     $update_soci = array_unique(array_merge($mydata1,$mydata));                                     update_post_meta( $post_id, '_socipilot_meta_value_key', $update_soci);                                 else:                                     update_post_meta( $post_id, '_socipilot_meta_value_key', $mydata);                                 endif;                                      update_post_meta( $post_id, 'soci-pilot_account_type', $_POST['soci-pilot_account_type']);                                 update_post_meta( $post_id, 'soci-pilot_schedule_date', $_POST['soci-pilot_schedule_date']);                                      $options = get_option($this->option_name);                                       $data[].= implode(',',$mydata);                                  $data[].= get_permalink($post_id);                                  $data[].= $_POST['post_title'];                                  $data[].= wp_get_attachment_url(get_post_thumbnail_id($_POST['post_ID']));                                  if($_POST['post_excerpt']):                                     $len = strpos(substr(strip_tags($_POST['post_excerpt']),25,100),'.')+1;                                     $data[].= substr(strip_tags($_POST['post_excerpt']),0,25+$len);                                  else:                                     $len = strpos(substr(strip_tags($_POST['post_content']),25,100),'.')+1;                                     $data[].= substr(strip_tags($_POST['post_content']),0,25+$len);                                 endif;                                      $data[].= $_POST['soci-pilot_account_type'];                                      if($_POST['soci-pilot_post_is_auto']=='Y'){                                     $data[].= "";                                 }else{                                     $data[].= $_POST['soci-pilot_schedule_date'];                                 }                                      if(($options['public_key']!="")&&($options['private_key']!="")):                                     $res = actionTest($options['public_key'],$options['private_key']);                                      $error_id = $res['error'];                                 else:                                     $error_id = 1;                                 endif;                                      if($error_id==0 && isset($res)):                                     $res = actionPosttest($options['public_key'],$options['private_key'],$data);                                     if($res->error==1){                                          global $my_error;                                          echo $res->msg;                                     }                                 endif;                             else:                                 //add_post_meta($post_id, '_socipilot_meta_value_key', $mydata, true);                                 update_post_meta( $post_id, '_socipilot_meta_value_key', $mydata);                             endif;                       else:                                   $update_soci = get_post_meta( $post->ID, '_socipilot_meta_value_key', true );                             update_post_meta( $post_id, '_socipilot_meta_value_key', $update_soci);                       endif;                            return;                 }


get_query_var['s'] not working

When I use transposh plugin `get_query_var('s')` returns me blank. But I can get value of s by using $_GET['s']. So, my search functionality has been stopped. How can I resolve this issue?


adding a dashboard widget for multisite

I would like to add a dashboard widget for a WP multisite and need to include/require a php file from a directory in my root. I combined a couple of things together that I found on different websites and it works, but I don't know php very well so I'm just checking to see if there is a better way to write the php include part especially if it causes problems with security/performance.               function andym_dashboard_widget_1() {         wp_add_dashboard_widget(                      'andym_dashboard_app_widget',         // Widget slug.                      'Test Widget',                               // Title.                      'andym_dashboard_widget_1_function'   // Display function.         );     }     add_action( 'wp_dashboard_setup', 'andym_dashboard_widget_1' );     function andym_dashboard_widget_1_function() {      $path = $_SERVER['DOCUMENT_ROOT'];        $path .= "/myfolder/myfile.php";        include_once($path);     }      ` Thanks in advance


Limit top level menu items on wp_nav_menu

I've got a situation where I need to limit the top level menu items on a custom menu. The design only has room for 4 fixed width items, and I want to future proof it from displaying more. Looking at Is there a way to limit the number of top level items in a custom menu?, the answer referred to using `wp_nav_menu_items`. Unfortunately, looking through the wordpress.org forums and various blog posts, I can only examples that add items, and nothing that removes them. When I echo out `$items`, I only receive a list of each menu item in it's full html. I'm not good enough with regex to figure out how to set a limit to stop after 4 items (and am not sure if that's actually possible with regex anyway). I have also tried just using css to hide all remaining items through `overflow:hidden`, but that also hides the dropdowns, so that isn't an option either. Is there any way I can limit top level items through my custom `wp_nav_menu`?


How to list out post category name and description in page

I want to display this all categories and description in home page and for each category the division will be like this: Category name **Category Description** Link to particular Categories post. Help me that how to list out my categories name & in description how to add the tag in wordpress?


PHP Syntax getting PHP terms

I'm trying to figure out the php syntax here, so I can show only related products that are of the current taxonomy term. I would like the $args filter 'product_brand' to dynamically grab the current products term. So I need a method of getting the slug for the current product term. I've tried this but it's not working, and is returning more than one term. `$mjrelatedproducts = get_brands( $post->ID )->slug;`               $args = apply_filters('woocommerce_related_products_args', array(         'post_type'             => 'product',         'ignore_sticky_posts'   => 1,         'product_brand'         => $mjrelatedproducts,         'no_found_rows'         => 1,         'posts_per_page'        => $posts_per_page,         'orderby'               => $orderby,         'post__in'              => $related,         'post__not_in'          => array($product->id)     ) );


How to grab a specific page of content from paginated post?

In my case I've got to create articles where each article has a custom, unchanging "header" part far too rich for the title and the excerpt (it's to contain image, media etc), and then a few different pages of content. I've decided to do this using `<!--nextpage-->` to keep it lightweight and easy for whoever will create the pages - treat the first page as the unchanging header and attach page 2, 3, 4 under a fixed set of links - an custom menu generated in that category, replacing standard pagination "Page 1 2 3 4" links. In order to do that, I'll have to call `the_content()` twice; once for page 1, and once for whichever page is chosen through the dedicated menu. Except I have no clue how to make `the_content()` extract _n_ -th page, other than through appending / _n_ / to the URL. Is there some variable, function, plugin, modification to the code that lets me extract a specific page of paginated post?


Javascript not loading on certain page

My Javascript doesn't seem to get called on this page called news, this uses the default post custom type in wordpress. Every other page that uses's this javascript is a custom post type I've implemented, I've got an idea of what's causing it and thats the if conditional at the top, but I've tried removing !is_home and it still doesn't load the js on the page.               <?php if (!is_home() || !is_front_page()) { ?>         <script type="text/javascript">              jQuery(document).ready(function($){                 // Clone portfolio items to get a second collection for Quicksand plugin                 var $portfolioClone = $(".portfolio").clone();                 // Attempt to call Quicksand on every click event handler                 $(".filter a").click(function(e){                          $(".filter li").removeClass("current");                           // Get the class attribute value of the clicked link                     var $filterClass = $(this).parent().attr("class");                          if ( $filterClass == "all" ) {                         var $filteredPortfolio = $portfolioClone.find("li");                     } else {                         var $filteredPortfolio = $portfolioClone.find("li[data-type~=" + $filterClass + "]");                     }                          // Call quicksand                     $(".portfolio").quicksand( $filteredPortfolio, {                          duration: 800,                          easing: 'easeInOutQuad'                      }, function(){                              //Blur newly cloned portfolio items on mouse over and apply prettyPhoto                         /*                         $(".portfolio li").hover(function(){                             $(this).children('.title').addClass('hover');                             $(this).children('.desc').slideDown('slow');                         }, function() {                             $(this).children('.title').removeClass('hover');                             $(this).children('.desc').slideUp('slow');                         });                         */                     });                               $(this).parent().addClass("current");                          // Prevent the browser jump to the link anchor                     e.preventDefault();                 });             });         </script>


Redirect not logged in users if they are on a specific page

I've seen this question posted before but not exactly trying to achieve what I want. Basically what I want is: If user is not logged in AND is on -this page- OR -this page- OR -this page, redirect him to -this page- (which is a custom registration page) I'm tweaking this piece of code, but it's not working. I'll appreciate any type of guidance.               <?php     function redirect_non_logged_in(){       // if user is not logged and is on this pages       if( !is_user_logged_in() && is_page( array( 250, 253 ) ) {          //This redirects to the custom login page.         wp_redirect(site_url('/user-registration'));         exit();       }     }     add_filter('get_header','redirect_non_logged_in');     ?>


Creating complex URLs with Wordpress permalink structure

I'm trying to self-educate so I can have a more informed conversation for a WP site development spec I'm trying to create. Grateful for any answers to what I would like to accomplish. I want to create a way for visitors to my Wordpress site to fill out contact information, which includes personal information, and for that information to be automatically captured and placed on a unique and complex URL that can be accessed by a web browser but that is highly unlikely to be discovered. I am not sure how to do this using Wordpress' permalink structure and frankly don't understand enough about Wordpress and PHP to formulate a solution to my situation. Here's a example. Assume my new visitor is Fred Jones. Fred Jones visits mycoolnewwpsite.com and fills out a standard contact form with his name, email, favorite song, whatever. I would like Fred's information to be automatically placed into a separate page (possibly not a Wordpress page) and created under a very difficult-to-guess/hack URL. So I don't want a URL like www.mycoolwpsite.com/users/fredjones. I actually want something more like mycoolwpsite.com/z34,90)2#1lqpe~3. Basically a URL that would be next to impossible for someone to guess or even want to hack. But I do want the information to be available for quick access by a web browser if in fact I knew that specific URL. I'm trying to figure out whether I can use some sort of custom permalink structure in Wordpress or whether there is some better solution to this. The important thing is that I cannot use the standard log in for users that Wordpress has, but I also need to protect the data users are providing using a complex/randomly generated URL path. Many thanks for any light you can shed!


Showing current subcategory

I have problem.               <?php query_posts('category_name=events&posts_per_page=2&offset=1'); ?>     <?php while (have_posts()) : the_post(); ?>     <div>     <?php $children = get_categories('child_of=3');     foreach ($children as $child) {         $child = get_category($child);         echo $child->cat_name;     }; ?>     </div>     <?php endif; ?>     <?php endwhile; ?>      I would like to show the current subcategory name from any parent category. With this I only manage to output all the subcategory names from the specified parent... I didn't use `the_category()` because it outputs the subcat names wrapped in a list and I would like them to be without any markup.


Translating long texts with html formatting

I was wondering what is the best way to translate some longer texts with html formatting. There was a couple of solutions I came across, but did not know what would be the best one.   * Writing a couple of html files with language extension (e.g. maintext_en.html, maintext_de.html, ...) and import this files. _Pro_ : It's easy for me _Contra_ : Not so easy for translators   * Writing only one html file with some markers and parse the file. _Pro_ : A bit easier for translators, they have to edit only one file. _Contra_ : I need a parser   * Using l10n inside the code _Pro_ : The easiest way for translators _Contra_ : Uses a lot of memory when the plugin runs. And the risk of losing some formattings. What is the best and most efficient way to make long texts within a plugin translateable?


How can I resolve name collisions between custom taxonomies?

I am developing a site which uses custom taxonomies `writer` and `artiste`. I am using a custom taxonomy for writer because the site is a collection of old articles that I want to be searchable by author, and WordPress requires separate logins for each author, and only one person will be maintaining the site. Using my own custom taxonomy seemed the simplest thing to do. So I edited the theme and made a custom taxonomy for `writer` that allows the admin to specify writer and it shows up in the correct place. Some of the articles are about artists, and I want to search by artist as well, and so we have the `artiste` taxonomy (never mind the 'e'). Now, some artists are writers as well. So I want `http://root/writer/artist- name` to give me all articles which mention "Artist Name" as a writer, and `http://root/artiste/artist-name` which mention him as an artist. But WordPress says two tags in two different taxonomies cannot have the same permalinks, and tags the later one `http://root/artiste/artist-name-2` (depending on which one was tagged later). I had imagined that (from a database perspective) each tag in a custom taxonomy would be stored depending on the taxonomy itself (like a weak entity, with a foreign key for parent taxonomy), so such collisions (as a design decision) do not make sense to me. In the next step of development, I am going to make it so a specific `writer` or `artiste` query returns only that, but there be another superset query such as `http://root/person/artist-name` which returns both (i.e. all articles in which "Artist Name" is tagged as either writer or artist or anything else). Since the `-2` is assigned to the later tag, and there is no clear way to predict if `writer` or `artiste` will be tagged first, this is problematic and inefficient for me. So my question is, how can I change WordPress codebase (or database permissions) which will allow two separate custom taxonomies to have the same tag?


How to remove "Taxonomy name:" from wp_title

The wp_title-generated `<title>` in my custom taxonomy archive pages contains the singular taxonomy name with a colon. I can't figure out where this is coming from (or if it's default Wordpress behavior), and I'd like to remove it. For example, in the archive page for the term 'Vanilla' in a taxonomy called 'Flavors', the `<title>` is > Flavor: Vanilla | My Site Name What I would like the title to be is simply > Vanilla | My site name The code in header.php is this:               <title><?php wp_title('|', true, 'right'); ?></title>      There's only one function in functions.php that's hooked into wp_title, and it looks unrelated to the Taxonomy name. I can't figure out where this is coming from or how to remove it. How can I remove this? (The answer in How to remove parent taxonomy name from the title generated by wp_title()? is not generalizable to this, and I'm guessing there's a more direct way to do it.)


Auto Changing Text Case

So I'm using all static pages and I specify that in my WP settings. When I specify what the 'Front Page' should be it turns my link in to Title Case instead of all Capital Letters like I would prefer. I have set in all caps in the title of my page so I'm not sure why it is converting it or how to stop it from converting it. I'm using the default 'twenty eleven 1.2' theme not sure if it has something to do with that or not. Can somebody help me please? Here's a link to what I'm talking about. http://www.trileafweb.com/omni/


How to implement a customizable free OpenID authentication?

OpenID is a standard commonly used nowadays. I am trying to implement OpenID on my blog, but I have many difficulties. I tried OpenID plugin but it seems to be incompatible with Wordpress 3.0. I tried also Janrain plugin but the free version is too limited. I would like to integrate the login screen into my blog theme style. Do you have any suggestions how to proceed? Any other plugins? Or any PHP library that can be adapted to an easy integration with Wordpress?


Run Jquery Script after delete post in front end

I have a list of posts on a page on the front end. With each post I have created a delete button with get_delete_post_link. This works fine but I now need to execute some jQuery after the post is deleted. I can't figure out how to do this.   Could someone help me out? Thank you


Relative links for performance?

I have a blog out there, for the sake of this answer you may take a look at it: http://blog.alphasmanifesto.com/. I'm currently working my way through some performance optimizations. As you may see, the main HTML is currently at 8.5 KBs. Between category, permalinks, tags, navigation and some other link out there, there is a total of 190 references to the same base path: "http://blog.alphasmanifesto.com" (32 characters). I've made some small math and I think I would be able to cut around 5 KBs if I were to make most of these into relative links. Now, here's the question: I know that there are some unintended side effects with making every link a relative link in Wordpress, but still, I would like to make the best out of every possible byte. So, what approach would better improve the serving size of the HTML page while keeping these unintended side-effects to a minimum? In the case where you decide that relative links is the right way to go, please elaborate on what method you would use -- I've been looking around and there are may ways in which that can be done in Wordpress.


Permalink Problems

From the WordPress support forums: > Hi, this is my website http://www.mp3ojax.com. I want to insert permalinks > on the images on main page > > This is the code:               <a href="<?php the_permalink() ?>     <?php endif; ?>     <?php $metadataContent = ob_get_clean(); ?>     <?php if (trim($metadataContent) != ''): ?>
     <?php echo $metadataContent; ?>           > But I get urls like this:   >  http://mp3ojax.com/joseph-krikorian- > artarutyun-2008/%3C/a%3E%3C/div%3E%3Cdiv%20class= > > please can someone help me? **Edit:** > Here is the full page:               <?php get_header(); ?>
     <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
          <?php if (have_posts()) : ?>     <?php while (have_posts()) : the_post(); ?>

     <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">     <?php the_title(); ?>
     <?php ob_start(); ?>     <?php $icons = array(); ?>     <?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__('F jS, Y', 'kubrick')) ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><?php edit_post_link(__('Edit', 'kubrick'), ''); ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
     <?php echo implode(' | ', $icons); ?>
     <?php endif; ?>     <?php $metadataContent = ob_get_clean(); ?>     <?php if (trim($metadataContent) != ''): ?>
     <a href="<?php the_permalink() ?>"><?php echo $metadataContent; ?>
          <?php endif; ?>
     <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>

     <?php ob_start(); ?>     <?php $icons = array(); ?>     <?php if (!is_page()): ?><?php ob_start(); ?><?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>     <?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
     <?php echo implode(' | ', $icons); ?>
     <?php endif; ?>     <?php $metadataContent = ob_get_clean(); ?>     <?php if (trim($metadataContent) != ''): ?>
     <?php echo $metadataContent; ?>
     <?php endif; ?>

          <?php endwhile; ?>          <?php     $prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick'));     $next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));     ?>     <?php if ($prev_link || $next_link): ?>

      <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>

          <?php endif; ?>     <?php else : ?>
<?php _e('Not Found', 'kubrick'); ?>

<?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?>
     <?php if(function_exists('get_search_form')) get_search_form(); ?>     <?php endif; ?>
     <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

          <?php get_footer(); ?>


Using Custom Templates for Custom Post Types for the Genesis Theme Framework?

_( **Moderator's note:** The original title was "How can I create create and use a custom template for custom post types in the Genesis theme framework?")_ I'm using the Genesis theme framework, with an almost completely 'stock' child theme. I have the WP Easy Post Types plugin installed, and have created one custom post type ("Members"). I have two custom fields created to use for the 'member' post type (phone number and address). I'm trying to figure out how to display the information from those fields in two places: `example.com/members` and `example.com/members/bob`. Genesis doesn't support the typical `single- posttype.php` file to create a template for the custom post type, but even if it did, that doesn't take care of `example.com/members`. Any suggestions on how to get the desired information to display?


Jetpack Infinite Scroll - Add more then 7 posts each time?

By default, everytime the infinite scroll loads some more posts, it loads 7 posts. Is there a way to load more posts than just 7 each time?


Allowing Loading/Downloading of .mp3

The site I am working on gives new members the opportunity to download an original .mp3 (no licensing or copyright issue here), so on the confirmation email, I put a direct link to the file. However, when that link is clicked, the user is redirected to the 404 error page. The file is located at 'http://www.playpromedia.com/assets/artists/music/The_Armory_Hands_Up_D-Phi- E_Remix.mp3' and I checked via FTP and the file is definitely there. When I click that link in a webpage, the song plays and can be downloaded. But when the link is clicked in the email, 404!!! Here's my registration/confirmation code. Any help is appreciated.               <?php          // Exit if accessed directly     if ( !defined('ABSPATH')) exit;          /*     Template Name: Register Page     */          require_once(ABSPATH . WPINC . '/user.php');       global $wpdb, $user_ID;          get_header();     ?>                    <?php     if (!$user_ID) {        if(get_option('users_can_register')) {             if($_POST){                $role = $wpdb->escape($_REQUEST['role']);                $username = $wpdb->escape($_REQUEST['username']);                $password = $wpdb->escape($_REQUEST['passwrd']);                $email = $wpdb->escape($_REQUEST['email']);                $fname = $wpdb->escape($_REQUEST['fname']);                $fname = $wpdb->escape($_REQUEST['fname']);                $lname = $wpdb->escape($_REQUEST['lname']);                $zipcode = $wpdb->escape($_REQUEST['zipcode']);                $dob = $wpdb->escape($_REQUEST['DOB']);                $school_name = $wpdb->escape($_REQUEST['school_name']);                $band_name = $wpdb->escape($_REQUEST['band_name']);                $band_url = $wpdb->escape($_REQUEST['band_url']);                $url = $wpdb->escape($_REQUEST['band_url']);                     $new_id = wp_insert_user( array (                     'user_login' => $username,                     'user_pass' => $password,                     'user_email' => $email,                     'role' => $role,                     'first_name' => $fname,                     'last_name' => $lname,                     'user_url' => $url,                     'user_registered' => date('Y-m-d H:i:s')                ) ) ;                     if ( is_wp_error($new_id) ){                    echo "Username already exists. Please try another one.";                } else {                    update_user_meta($new_id, 'zip_code', $zipcode);                    update_user_meta($new_id, 'band_name', $band_name);                    update_user_meta($new_id, 'band_url', $band_url);                    update_user_meta($new_id, 'school_name', $school_name);                    update_user_meta($new_id, 'dob', $dob);                         $from = get_option('admin_email');                    $headers = 'From: '.$from . "\r\n";                    $subject = "Registration successful";                    $msg = "<title>Registration successful</title>
Thank you for signing up for a FREE account with our online community. As a member you will be able to connect to our network of artists and music enthusiasts while gaining access to exclusive content and networking opportunities. You will also gain firsthand experience in the music industry by participating in PlayPro Media industry events and projects.

As a member you will find new music in areas around you. Active members will have access to free shows, music, prizes and Album credits. V.I.P and private parties will be available along with travel aboard the PlayPro Media tour bus. Our community allows for communication among concert goers and bloggers across the nation to discuss upcoming concerts and events on our properties.

Start connecting with like-minded music lovers today!

Play On,
PlayPro Media

To redeem your free download from PlayPro Media, right-click the link below and choose \"Save Target as..\" on Windows or \"Download Linked File\" on Mac OS X.

DOWNLOAD SONG
";                         add_filter( 'wp_mail_content_type', 'set_html_content_type' );                    wp_mail( $email, $subject, $msg, $headers );                    remove_filter( 'wp_mail_content_type', 'set_html_content_type' );                    echo(  "
Thank you for signing up for a FREE account with our online community. As a member you will be able to connect to our network of artists and music enthusiasts while gaining access to exclusive content and networking opportunities. You will also gain firsthand experience in the music industry by participating in PlayPro Media industry events and projects.

Please check your email for further details and a link to your FREE DOWNLOAD. If you don't receive the email in a few minutes, please check your spam folder for the message.
" ); exit;                } // end if            } else { ?>
Connect With PlayPro Media

                       <form id="frmRegister" action="" method="post" autocomplete="off" style="width:60%; margin: 0 auto;">

                             PPM Role	                                                              <select name="role" id="ppmRole" style="width: 200px;">                                     <option value="member">Member</option>                                     <option value="streetteam">Street Team</option>                                     <option value="artist">Artist</option>                                 </select>

                             Username	                             <input type="text" id="username" name="username" class="text"  autocomplete="off" />
NO SPACES ALLOWED. If you want to enter multiple words, separate each with a hypen (i.e., plucking-guitarist) or just use your email as your username.

                             Password	                             <input type="password" id="passwrd" name="passwrd" class="text"  autocomplete="off" />

                             Confirm Password	                             <input type="password" id="passwrd2" name="passwrd2" class="text"  autocomplete="off" />

                             Email Address	                             <input type="text" id="email" name="email" class="text"  autocomplete="off" />

                             First Name	                             <input type="text" id="fname" name="fname" class="text"  autocomplete="off" />

                             Last Name	                             <input type="text" id="lname" name="lname" class="text"  autocomplete="off" />

                             Phone	                             <input type="text" id="phone" name="phone" class="text"  autocomplete="off" />
Please enter only numbers (i.e., 5551234567)

                             Zip Code	                             <input type="text" id="zipcode" name="zipcode" class="text"  autocomplete="off" />

                             Date of Birth	                             <input type="text" name="DOB" class="text"  autocomplete="off" />
Please enter as YYYY-MM-DD

                             Name of School	                             <input type="text" name="school_name" class="text"  autocomplete="off" />
Please enter None if you are not currently enrolled

                             Artist/Band Name	                             <input type="text" name="band_name" class="text"  autocomplete="off" />

                             Artist/Band URL	                             <input type="text" name="band_url" class="text"  autocomplete="off" />
Please include the entire address including http://

                             <input type="submit" id="submitbtn" name="submit" value="Register Now" />

                 </form>                                <?php                 } // end if $_POST             } else {                 echo "Registration is currently disabled. Please try again later.";             } // end if user_can_register     } else {        echo "Logged in";        //wp_redirect( home_url() ); exit;     } // end if               get_footer();          ?>


How to use my custom menus as seperate pages?

I want my site to have different pages, so basically, I want to make it that when you select a menu, it takes you to a different part of the site.. with different information that I have typed in.. how do I do this? Example - if you click the ´Contact Us´ menu, I want our contact details to appear, and then if you click on ´Pictures`, our pictures will appear etc.. Thanks! Much appreciated.


jquery masonry effect on archives page, group by month

I have this archive page (using the Thesis theme, version 1.8.5): http://testblog.squeesome.com/columns/ I'm trying to make the structure look like the Tumblr archives. I got so far as applying the jQuery Masonry effect, the image hover effect and making the month headers appear, but I can't wrap my head around how to group it by month, like the Tumblr archive page does it. Here is the code I'm using in my custom_functions.php file:               // Archives page layout     function mason_script() {         wp_enqueue_script( 'jquery-masonry' );     }     add_action( 'wp_enqueue_scripts', 'mason_script' );     function custom_archive() {     if (is_page(181))  {     ?>
     <?php     $blogtime = date('Y');     $prev_limit_year = $blogtime - 1;     $prev_month = '';     $prev_year = '';     $args = array(              'posts_per_page' => 12,              'ignore_sticky_posts' => 1     );     $postsbymonth = new WP_Query($args);     while($postsbymonth->have_posts()) {         $postsbymonth->the_post();         if(get_the_time('F') != $prev_month || get_the_time('Y') != $prev_year && get_the_time('Y') == $prev_limit_year) {                        echo "
".get_the_time('F Y')."
\n\n";             }         ?>

<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?>
<img src="<?php bloginfo('template_directory'); ?>/custom/scripts/timthumb.php?src=<?php echo catch_that_image(); ?>&w=240&zc=1&a=t" alt="<?php the_title(); ?>" width="240" />

                     <?php // your other template tags ?>         <?php         $prev_month = get_the_time('F');         $prev_year = get_the_time('Y');     }             ?>
     <?php } }          remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');     add_action('thesis_hook_custom_template', 'custom_archive');      My grasp of PHP is rudimentary at best, but I'm very eager to learn :) If you could point me in the right direction it would be great!


Create a Blog Template Page

I am trying to create a template that will display a list posts of a specific custom type. However, I am missing something fundamental. So far, here is what I have: ### functions.php               add_action( 'pre_get_posts', 'query_filter', 1);     function query_filter($query)     {         if (!$query->is_admin            OR              $query->is_main_query()     OR              is_page_template( 'page-events.php' ))         {             $query->query_vars['posts_per_page'] = 3;         }              return $query;     }      ### page-events.php               <?php     /*     Template Name: Events Page     */     ?>          <?php get_header(); ?>          <?php get_template_part('includes/breadcrumbs'); ?>     <?php get_template_part('includes/top_info'); ?>

             <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                     <?php the_content(); ?>
                             <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                                     <a href="<?php the_permalink(); ?>">                                         <?php the_title(); ?>
                             <?php endwhile; endif; ?>

             <?php endwhile; endif; ?>

          <?php get_footer(); ?>      As you can see, I still haven't attempted to filter for the custom post type, because currently what is happening is the 'the_content()' is being repeated over and over 100's of times (there should only be about 12 posts). In addition, the_title() doesn't appear anywhere on the page. What am I missing?   * William ## UPDATE After a few suggestions, here is my updated code: ### EventManager.php This is where my custom post type is created.               add_action('init', 'Initialize');     static function Initialize()     {     register_post_type(Event::POST_TYPE,         array(             'labels' => array(                 'name'                => 'Events',                 'singular_name'       => 'Event',                 'add_new'             => 'Add New',                 'add_new_item'        => 'Add New Event',                 'edit_item'           => 'Edit Event',                 'new_item'            => 'New Event',                 'view_item'           => 'View Event',                 'search_items'        => 'Search Event',                 'not_found'           => 'No Events Found',                 'not_found_in_trash'  => 'No events found in trash',                 'menu_name'           => 'Events',                 ),             'public'               => true,             'publicly_queryable'   => true,             'query_var'            => true,             'rewrite'              => false,             'show_ui'              => true,             'hierarchical'         => false,             'has_archive'          => true,             'menu_icon'            => JUPITER_PLUGIN . 'images/small-greyscale.png',             'supports' => array(                 'title',                 'editor',                 'author',                 'thumbnail',                 'excerpt',                 'comments',                 'revisions'                 ),             )     );          global $wp_rewrite;          $gallery_structure = '/' . Event::SLUG . '/%year%/id=%event_id%/%event%';     $wp_rewrite->add_rewrite_tag("%event%", '([^/]+)', "event=");     $wp_rewrite->add_rewrite_tag("%event_id%", '([0-9]+)', "event_id=");     $wp_rewrite->add_permastruct('event', $gallery_structure, false);          add_filter('post_type_link', 'gallery_permalink', 10, 3);     function gallery_permalink($permalink, $post_id, $leavename)     {         $post = get_post($post_id);              if ($post->post_type == Event::POST_TYPE)         {             $rewritecode = array(                 '%year%',                 '%event_id%'                 );                      $unixtime = strtotime($post->post_date);                      $date = explode(" ",date('Y m d H i s', $unixtime));                      $rewritereplace = array(                     $date[0],                     $post->ID                     );                      $permalink = str_replace($rewritecode, $rewritereplace, $permalink);                 return $permalink;         }         return $permalink;     }      ### archive-event.php               <?php     /*      * Template Name: Events Archive     */     ?>     <?php get_header(); ?>          <?php get_template_part('includes/breadcrumbs'); ?>     <?php get_template_part('includes/top_info'); ?>

         <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                 <?php echo the_title(); ?>
         <?php endwhile; endif; ?>

     <?php get_footer(); ?>      This should be the page that is automatically loaded when I navigate to domain.com/event. However, that address currently says 'No Results Found'. If I don't include the custom rewrites when creating the custom post type, then this works as expected. Do I have to include some sort of additional rewrite to redirect the archive to this page?


Posts created in a Custom Post Type are lost if published without a title

I searched around and the URL below is all I could find on this problem. If I publish a custom post type's post without entering in a post title, it wipes the whole post's info and says "published". However, the post is nowhere to be seen. Looking into the database, I can see the post is created, but it's set to auto draft. The post_name value is empty Found this. Sounds like exactly what I'm experiencing http://www.wptavern.com/forum/plugins-hacks/1851-custom-post-type-posts- published-without-title-lost.html Any ideas on how to fix this? Or maybe someone can suggest a way of checking to see if a post title exists when the post it published, and display a error message to the user? **Update** Thanks to Manny's solution below, I managed to make a few modifications from WordPress prompt checklist before publish? and fix the publish button so it doesn't keep spinning when you close the alert box.               add_action('admin_head', 'post_title_check');     function post_title_check() { ?>          <script type="text/javascript">         jQuery(document).ready(function() {             jQuery('#post').submit(function() {                      if(jQuery('input[name="post_title"]').val() == '') {                     alert("Please input a title");                           jQuery('#ajax-loading').hide();                    jQuery('#publish').removeClass('button-primary-disabled');                    return false;                   }                  });          });     </script>


Cropped thumbnail still displaying as full image

Steps to reproduce... 1) Add to functions.php:               add_image_size( 'half-size', 200, 200, false );      2) Add to template file (inside loop):               <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >           <?php the_post_thumbnail ('half-size', array('class' => 'profile_image')); ?> </a>      3) Go to media library and add image to post gallery. Then crop image, click "thumbnail" radio button and click save underneath the image. 4) Click set as featured image then "save all changes" at the bottom of the gallery dialog window. Then update the post (may not be necessary). Do not insert into gallery. Click over to the actual post and see if it is showing the part of the image you cropped or the whole image. What am I doing wrong? Or does cropping inexplicably not work with Featured Image? Apparently, there is no ticket out for this issue.


Featured image metabox not showing up

I have a theme installed on WordPress Multisite 3.5.1 which has a one custom post. Now I wanted to have two more so I have created them. Everything is working besides one thing. The featured image metabox is not showing up. I have added it to custom post                  $args = array(             'labels' => $labels,             'public' => true,             'exclude_from_search' => false,             'publicly_queryable' => true,             'show_ui' => true,             'rewrite' => array( 'slug' => $md_cssitems_rewrite ),             'menu_icon' =>  get_template_directory_uri() . '/admin/assets/images/icon-porfolio-16x16.png' ,             'query_var' => true,             'capability_type' => 'post',             'hierarchical' => false,             'menu_position' => 8,             //features support in Pofolio post type               'supports' => array('title','editor','excerpt','thumbnail','page-attributes')           );       I also have read I might need to activate it using in my functions.php               add_theme_support( 'post-thumbnails',array('custom-post1','custom-post2') );      I also have checked in screen options and it is not hidden there. I am running out of ideas. What else might be wrong?


How can I bulk edit variations in woocommerce?

I’m setting up a store selling art prints that have multiple canvas/paper types, and ten different print sizes for 200 photos. All prices on all sizes with specified canvas-type are the same from image to image, but they have to be entered one at a time on the variations drop-down admin. That means thousands of entries if it has to be done for each variation on each product. And then if there’s a price increase, thousands of edits instead of just a few dozen. The “Bulk Editing” feature for variations changes all the prices of ALL the variations. (That is, if you "Bulk Edit" the price, all variations-- small, medium, large -- end up with the same price.) If you’re managing any real number of products with multiple variations and prices that need to be changed, this is a real shortcoming of woocommerce. Is there a way to batch edit variations for multiple products, or create a product template that would have the same variations for prices with different sizes?


Get all media files for current author

I'm trying to create a list on the frontend of my site of all media items that the current user has uploaded. It seems like the way to do this would be to loop through and compare the ID of the current author with the ID of the author of the media item and then only display the items when a match is found. But, I can't figure out how to get the author of the media item. Is there a function for this? Does someone have a better (easier) way to do this?


How to hide W3 Total Cache from non admins?

I would like to be able to hide W3 Total Cache from non admins. How can I go about doing so? The following code I tried implementing in my functions.php file does not work:               function hide_w3tc() {         if (!current_user_can('super_admin')) {             remove_submenu_page('admin.php?page=w3tc_dashboard');         }      }          add_action( 'admin_menu', 'hide_w3tc');


Hooks to run after a core upgrade?

Are there any hooks for running plugin code after a core upgrade? Specifically, I'm running into issues that a users wp-admin column choice in the 'Screen Options' are modified after an upgrade - I believe if they choose "auto". After doing an svn sw I lost my "publish" box from the post/pages page. This is causing some major issues in my wp-admin skin.


WooCommerce - PrettyPhoto appending URL with #prettyPhoto

For some reason the PrettyPhoto script that WooCommerce is now using is adding #prettyPhoto to the end of URL's once it's been opened in that page. See here for an example Also, when you close the lightbox down it takes 2 or 3 clicks of the back button to get back to where you were previously. Anyone have any idea why?


Use standard WordPress categories with a CPT

I've just converted all of my blog posts to a CPT because I needed them to be hierarchical. Problem is, I had categories assigned to all of the posts. How can I use the standard WordPress categories in my CPT? I've tried adding `'taxonomies' => array('category'),` to the `register_post_type` function, but that didn't work. And I tried `register_taxonomy_for_object_type( 'category', 'illustrations' )` and that didn't work either. Any suggestions? UPDATE: Thanks all for the replies but as mentioned above — I've tried both `'taxonomies' => array('category')` and `'taxonomies' => array('category'),` and neither have worked. Here's the whole register_post_type function — with the 'taxonomies' parameter:               /* Register the 'Illustrations' post type */          register_post_type(         'illustrations',         array(             'label' => 'illustrations',             'description' => '',             'public' => true,             'menu_icon' => get_bloginfo( 'template_directory' ) . '/images/help-icon.png',             'show_ui' => true,             'show_in_menu' => true,             'capability_type' => 'post',             'taxonomies' => array( 'category' ),             'has_archive' => true,             'hierarchical' => true,             'rewrite' => array( 'slug' => '' ),             'query_var' => true,             'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail', 'page-attributes', 'revisions', 'comments','author' ),             'labels' => array (                 'name' => 'Illustrations',                 'singular_name' => 'Illustration',                 'menu_name' => 'Illustrations',                 'add_new' => 'Add Illustration',                 'add_new_item' => 'Add new Illustration',                 'edit' => 'Edit',                 'edit_item' => 'Edit illustration',                 'new_item' => 'New illustration',                 'view' => 'View illustration',                 'view_item' => 'View illustration',                 'search_items' => 'Search illustrations',                 'not_found' => 'No Illustrations Found',                 'not_found_in_trash' => 'No Illustrations Found in Trash',                 'parent' => 'Parent Illustration',                 ), ) );          register_taxonomy_for_object_type( 'category', 'illustrations' );


How to show only 1 post from a specific category on the front-page

On my front-page i have a 3 col block section below the fold. The final and third column is an excerpt of the most recent post from my art category blog, hopefully this is clear up until here in terms of explanation of setting the stage. This is how i'm approaching the solution: I created a php file called "content-art-blog" which i pull into my front-page file using this php code               <?php get_template_part( 'content', 'art-blog' ); ?>      On the actual content-art-blog.php file however i'm formulating my solution so far like this:

art blog
          <?php get_post( $id, $output, $filter ); ?>          <?php       $linkdata = array(       'link_name' => 'art',       'link_url' => 'http://domain.com/categories/art/'       );     ?>          Read more      NOTE: the actual A tag i just put in the local directory file path (since i'm developing on MAMP) but i realize this won't work once the site goes live. So the question is two fold: 1) How do i pull in 1 post excerpt for a specific category into this block section 2) How do i link to the post (or will this be pulled in with the excerpt meaning i don't have to actually include this A tag to begin with?) I went through the functions to get an idea of what actually is out there in terms of what i can actually do with these functions but i'm such a noob it will take time to digest what all these functions do and hence properly interpret how i can go about solving problems with them. In my case i'm not aware of what i don't know yet. Thanks hope that was understandable.


Custom Fields Value As Taxonomy

I creating a real estate platform where allow users to add their listing. The users are people who may not know how to using wp platform, so I make it as easy as possible for them to make a post. Thanks for the custom post type, I manage to create a post type that specifically for add listing. In this post type, there are many custom fields to store the necessary information like location, property type and etc... Since I make it simple to use, so I didn't use the categories to sort the posts. However, what I like to do is let the custom field values as the taxonomies. For example: **[States] <- this is custom field in select/radio type**   * [state 1] <- this is custom field value option for states   * [state 2] <- this is custom field value option for states   * [state 3] <- this is custom field value option for states   * [state 4] <- this is custom field value option for states   * [etc...] <- this is custom field value option for states So I want to sort the posts according to the value in State that user selected. My idea is to make each of the value [[state 1],[state 2],[state 3]...] to be the categories. When the user select the option, it will automatically become the categories of the post. Possible to do this?


Can I use wordpress comments system to build a user review system within my website?

I am creating a part of my site where a user can enter a comment (review) and rate my web application. When a user enters a comment and rates my site out of 5, their comment will be available to the entire site (after approval). I am not sure whether to go about this by making a database table for this and manually setting up user input fields into my custom DB table, or trying to use a wordpress plugin, or try and leverage the wordpress comment system in a mixture of both. Can anyone provide an idea of the best way to go about doing this?


Override user authentication with external credentials

I'm working on a site running WordPress along with a vBulletin forum. The user base is registered on vBulletin. I need to allow users to appear logged in on WordPress as well **for the sole purpose of posting comments** with their forum user. The user **must not be replicated on WordPress** , so every solution involving the creation of users in the WordPress database is not applicable. Users recognized in this way need not have any admin or publishing privileges, only the ability to comment so that their comment appears under their forum username. I had written a simple plugin which was working on an older version, but it's not working anymore with the most recent version of WordPress (3.3.2 at the moment). That solution relied on overriding the pluggable functions `wp_validate_auth_cookie` and `get_userdata`. What are the correct steps to take in order to implement this functionality?


Sort posts by most recently modified

Is there a way to list posts in the order in which they were modified? For example; A user posts 5 posts (#1 being the oldest and #5 being the newest), by default they would be listed with #5 being at the top, but say the user edited post #3 at a later date, is it possible to then list post #3 above #5 without manually changing the page attributes? This is a secondary query by the way, using get_posts


zip download plugin works well in localhost but not on live site

I need to offer a zip file download [to registered users] on every post, containing all the images attached to the post. The solution provided in this thread works well for the purpose, although it did not work in old version of PHP 5.2 due to a `namespace` syntax in the first line of the plugin code - `namespace GalleryZip;`. I tested the plugin offered in the thread on my localhost with wordpress 3.6.1 installed with this line of code in single.php `<?php echo do_shortcode('[gallery]'); ?>` which offers a nice zip-download link 'Get as Zip', so far so good. But, now when I installed the same plugin on my live site which also runs on latest wp 3.6.1 it displayed a link as expected but the **link does not prompt a zip-download** and when clicked just refreshes the page. Earlier the plugin also displayed an unexpected native gallery of the images attached to post which was promptly solved by @cybnat. ENVIRONMENT : My live site uses PHP 5.3.27 and localhost is a WAMP on windows 7 and uses PHP 5.3.1. I have tested in latest firefox, chrome and safari browsers, works as expected on localhost and not on live site. I changed the theme into default twenty-thirteen ( tried it inside and outside the loop ) and also disabled all the other plugins, no change in result. Firebug console displays `http://website.com/wp-admin/admin-ajax.php 200 OK` on clicking the link. In the view source of live site js is loaded as expected, here is the print.               <script type='text/javascript' src='http://website.com/wp-content/plugins/gallery-zip-master/js/gallery_zip.min.js?ver=3.6.1'></script>      **UPDATE** : Following an advice below I upgraded my localhost wp install to 3.6.1 and have ruled out the possibility of any issue due to a difference in wp versions. The plugin still works as expected and offers a zip download link on click while tested in local environment. The issue that remains is that on live server the link **does not** prompt a zip-download instead **just refreshes the page**. Although I am continuously testing and in every way I can, a little help or a hint would be greatly appreciated. **Title and content of the question are being adjusted in accordance to latest feedbacks and situation. If you may, kindly take a look at the plugin code at github and let me know if this could be solved or correct me if I am wrong anywhere. Also let me know if you feel that the question should be asked in some other forum.


Adding wp_ajax to a theme outside functions.php (on specific template page)

I'm doing a function which requires the use of the `wp_ajax` action. I've followed this guide to set it up with the differences of adding the requesting the object AJAX file in functions.php and also added               if(isset($_REQUEST['action'])) {         do_action('wp_ajax_'.$_REQUEST['action']);         do_action('wp_ajax_nopriv_'.$_REQUEST['action']);     }      to make it work. Issue is that obviously having the file in functions.php causes every page to initialise workflow, but I only want it on one particular template file. I could add it as a plugin I'm aware, but certain functions used are global to the theme and will never be used on any other theme so doesn't make sense in my mind to do that. Ideally, I would just like to do `require('ajax_file.php');` in the template file, but that's the main issue here is I don't think I can (unless somebody can correct me). So if there is an easy way to call it from the functions.php file without every other page also calling it then that would be a massive help. Thanks!


Help to condense/optimize some working code

WordPress by default shows ALL posts to users who are Authors. I wanted Authors to only be able to see their own posts so I came up with the following code which works well. Any suggestions to condense/optimize it?               // Only show posts related to current author     add_action('pre_get_posts', 'query_set_only_author' );     function query_set_only_author( $wp_query ) {         global $current_user;         if ( is_admin() && !current_user_can('edit_others_posts') ) {             $wp_query->set( 'author', $current_user->ID );         }     }          // Check that user is not an Administrator     if (!current_user_can('promote_users')) {         add_filter('views_edit-post', 'remove_mine');         add_filter('views_edit-post', 'posts_all');         add_filter('views_edit-post', 'posts_published');         add_filter('views_edit-post', 'posts_draft');         add_filter('views_edit-post', 'posts_pending');         add_filter('views_edit-post', 'posts_trash');     }          // Remove "Mine" from filter bar     function remove_mine( $views ) {         unset($views['mine']);         return $views;     }          // Fix "All" post count to only include posts related to current author     function posts_all($views) {         global $current_user;            $query = array(             'author'       => $current_user->ID,             'post_type'    => 'post'         );         $result = new WP_Query($query);         if ( get_query_var('post_status') == NULL ) $class = ' class="current"';         $link = sprintf(__('All (%d)', 'all'),                 admin_url('edit.php?post_type=post'),                 $result->found_posts);         $views['all'] = $link;         return $views;     }          // Fix "Published" post count to only include posts related to current author     function posts_published($views) {         global $current_user;            $query = array(             'author'       => $current_user->ID,             'post_status'  => 'publish',             'post_type'    => 'post'         );         $result = new WP_Query($query);         if ( get_query_var('post_status') == 'publish' ) $class = ' class="current"';         $link = sprintf(__('Published (%d)', 'publish'),                 admin_url('edit.php?post_status=publish&post_type=post'),                 $result->found_posts);         $views['publish'] = $link;         return $views;     }          // Fix "Drafts" post count to only include posts related to current author     function posts_draft($views) {         global $current_user;            $query = array(             'author'       => $current_user->ID,             'post_status'  => 'draft',             'post_type'    => 'post'         );         $result = new WP_Query($query);         if ( get_query_var('post_status') == 'draft' ) $class = ' class="current"';             $link = sprintf(__('Draft'.((sizeof($result->posts)>1)?"s":"").' (%d)', 'draft'),                 admin_url('edit.php?post_status=draft&post_type=post'),                 $result->found_posts);         $views['draft'] = $link;         return $views;     }          // Fix "Pending" post count to only include posts related to current author     function posts_pending($views) {         global $current_user;            $query = array(             'author'       => $current_user->ID,             'post_status'  => 'pending',             'post_type'    => 'post'         );         $result = new WP_Query($query);         if ( get_query_var('post_status') == 'pending' ) $class = ' class="current"';             $link = sprintf(__('Pending (%d)', 'pending'),                 admin_url('edit.php?post_status=pending&post_type=post'),                 $result->found_posts);         $views['pending'] = $link;         return $views;     }          // Fix "Trash" post count to only include posts related to current author     function posts_trash($views) {         global $current_user;            $query = array(             'author'       => $current_user->ID,             'post_status'  => 'trash',             'post_type'    => 'post'         );         $result = new WP_Query($query);         if ( get_query_var('post_status') == 'trash' ) $class = ' class="current"';         $link = sprintf(__('Trash (%d)', 'trash'),                 admin_url('edit.php?post_status=trash&post_type=post'),                 $result->found_posts);         $views['trash'] = $link;         return $views;     }


How to make user accept license agreement before download

I use my Wordpress site to host downloads, among other things. According to German law I need to make a user accept the license agreement prior to being able to download a program. I am thinking of displaying the license agreement in a pop-up window similar to the way Codeplex does it (see this page and click on download). **How can I accomplish this easily in Wordpress?**


Using custom post types within a section of a template

I'm trying to get the hang of custom post types and I am trying to get them to loop through the post types within a page template. I'm already using the MultiEdit plugin to display certain content regions within my template. Overall, here is what my template page looks like:               <?php     /*     Template Name: Home Template     MultiEdit:Icons,NameTitle,CategoriesTitle     */     ?>     <?php get_header(); ?>     <?php query_posts( 'post_type=homecategories'); ?>     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

     <?php multieditDisplay('Icons'); ?>

              <?php the_content(); ?>

         <?php multieditDisplay('NameTitle'); ?>

              <?php multieditDisplay('CategoriesTitle'); ?>

                       <?php edit_post_link('Edit this entry.', '
',      '
');          ?>

                <?php //comments_template(); ?>         <?php endwhile; endif; ?>     <?php //get_sidebar(); ?>     <?php get_footer(); ?>      If I keep it like this the only thing that shows is the entries from the custome post type and nothing else. And what I am trying to accomplish is get it to only display the custom post types within this section in the template:

           Like I mentioned, I'm still getting the hang of using and implementing custom post types and I'm not really sure if this is the right way to go or not. Thanks!


Conditional styling of wp_list_pages bullet points

I'm looking for some type of script that allows me to select custom image bullets for my wp_list_pages for 3 scenarios:   1. If a page does not have a child   2. If there are children   3. If a page was recently updated, provided that the page has children I'm not sure how to do this. Since the depth of the children can vary, I would not edit style.css for for my last child. Since the wp_list_pages is what outputs the ul, I'm not sure how to write an argument (perhaps in my Walker class) that says if this page has zero children, . Can anyone advice on this?


Check if post has gallery images/media

Is there a Wordpress conditional that I can use to check for gallery images/media in a post? I do not want to check if the [gallery] shortcode exist in a post. Attached is a screenshot of what I want to check for and if is images I want to output them to the page. ![Gallery has 4 image](http://i.stack.imgur.com/DJe2z.jpg)


Subdomain and subdirectories together in one installation

I'm currently want to develop my design company website and choosing wordpress as my CMS. How do I should install the wordpress when I want the domain structure like this:   * Blog = blog.example.com   * Portfolio = example.com/portfolio/...   * Shop = shop.example.com = using WooCommerce I'll be glad if someone would help, because I really have no idea to config.


WP_enqueue_script inside shortcode?

I've got shortcode that needs to include JS library only once and only there where it's used.               function shortcode_function($atts, $content = null) {         $class = shortcode_atts( array('something' => '0'), $atts );              return "<script src=\"http://maps.googleapis.com/maps/api/js?sensor=false\"></script>                  And here goes HTML code for the map.";     }     add_shortcode("sh", "shortcode_function");      The problem is that above example is going to include library several times if maps shortcode is used several times. How can I prevent that? Or more precisely: how can I do it "the correct way"? Can I use `wp_enqueue_script()` in that place? Just one requirement: I really need this to include that library **only-when- shortcode-is-used**.


What should I use? index.php, front-page.php and home.php

I'm building a WordPress theme but I'm bit confused. I don't know what to use. There is `home.php`, `front-page.php` or `index.php`. When I started building the WordPress theme I started with `index.php` and gave it this code:               <?php get_header(); ?>      after that I found that there is that 3 pages `index.php`, `front-page.php` and `home.php`. So I realised that I need front-page.php, from what I heard it loads first so I will use it for front page which will have news slideshow and etc. Well now here is the question, what for is `index.php` or `home.php`? Do I really need these two files? And can I use `index.php` as front-page? Do I really need `front-page.php`? Can't I just use `index.php`? Thank you.


Using subdomain as primary domain

I have a dev site at sub.example.com. Instead of migrating the dev site to the root folder, is it possible to do something similar to this but using a subdomain instead of a subdirectory?


Wordpress SEO plugin by Yoast Breadcumbs

Currently i am using the WordPress SEO plugin by Yoast. if i activate the breadcrumbs in the plugin and set the code in my custom post type single page it is not properly displayed. (Home > Features) instead of (Home > Features > current single feature) i am using archive => true already and i have no idea why its acting this way. no custom hacks done just a custom post type and a clean install of wordpress and the plugin. Also how do i tried adding a page called Features and created a template of my archive page, still the same result. What is the best way to get this to work?


Fallback for empty custom fields

I'm using, for example: `<?php echo get_post_meta($post->ID, "Pricing_Land_Only", true); ?>` but need to know how to implement the 'else' function to display 'Nothing found' if I didn't type anything in that field. The reason being is for different pricing fields that I have and while not all pages use the same fields, most would. Thanks!


Setting a page link in the footer?

What is the proper process for setting a page up with a link to it in the footer? Currently, all my pages are in Appearance -> Menu...and of course displayed in the main menu. However I want a batch of them to be in the footer. I have decent HTML,CSS, PHP skills but new to WP.


Unable to login to new custom domain on multisite?

**Background** I setup WordPress Multisite a while ago. I added one on a custom domain, and more on subdomains of the main site. Since then I've added more on subdomains, and so far everything has worked fine. **Problem** I added another on a custom domain, and for some reason I cannot log into it. Each login attempt redirects to the login page again. All the other existing domains still work just fine. **What I Tried** I'm pretty sure it is cookie related. I was able to login once by resetting the password, but then it didn't login again. I've tried multiple browsers to see if that was the issue. I checked the .htaccess to see if there were special directives for either of the custom domains, and didn't find anything. I compared the settings for both sites (from the Network Admin dashboard) and didn't see anything out of the ordinary.


How to link a word comprised of a custom field with another?

I want to link content comprised of a custom field(field1_details) using another custom field(field2_link) which is a URL type. `the_field('field1_details')` is text_area field and `get_field('field2_link')` is a website field (using a ACF addon). (These custom fields are created using Advanced custom fields plugin) **Here is the code I am trying in loop.php:**               <a href="<?php get_field('field2_link'); ?>"><?php if( function_exists('the_field') ) the_field('field1_details'); ?>      Output-                The text content ( Doesn't out put the link)      **And tried this without the`if`**               <a href="<?php get_field('field2_link'); ?>"><?php the_field('field1_details'); ?>      **Trying with`the_field` instead of `get_field`**               <a href="<?php the_field('field2_link'); ?>"><?php the_field('field1_details'); ?>      Output- `<span><a href="<a href=" http:="" google.com"="" target="_blank">google.com</a>">This is the test content</span>` ===================================================== The two custom fields works fine if I use them separately like this: **Field 1- field1_details** Output HTML-
This is the Text     content
      **Field 2- field2_link** or without the `if`               <?php the_field('field2_link'); ?>      Out put-                google.com      I think I am not using it in a right way. Could any one tell me how to link the field with a URL entered in the another field in loop.php? Also tell me how would you do it in the functions.php instead of the templates like loop.php


pre_set_site_transient_update_plugins wont call on hosted webspace

Iam trying to use "pre_set_site_transient_update_plugins" to update my plugin from a GitHub repository. For that Iam using this example https://github.com/bfintal/Plugin-Update. On my Dev-System (MAMP for Mac Version 2.2) everything is fine. It gets the latest Version and shows me the update notification. When I publish it to my Live System wich is a hosted webspace package. I don’t get the Update Notification. Even after waiting 12 hours or using ?force- check=1 What I already did was to create a simple Plugin that logs a string to the wordpress log when "pre_set_site_transient_update_plugins" is called. Again on my Dev-system it works, but not Live. So I think it has something to do with the PHP configuration. Does anyone has an idea which setting could prevent this filter from beeing executed? Thanks


LogOut button only if logged in in front end menu widget

I would like to add a "LogOut" button at the end of my sidemenu - but of course only, if someone is logged in. I also want to have it in two languages using qtranslate. At the moment I have created a new Menu Item "Log Out" with a link to `/wp- login.php?action=logout` which works, but always shows up of course. Is there a way to put something like this in the function? Any help - or just a hint would be very nice! :)


How to correctly add a table to the Wordpress MySQL database

I want to add a new table to the Wordpress database. I need this one for a specific section of my Wordpress website, that requires something a bit different than what I can achieve through custom posts. What would be the correct approach to do that? Is it enough to just add a table of my own or is there something I need to do in PHP code as well to make Wordpress aware of it? Will this affect in any way Wordpress upgrade procedures?


Recent Posts widget missing current_menu_item class

Unlike the (WP standard) Custom Menu widget, the Recent Posts widget does not add the current_menu_item class when a post is selected (being displayed). This seems like a major oversight, am I missing something? If not, does anyone know of a third party widget that lists the most recent posts and includes the current_menu_item class (or equivalent)? ...or perhaps some magical hack to achieve the result of adding a class to the active menu item?


Change website URL without breaking links or images? WP 3.3

I am using Wordpress 3.3.2. Currently I am working on a website in a dev folder on my domain, dev.domain.com. Upon creating pages and blog posts, it just occurred to me that when I move the WP website from dev.domain.com to domain.com that all the images I have used in all my pages and posts will break. Also some images are linked to specific pages or blog posts. Those will break as well. I don't know why I was under the impression that when I linked to images in the WP media manager or when I linked to specific posts, the information updated if the website URL or permalink structure changed. Can anyone advise me on either how I should go about adding pages/blog posts/images while in my dev folder so the links won't break when I move over OR what would be the best way to fix all the broken links once I have moved the website over to domain.com? Thank you in advance for all your advice!


FTPS Uploads - wp-content cannot be found

i've arranged my new Server and i use proFTPD with TLS Support. Now, WordPress can't upgrade or install plugins anymore. I get the following message: The directory "wp-content" cannot be found This is my FTP(S) Setup at wp-config.php:               /** FTP */     define( 'FS_METHOD', 'ftpext' );     define( 'FTP_USER', 'username' );     define( 'FTP_PASS', 'password' );     define( 'FTP_HOST', 'example.com' );     define( 'FTP_SSL', true );      EDIT: previously i have defined the following constants to prevent this bug:               define('CONCATENATE_SCRIPTS', false);     putenv('TMPDIR='. $_SERVER['DOCUMENT_ROOT'] .'/wp-content/tmp');     define('WP_TEMP_DIR', ABSPATH . 'wp-content/tmp');      .. but that doesn't work anymore.


How to limit the number of posts on the home page?

I am working on my first WP site and am having some difficulty. In my theme's index.php page, I see the following code:               <?php      query_posts(array(       'category__not_in' => array($headline),       'post__not_in' => $postnotin,       'paged' => $paged,       'numberposts' => 5     ));     if ( have_posts() ): $postCount = 0; ?>     <?php while ( have_posts() ) : the_post(); $postCount++;?>     [more code....]      So - you see I'm trying to limit the number of posts on the home page to 5, which I thought was the default. Anyways, it is showing more than 5 and I can't seem to get it to work. I've tried "posts_per_page" without luck. If my theme is overwriting it, any ideas where that may be? FWIW, I'm using the initiator theme by colorlabs Thanks!!!


wp_list_categories() not listing categories

I've many categories in my database but when i'm calling `wp_list_categories()` it is not listing any categories, its only outputting               Categories       No categories      Also, I'm trying to populate it using `get_categories()` but still same problem, it outputting as if there were no category


How to implement two separate featured images for each post/page

So I would like to set two separate feature images for each post/page. One would be a rectangle for use in a slider and another would be a square for use on archive pages, search pages, category pages. WordPress can do this, but it either resizes the initial image to the nearest resolution or crops it. I would rather create it myself and upload it.


Auto Refresh Post List after X seconds

i'm new in wordpress, and i really need a help here. My main site, list the resume (excrept) of all posts, with pagination. But when a user publish a new post, the only way to see it on the main page is to reload it... I want to know if there's a way to automatic show new posts , like facebook.... I didn't found a way to do it untill now. I've removed the following line from my index.php (inside the /wp- content/themes/wp_blogger/):               <?php if (have_posts()) : while (have_posts()) : the_post(); ?>          <?php include(TEMPLATEPATH."/excrept.php"); ?>          <?php endwhile; else: ?>

<?php _e('Nenhum post encontrado com estes critérios.'); ?>

          <?php endif; ?>      I've put the code above inside a load.php (at the same directory), and replace it inside the index.php with:

      But no luck with that... i'm getting this error: Fatal error: Call to undefined function have_posts() in /var/www/RMON/blog/wp- content/themes/wp_blogger/load.php on line 1


Limit ads appearing more than three times

I am using the following code in content.php to repeat an ad insertion. Ads are inserted in the middle of every 2nd row in a grid of thumbnails. There are 3 thumbnails per row.               <?php else : ?>       <?php global $wp_query; ?>      <?php if (($wp_query->current_post + 1) % 5 == 0 ): ?>       <div class="box">        <adsense code>       </div>     <?php endif; ?>      However Google's AdSense policy limits 3 content ads per page and I don't want to violate these terms. How can I limit this to only three instances? Thanks for your help.


Using wordpress and codeigniter in one website

Is it possible to use WordPress as the CMS but all of contents will be displayed using CodeIgniter? What I want to know also if I can use the WordPress functions by simply including this `wp-blog-header.php` in the CodeIgniter. Do you guys think this idea will work? Probably one of the function I really need is `apply_filters()`


Retrieve post thumbnails

I am trying to build a wordpress blog from scratch. I am looking to retrieve all the articles from a specific category. I then want to also include the SQUARE thumbnail(not a stretched version, a cropped square). I am slightly confused on how to do this. I tried searching the web.
Latest free recipe
     <?php $temp_query = $wp_query; ?>     <?php query_posts('category_name=recipes&showposts=1'); ?>     <?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>

     By <?php the_author() ?>

     <?php                if ( has_post_thumbnail() ) {        the_post_thumbnail();     }else{          }          ?>     <?php the_content(); ?>
     <?php endwhile; ?>


What is the Wordpress Pinecone sitting on top of?

Does anybody know where wordpress gets their banner images? Perhaps we could find the original photo? I'm curious just what exactly this pine cone is sitting on top of. ![image](http://img828.imageshack.us/img828/9583/pinecone.jpg)


Possible to change meta data single quotes to dobule quotes in yoast wordpress seo?

The yoast wordpress seo plugin puts meta description and meta keywords in single quotes. The issue here is that many old spiders and directory submission sites do not read meta data in single quotes. Also i dont really know if there is any benefit in using single quotes over dobule quotes for meta data. So i am wondering if it is possible to change those single quotes to dobule quotes? Thanks