Comments vs. Pingbacks next page issue

I have a really annoying problem. If there are no comments, comments won't show up. If there are no pingbacks, won't show up. However, if there are pingbacks and I have a lot of comments, so there's a page 2, page 3 etc. of comments, then the following happens: The pingbacks show up properly on page 1. If I go to page 2, I see the HTML markup for the Pingbacks, but no actual pingbacks. I don't understand why. What I want is that either the same pingbacks as on page 1 show up or no HTML markup (and no pings) at all. You can see the problem here. On page one everything works fine, but on page 2 I only get the HTML markup for the pingbacks. Here's the code:               <?php if ( have_comments() ) : ?>             <?php if ( ! empty($comments_by_type['comment']) ) : ?>
<?php comments_number('No Comments', '1 Comment', '% Comments' );?>

           <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
       <?php paginate_comments_links(); ?>

             <?php endif; ?>                            <?php if ( ! empty($comments_by_type['pings']) ) : ?>
Trackbacks/Pingbacks

         <?php wp_list_comments('type=pings&callback=list_pings'); ?>
             <?php endif; ?>                     <?php else : // this is displayed if there are no comments so far ?>                  <?php if ('open' == $post->comment_status) : ?>                                       <?php else : // comments are closed ?>
Comments are closed.
                  <?php endif; ?>     <?php endif; ?>      What I already tried was to reposition or even remove the navigation. It didn't change a thing. Any other ideas? **EDIT: October 21st** If it doesn't work to remove the HTML markup, then how about displaying a message within the HTML markup instead, something like "Sorry, but there are no pings yet." I tried this, but nothing is being displayed:                 <?php if ( ! empty($comments_by_type['pings']) ) : ?>
Trackbacks/Pingbacks

         <?php wp_list_comments('type=pings&callback=list_pings'); ?>
         <?php               else :              echo '
sorry but there are no pingbacks yet
';             endif;               ?>       I hope somebody can help.


Plugins Page invisible / white

I found a lot of posts about the white-screen-of-death, but as far as I can tell, that's not my problem. Whenever I open the backend, everything is fine until I enter the plugins section. The secondary Navigation and the content on the rigth are completely blank, however if I move the mouse over it, or if I just select everything it becomes visible again. The problem only occurs from within firefox. I already deleted all local files (cache etc.) and I checked the plugins.php for changes. But oddly enough I was not able to find any local explanation. Is there any known bug that could cause these blank parts?


Append a value to a certain page's URL before page load

This particular website is using Tubepress to display a youtube video gallery. Now, Tubepress recommends that, to define which video goes to the front part of the gallery, we should append the id to the url, like this:               http://mysite.com/videos.php?tubepress_video=somevideoid      So, i already have a an option stored with the default video ID for the videos page, but i'm getting some trouble in dinamically appending that value to the URL everytime the video page is loaded. So far, i've tried URL Rewrites, with no luck, and then i found this: Custom URl parameter and it seemed to be exactly what i want. I figured there's also a page_link filter hook, but there's no documentation on it. So this still isn't working and i'm not quite sure why. Me actual code looks like this:               function append_parameter( $link, $my_parameter ) {              if(is_page('videos')) {             $my_parameter = get_option('featured_video_id');                  if ( isset($my_parameter) ) {                  $link = add_query_arg( 'tubepress_video', $my_parameter );             }             return $link;             }         }     add_filter( 'page_link','append_parameter', 10, 2 );      any ideas?


How to make a Thumbs Mosaic

I'd like to share with you an idea for styling a bit a category template. Here it is: I'd like to make a mosaic with all the post thumbnails of a category and use it as the heading image on the category page. Does anyone know about a plugin that already makes that magic happen? Any suggestion about how to approach the task will be appreciated! Thanks guys Bye Carletto


Help With Rewrite_Rules For a Custom Plug-In

I've been reading through this question and answer with great interest as I'm trying to achieve something very similar, but I'm failing and was wondering if someone could help me out. I am also using a custom plug which is querying a custom table in order to populate a page. The page is a normal WP page with a template attached that calls a function to my plug-in file to get data. If I type this in the URL I get my page loading properly: > www.mywebsite.com/?pagename=products/food-and-catering- > workwear&prodid=232&pname=Trilby Hat I would like to type this (or use it in a link) and get the same result: > mywebsite.com/products/food-and-catering-workwear/232/Trilby Hat/ (BTW, I also was thinking the reverse about rewrite_rules at first; that it would actually 'change' my URL to the more 'friendly' version once in place :-) I have added this line to the init function in my plug-in file (one thing is that I'm using this same init function to enqueue some js -- I was assuming it would bo okay to just add this line to the same function):                add_rewrite_rule('([^/]+)/([^/]+)/([^/]+)/?','index.php?pagename=$matches[1]&prodid=$matches[2]&pname=$matches[3]','top' );      Note: in my page hierarchy there will always be a parent page and a child page in the slug; chances are the parent will always be the same page, but the child will definitely vary. But I'd like to keep the rule flexible to catch all possibilities. The main trigger for my plug-in will be these two variables in the query string. I've also added prodid and pname to $query_vars:                add_filter( 'query_vars', 'prod_query_vars' );         function prod_query_vars( $query_vars )         {             $query_vars[] = 'prodid';             $query_vars[] = 'pname';             return $query_vars;         }      Does anyone see where I'm going wrong? One other thing. I'm not understanding the rule- flushing part. Since this is in a plug-in (not functions.php) when do I need to flush the rules? Each time I've updated the plugin file (trying out different code possibilities), I've first gone to the Permalinks page before trying to use my 'friendly' URL format. I noticed in one of the examples from the previous question: flush_rewrite_rules(false) was placed in the register_activation_hook() function, but my plug-in is already set up and running. I'm trying to alter it, so I'm thinking at this point I wouldn't be using this (but maybe this would be a solution for future 'installs' of the plug-in) I'm also not that versed in regular expressions, so I know it could be there where I'm going astray. Sorry for the long-winded question, but I wanted to supply as much detail to my situation as possible. Thanks in advance to anyone who can help.


Is there ANY way to remove comments function and section totally?

I don't want any comment querys to run. I don't wont anything about comments to be shown in wordpress admin area. **Is this possible in any way?** **EDIT:** Remove all links to the comments from admin bar, and all of the backend section.


How to add TinyMCE to a front-end textarea?

I would like to let the user edit their comments using TinyMCE. Is there any way of doing this?


How to remove dropdown from wp_nav_menu

I dont want to have dropdown (select - options) in my wordpress menu, even in mobile or lower width devices. I know I can use css to hide it, but I want to remove it at all. I googled for an hour and I found that I should use a custom walker on Roots!!!! but I dont know whats that and how. please help me, I am a newby.


Custom comment status possible?

I am a newbie to WordPress and I have some experience in PHP programming. Recently, I have a lot of comments for my WordPress blog and I wanted to manage them in better order. I wish to "archive" some comments in which I plan to release them later and get rid of them from the "pending" status. There are currently 4 status for $comment_status: moderated, approved, spam and trash I know that it is possible to add custom post types. Is it possible to add custom comment status? If possible, which file should I edit? Thanks in advance.


Removing subcategories from permalinks

I run a small news site with tens of thousands of entries. I'm currently importing all of these into wordpress by rebuilding our old CMS into wordpress. So far, everything is coming over smoothly. My problem comes down to this: We run several different news sections. Sports, News, Arts, Oped, &c. The way our current permalink structure is set up, a post looks like this: `http://newssite.com/sports/2010/04/05/post-title.` However, the post is also tagged with a subcategory like "football" or "basketball". When I get everything into wordpress, permalinks want to show up as: `http://newssite.com/sports/football/2010/04/05/post-title.` **Is there a way to remove subcategories from showing up in permalinks?** I would rather not hack core files, but am willing to if it fixes our problems. Thanks in advanced.


Block post updates and deletion after a set period

Trying to adapt the code from here to my use case:               function wpbeginner_restrict_editing( $allcaps, $cap, $args ) {              // Bail out if we're not asking to edit or delete a post ...         if( 'edit_post' != $args[0] && 'delete_post' != $args[0]           // ... or user is admin           || !empty( $allcaps['manage_options'] )           // ... or user already cannot edit the post           || empty( $allcaps['edit_posts'] ) )             return $allcaps;              // Load the post data:         $post = get_post( $args[2] );              // Bail out if the post isn't published:         if( 'publish' != $post->post_status )             return $allcaps;              //if post is older than 30 days. Change it to meet your needs         if( strtotime( $post->post_date ) < strtotime( '-30 day' ) ) {              //Then disallow editing.              $allcaps[$cap[0]] = FALSE;         }         return $allcaps;     }     add_filter( 'user_has_cap', 'wpbeginner_restrict_editing', 10, 3 );      This works great, however how do I use seconds or minutes, not days? Say, '-300 seconds' doesn't seem to work.


Multiple meta data one label

I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have,               function custom_data_content( $post ) {       wp_nonce_field( plugin_basename( __FILE__ ), 'custom_data_content_nonce' );       $meta_values = get_post_meta($post->ID, 'file', true);       echo '';       if($meta_values != '') {         echo '<input type="text" id="fileName" name="fileName" placeholder="Enter the file name" value="' . $meta_values . '" />
';       } else {         echo '<input type="text" id="fileName" name="fileName" placeholder="Enter the file name" />
';       }       echo '<input type="text" id="fileSize" name="fileSize" placeholder="Enter the file size" />
';       echo '<input type="text" id="version" name="version" placeholder="Enter the version" />
';       echo '<input type="text" id="MD5" name="MD5" placeholder="Enter the MD5" />';     }      I have no idea how to reference each input using `$meta_values`. Can anyone help me?


Jquery UI Google CSS, from where?

Here's the site I'm having problems with: http://www.ashleymosuro.com/newsite/about For some reason, my custom theme I created for the Jquery UI is being overridden by the google hosted stylesheet, and I have no idea where in my theme it is referencing the stylesheet. Wherever it is, I need to get rid of it. I'm trying to style the progress bars in the sidebar so that they are 20px high. I have done this in my custom theme stylesheet but it just keeps being overridden. Any suggestions? Thanks,


What's the easiest way of adding more options in the Theme Options of the twenty eleven theme?

Wordpress 3.2 beta comes with twenty eleven. It has a Theme Option panel in the Appearance section: ![](http://wpmu.org/wp-content/uploads/2011/05/theme-options.png) I would like to know what's the easiest (and extendible) way of adding more options to that panel. For instance, changing the color of other elements?


How do I find posts?

I am a new website administrator and I am having issues with posts not showing on dashboard. Posts All(21) Published (13) Pending (8). This is a listing site and the posts used to show up. Any thoughts on how to fix this?


Create custom PAGE with register_post_type

The following code in functions.php outputs a post when I publish, not a Page:               // custom post_type for agenda     add_action( 'init', 'create_my_post_types' );         function create_my_post_types() {         register_post_type( 'agenda', array(             'labels' => array(                 'name_admin_bar' => _x( 'Agenda', 'add new on admin bar' ),             ),             'public' => true,             'publicly_queryable' => false,             'capability_type' => 'page',             'map_meta_cap' => true,             'hierarchical' => true,             'rewrite' => false,             'query_var' => false,             'delete_with_user' => true,             'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),         ) );}      What am I doing wrong? ### The full problem: I need to add a metabox to a page, but only the "agenda" page, I don't want this metabox to appear in every page in admin panel, so I'm creating a custom post_type with the exact same functions of a page, only with a different post_type to be able to set a metabox to it alone. ### Screenshot of current output: http://i.stack.imgur.com/oPEx8.png (can't post direct images yet, so please click link)


Moving from one WP site to a new WP site incrementally

I'm working on a site that will be changed incrementally (i.e. first the new Homepage will go live, then product pages, then contact, etc). It will not be a switch-flip, wholesale changeover between the two sites. The old version is built on WP and the new one will be too, but I don't want to use the old files and install, but rather want to start with a fresh install. What are my options for having them coexist on the server and have some pages served from one install and some from another? This is not a multisite setup as both sites will need to use the same domain.


Apply post formats to a specific post type only?

I have the following code in functions.php to give me post format support and a custom post type 'photos'. But I would like the post formats to only apply to the 'photos' post type and not to the built-in 'posts' post type.               add_theme_support( 'post-formats', array( 'image', 'chat', 'video', 'gallery' ) );     //custom post type     add_action( 'init', 'create_post_type' );     function create_post_type() {         register_post_type( 'photos',             array(                 'labels' => array(                     'name' => __( 'Photos' ),                     'singular_name' => __( 'Photo' )                 ),             'public' => true,             'has_archive' => true,             'rewrite' => array('slug' => 'photo'),             'menu_position' => 5,             'taxonomies' => array('genre'),             'supports' => array('title', 'editor', 'thumbnail', 'post-formats'),             )         );     }      Many thanks for your time and help.


check if .min.css stylesheet exists

My plugin displays its output into a thickbox 'window', the contents of which are generated in load-edit.php. This is a completely bare page, but I want to use some of the admin css styles so that it integrates nicely with the rest of the UI. I can't do a regular admin_enqueue_scripts because nothing from wordpress is loaded anywhere. Now I'm already polling for the user admin styles, but I then need to check whether there's a .min.css available of the stylesheet (noticed in an older version that it's not), which I could do with file_exists(), but that needs an absolute path... which I don't have. I have get_site_url() but that only give the base url, not the part that's usually called 'wp-admin' (assuming here that this is something that could be different if the user installed it differently?). here's what I'm trying to get working:               $adminbaseurl = /* this is what I'm mising */;     if (get_user_option('admin_color') == "classic") {         if (file_exists($adminbaseurl . 'css/colors-classic.min.css')) {             $colorschemeurl = $adminbaseurl . 'css/colors-classic.min.css';         } else {             $colorschemeurl = $adminbaseurl . 'css/colors-classic.css';         }     } else {                 if (file_exists($adminbaseurl . 'css/colors-fresh.min.css')) {             $colorschemeurl = $adminbaseurl . 'css/colors-fresh.min.css';         } else {             $colorschemeurl = $adminbaseurl . 'css/colors-fresh.css';         }     }      to be used later as:               <link rel='stylesheet' type='text/css' href='<?php echo $colorschemeurl; ?>' />      I guess the most simple answer could be that the wp-admin folder is ALWAYS called wp-admin, but I couldn't find that out... * * * Edit: looks like I can't use get_site_url anyway, since file_exists only takes the local path...


Migrating from PDO using SQLite to clean new install using MySQL

I've been using PDO plugin for wordpress and SQLite database. It does not work as expected so I want to use MySQL database, but without PDO for Wordpress since I cannot trust that plugin anymore, It has not been updated for more than 2 years. So, this is what i did:   1. Exported SQLite database to sql file   2. Made necessary changes in syntax http://www.maxkpage.com/blog/free-sqlite-to-mysql-converter-super-easy/   3. Installed new Wordpress with new MySQL database   4. Copied old Wp-content folder and replaced the new one   5. Imported old data by copying all "INSERT INTO ...." form old into new tables, which I emptied first Now, here comes the problem. Everything works fine, I can see the posts on website, but when I populate wp_users or wp_usermeta or wp_options with old data I get "You don't have sufficient permissions" message when I log into dashboard. Not wrong username or password, but when I log in I just see that message and the website becomes white blank. Where is the problem and how can I fixed it?


Why does the first page of one category redirect to empty page 4?

When I load this URL on my WP e-ecommerce site, it 301 redirects to page 4 which does not exist, and appears as a page with empty contents: Go to this URL: http://comfortboost.co.uk/new/?wpsc_product_category=bath- hoists And there will be a 301 redirect to: http://comfortboost.co.uk/new/?page_id=4&wpsc_product_category=bath-hoists Which gives a 404 Not found error. It should display the first page of the category instead. Why does this happen? I can provide admin login details if that will help. This is a fresh installation with barely any changes, but with 4000 products imported in from a wordpress format XML file. Other categories work just fine and return some content.


Exclude categories and subcategories in QueryLoop

I want a QueryLoop that exclude some categories and its subcategories, I have this:                       $args = array(                 'category__not_in' => array( 2, 6 ),             );      this exclude the categories, 2 and 6 , but no its subcategories, what can I do? ====== Update ======= This is what I did, but now I'm searching for a better solution:                       $excludes = array(2,6);             $ex_childs = array();                  foreach($excludes as $exclude){                  $a = get_categories('child_of='.$exclude);                 foreach($a as $key => $value){                     $ex_childs[] =  $value->cat_ID;                 }             }                             $all_excludes = array_merge($excludes, $ex_childs);                  $args = array(                 'category__not_in' => $all_excludes             );


Search Form Not Working

www.milknhny.co.uk/ClearWatch Im using a basis of the Twenty Twelve theme and im using the below script (yes i know that the wrappers are not correct as yet) However its defaulting back to the main page... any ideas?               <?php     /**     * The template for displaying Search Results pages.     *     */          get_header(); ?>

              <?php if ( have_posts() ) : ?>
<?php printf( __( 'Search Results for: %s', 'Clearwatch' ), '' . get_search_query() . '' ); ?>
                                         <?php /* Start the Loop */ ?>             <?php while ( have_posts() ) : the_post(); ?>                 <?php get_template_part( 'content', get_post_format() ); ?>             <?php endwhile; ?>                        <?php else : ?>

<?php _e( 'Nothing Found', 'Clearwatch' ); ?>

<?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'Clearwatch' ); ?>
                     <?php get_search_form(); ?>

              <?php endif; ?>

      Well guys i double checked my search form and it had index.php in below: so i changed it to my search.php path and it appears to be searching but defaulting back to my own website theme? Any ideas                 <form id="searchform" method="get" action="<?php bloginfo('template_url'); ?>/Clearwatch/search.php">


How to conditionally enqueue a stylesheet only for a certain page(s)?

Before I get started, I want to acknowledge that there are some really good articles that are targeted at how to conditionally enqueue scripts based on page/post content.   * WordPress Plugin Development - How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts   * How to load JavaScript like a WordPress Master These are great, but they're much more advanced than what I want to do. I feel like the answer is using the built-in `is_page()` function (codex), but when I try to use it the site breaks, or just doesn't work. I think I'm just executing the conditional logic in the wrong spot. Here's what I've tried to add to my functions.php:               function register_more_stylesheets() {         wp_register_style( 'stylesheet_name', get_stylesheet_directory_uri() . '/stylesheet.css' );     }     function add_my_stylesheet() {         if ( is_page('products-services') ) // using page slug         wp_enqueue_style( 'stylesheet_name' );  // no brackets needed for one line and no else     }     add_action( 'init', 'register_more_stylesheets' ); // should I use wp_print_styles hook instead?     add_action( 'wp_enqueue_scripts', 'add_my_stylesheet' );      When I remove the conditional part of it, the stylesheet is successfully enqueued so I know that works.


How to remove or customize "Comment" in comments form?

![Image showing current comment form](http://i.stack.imgur.com/0anYp.png) As you can see in the picture: "Comment" label displays always in the same place. How can I remove it or customized it? I really don't know what function controls this label. Part of my comments.php looks like this:               <?php if ( have_comments() ) : ?>
                 <?php wp_list_comments(); ?>
                  <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :  ?>
Comments Navigation

<?php previous_comments_link('Older Comments'); ?>

<?php next_comments_link('Newer Comments'); ?>
                          <?php endif; // check for comment navigation ?>         <?php endif; ?>              <?php if ( comments_open() ) : ?>             <?php comment_form(); ?>         <?php elseif ( have_comments() ) : ?>
Comments are closed
         <?php endif; ?>


Editing Screen: Make Update or Publish Button Follow The Page

**The Problem:** I am currently in the finishing stages of a premium theme I've been developing and all is mostly well. For pages I have a few custom meta boxes for adding in slideshows and other additional pieces of page content and have found that the editing screen is now pretty long. Due to the large vertical height you find yourself changing something at the bottom and then having to scroll back to the top to click "publish" or "update". This gets tiring after editing 2 pages. _(see image below to see the problem first hand, click to enlarge)_ ![enter image description here](http://i.stack.imgur.com/QXYRS.jpg) **The Question:** Is there a way to make the publish/update meta box follow the page so the "publish" and "update" buttons are always accessible and visible without having to scroll all of the way to the top?


Character Limit w/ Excerpt removes Images Why?

So I limited the amount of characters per post via `the_excerpt('50')` but it removes the image that I added to my post. How can I bring that image back so it shows up above the post then limits the characters?


Is it possible to use a single custom post as the site front page

I know I can set a static page as the homepage but is it possible to set a single custom post as the site front page? I created a custom post type called "portfolio" where users can add all the work they have done as posts and I need one of those posts to display as the homepage, exactly as if you would set a static front page in the reading settings. Thanks in advance!


Can't seem to get set_blog_id working, it just doesn't reset the blog ID

Trying to iterate through a list of the sites and I can't seem to get set_blog_id working. Here's the sample output: Array ( [0] => stdClass Object ( [blog_id] => 2 ) [1] => stdClass Object ( [blog_id] => 3 ) [2] => stdClass Object ( [blog_id] => 5 ) ) get new_blog_id from array and check value - blog_id= 2 current_blog= 5 use set_blog_id to set current blog_id to new_blog_id after set_blog_id, get_current_blog_id= 5 - _should be 2_ after resetting to oldblog get_current_blog_id 5 As you can see, everything is working but the set_blog_id. Here's the code. Any help would be appreciated!               function return_blog_first_posts(){     global $wpdb;          $site_blog_ids = $wpdb->get_results($wpdb->prepare("SELECT blog_id FROM wp_blogs where blog_id > 1")); /* get all subsite blog ids */     print_r($site_blog_ids); /*output check - "Array ( [0] => stdClass Object ( [blog_id] => 2 ) [1] => stdClass Object ( [blog_id] => 3 ) [2] => stdClass Object ( [blog_id] => 5 ) ) "     echo "
"; */          foreach( $site_blog_ids as $blog_id ) { /* iterate through the ids */     print_r( "
new blog_id check - blog_id= ".$blog_id->blog_id ); /* output check - this shows blog id */          echo "
current_blog= ".get_current_blog_id();     $newblogid = $blog_id->blog_id; //     $oldblog = $wpdb->set_blog_id( $newblogid ); // this is not working     echo "
 after set_blog_id, get_current_blog_id= ".get_current_blog_id();     }     /* Tell the $wpdb object to go back to using the current site */     $wpdb->set_blog_id( $oldblog );     echo "
 after resetting to oldblog get_current_blog_id ".get_current_blog_id();     }     return_blog_first_posts();


Front end post submission form with duplicate type fields

Here is the simple front end post submission form code               <?php $postTitle = $_POST['post_title'];     $post = $_POST['post'];     $submit = $_POST['submit'];          if(isset($submit)){              global $user_ID;              $new_post = array(             'post_title' => $postTitle,             'post_content' => $post,             'post_status' => 'publish',             'post_date' => date('Y-m-d H:i:s'),             'post_author' => $user_ID,             'post_type' => 'post',             'post_category' => array(0)         );              wp_insert_post($new_post);          }          ?>     <!DOCTYPE HTML SYSTEM>               <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />     <title>Untitled Document</title>
     <form action="" method="post">

         Post Title	         <input name="post_title" type="text" />

         Post	         <input name="post" type="text" />

          <input name="submit" type="submit" value="submit" />     </form>
                     Its working. But can anyone give me some sample code for "Add another image" type custom fields. ## Update: Hi i'm using magic fields plugin. I have a custom field called "products image". This is the custom field id "products_image'. That plugin uses meta table to store its custom fields values. I would like to have "Add another image" button in the form. So the users can upload additional product images Thanks


Create custom page and custom menu

I'm trying to do one custom menu at my wordpress admin panel. My plans are: make and menu, to add some contents at a custom page, like "people" and their names, etc... I wanna make it with php. I used this only to view whats happen:               add_action('admin_menu', 'register_my_custom_submenu_page');          function register_my_custom_submenu_page() {         add_submenu_page( 'tools.php', 'My Custom Submenu Page', 'My Custom Submenu Page', 'manage_options', 'my-custom-submenu-page', 'my_custom_submenu_page_callback' );      }          function my_custom_submenu_page_callback() {         echo '
My Custom Submenu Page
';          }      It added an page, inside tools menu, what can I do to create on an exclusive menu?? On `my_custom_submenu_page_callback`, what can I do to work with embedded PHP code? like `mysql_query` and stuff?


custom post-type query just returns two posts

I'm making a custom activity calendar for a client here: http://arbeidshesten.com/aktivitetskalender/ The backend is a custom post type "aktiviteter", with custom fields for the date ("dato") and some more details. The code looks like this:

     Aktivitet	     Sted	     Dato	     kontaktperson
                <?php $loop = new WP_Query( array(      'post_type' => 'aktiviteter',      'meta_key' => 'dato',     'meta_value' => date('Y-m-d'),     'meta_compare' => '>=',     'orderby' => 'meta_value',     'order' => 'ASC'      ) ); ?>          <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>          <?php $display_date = date('d.m.Y', strtotime(get_post_meta($post->ID, "dato", true))); ?>
        <?php the_title( '', '' ); ?>	     <?php echo get_post_meta($post->ID, "sted", true); ?>	     <?php echo $display_date; ?>	     <?php echo get_post_meta($post->ID, "kontaktperson", true); ?>
          <?php endwhile; ?>
      Funny thing is that the query returns just 2 aktivities, even though I entered (and published) about 5 future activities. Anyone a clue?


Why can't I hook into save_posts after admin_init?

I'm trying to hook into the "save_post" action from an AJAX callback in my plugin, but it doesn't seem to work. In fact, hooking into "save_posts" only seems to work from a few key action execution points (e.g. "init" or "admin_init") but not from others (e.g. an "add_meta_boxes" callback). In my particular case, I'd like to click a button on the Edit Post screen to add a new custom metabox, and have it save the metabox's data properly. But of course by the time I click that button and add that metabox, I've already hooked the "save_post" action once and WP seemingly doesn't want to let me hook it again. Looking briefly through the WP source code, I don't see any obvious reasons why I shouldn't be able to hook that action again. Any ideas how to work around this apparent limitation, or at least an explanation as to why it's not working?


How to add default images into theme customizer image control?

I am trying to figure out how I can pre-load a theme customizer image control with images I have selected. Is their a way to point the control to a directory so they automatically show up in the uploaded list? So the user can select an image from the list if they like it. If anyone could explain this I would greatly appreciate it. **EDIT: I have decided to add more information along with the bounty.** When a user is using the theme customizer(built with the theme customizer API), and they end up deciding they don't like the current background image and wan't to edit it, so they choose the background image setting/control to change it. Well I would like for a group of images to appear in the dropdown by default so if the user wants one then they can choose it, or else upload a new image. So when they select the drop down it will have say 5 or so images pre-loaded inside. I think that this probably needs to be done by pointing the control to a folder but I am not sure how. I have seen this before but I cant remember where. I am using the default image control in the theme customizer.


Code for parent category in WooCommerce not working

I have the following code but it's not displaying the parent category of the product in WooCommerce.               $category = get_the_category();     $ancestors = get_ancestors( $product->id, 'product_cat' );     reset($ancestors);     echo current($ancestors);      What am I doing wrong?


empty WP_Query object on local install

I just realized, that i got a complete ***empty WP_Query object*** on my plain wordpress install. I reseted the DB, deactivated all plugins and activated TwentyTen as theme, but the complete Object simply is empty on every request (public & admin facing). It doesn't matter if i request the " _Hello World_ " post or a `404`. Everything is empty. What reason could this have? **Edit 1**   This is how i inspect **WP_Query** :               // inserted on top of the functions.php file,      // so it's equal to a function hooked into the 'after_setup_theme' hook       // i also tried other hooks (which should make no difference) and got the same result.         echo '<pre>';              print_r($GLOBALS['wp_query']);          echo '</pre>';      This is the result from the `print_r();`               WP_Query Object     (         [query] =>          [query_vars] => Array             (             )              [tax_query] =>          [queried_object] =>          [queried_object_id] =>          [request] =>          [posts] =>          [post_count] => 0         [current_post] => -1         [in_the_loop] =>          [post] =>          [comments] =>          [comment_count] => 0         [current_comment] => -1         [comment] =>          [found_posts] => 0         [max_num_pages] => 0         [max_num_comment_pages] => 0         [is_single] =>          [is_preview] =>          [is_page] =>          [is_archive] =>          [is_date] =>          [is_year] =>          [is_month] =>          [is_day] =>          [is_time] =>          [is_author] =>          [is_category] =>          [is_tag] =>          [is_tax] =>          [is_search] =>          [is_feed] =>          [is_comment_feed] =>          [is_trackback] =>          [is_home] =>          [is_404] =>          [is_comments_popup] =>          [is_paged] =>          [is_admin] =>          [is_attachment] =>          [is_singular] =>          [is_robots] =>          [is_posts_page] =>          [is_post_type_archive] =>          [parsed_tax_query] =>      )


Shopp Plugin Remove Quantity Dropdown

I am using the Shopp plugin and wanted to remove the quantity dropdown so a customer can only add one at a time. Any thoughts or help is appreciated.


Remove wptexturize from a shortcode?

Is there a way to remove `wptexturize` only for a certain shortcode?


How can I set up the URL for a category archive for a custom post type?

I'm working on a site `www.site.com` that has an additional post type: `project`. In registering `project`, I've declared `"taxonomies"=>array("category")` so that I can categorize the essays. Works fine. Now, the post type archive is at `www.site.com/projects/` as I'd expected, but I can't seem to find a URL for a category archive that fetches only projects. I'd like it to appear at `www.site.com/projects/category1`. I've tried every combination of permalink/CPT registration options I could think of, but the best I've gotten was a 404. I am able to get the results I want if I manually enter `?category_name=category1` in the URL but can't seem to incorporate this into the permalink structure. Any hints?


query_posts and custom taxonomy posts order

i have a custom taxonomy defined for "Projects" and a page that shows all the projects. In this page there's a jquery filtering menu (isotope). Initially the page must show all the projects but chronologically ('chronological' is a category and 1970, 1980, 1990, etc are subcats for a Projects element) ordered in DESC mode. Now the query that initially shows the Projects in the page is               query_posts('post_type=portfolio&project-type='.get_post_meta($post->ID, 'portfolio_page_cats', true).'&posts_per_page=-1&orderby=menu_order&order=ASC');      There are a lot of questions about this argument, i know. Please, what is the best way to do that? Regards,


view subcategories order by id

this code to display subcategories in categories page i need to view subcategories sort as id subcategories can anyone update this code to view subcategories order by id               <?php     if(is_category()) {              $breakpoint = 0;         $thiscat = get_term( get_query_var('cat') , 'category' );         $subcategories = get_terms( 'category' , 'parent='.get_query_var('cat') );              $items='';         if(!empty($subcategories)) {             foreach($subcategories as $subcat) {                 if($thiscat->term_id == $subcat->term_id) $current = ' current-cat'; else $current = '';             $items .= '                       term_id ).'" title="">'.$subcat->name.'                        ';             }             echo "$items";         }         unset($subcategories,$subcat,$thiscat,$items);     }          ?>


Run WP Cron Weekly (but on a certain day)

I'm looking add-in a bit more speficity to the WP Cron intervals. To add a "weekly" interval, I've done the following:               function re_not_add_weekly( $schedules ) {         $schedules['weekly'] = array(             'interval' => 604800, //that's how many seconds in a week, for the unix timestamp             'display' => __('weekly')         );         return $schedules;     }     add_filter('cron_schedules', 're_not_add_weekly');      Which works great, but - the extra sauce here is getting that cron to run on a specific day:               if( !wp_next_scheduled( 're_not_mail' ) ) {         wp_schedule_event( time(), 'weekly', 're_not_mail' );     }      Anyone have any thoughts on the best way to accomplish this using WP Cron (assuming this isn't per a specific site that we'll have control over their cPanel/CRON area). Thanks! # Update Going at this full-force and found an article that may have clarified things a bit more, but doesn't exactly answer my question. The basic gist of that article states that the WP Cron isn't as flexible (past the "hourly, daily, weekly" params), so extending it to something like _weekly on a certain day_ seems a bit farfetched. The issue (calling it an issue out of confusion/frustration) I have with that is -> sure, I could disable WP CRON and have WP CRON run once a week using the server CRON, BUT, that also means that the items that are normally run, like plugin/theme updates, post deletions/publishes based on CRON are put on a backlog for an entire week (if I wanted CRON to run once a week every Monday for example). I'd have to assume others have come across this, so anymore insight on this would be a huge help. Thanks!


Logo is not being displayed in header (Twentytwelve)

So I have a image tag in the header.php of the Wordpress theme Twentytwelve like this:                        <hgroup>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>

<?php bloginfo( 'description' ); ?>
         </hgroup>      That's part of the code, the problem is that this logo is not being showed, instead I get a invalid image sign on the homepage.   * The location of the image is: wp-content\themes\twentytwelve\image   * The location of the header.php: wp-content\themes\twentytwelve So it looks correct to me, but it still doesn't show me the image? What can be wrong?


wp_before_admin_bar_render action not working in back office

This is working great in the front site wp admin bar:               add_action('wp_before_admin_bar_render', 'customize_admin_bar');          function customize_admin_bar() {         global $wp_admin_bar;         if (is_user_logged_in()) {             if ( !is_admin()) {               $wp_admin_bar->remove_menu('edit-profile');               //$wp_admin_bar->remove_menu('user-info');                   $wp_admin_bar->remove_menu('comments');               $wp_admin_bar->remove_menu('new-media');               $wp_admin_bar->remove_menu('new-tvr_booking');               $wp_admin_bar->remove_menu('new-vp_orbitslides');                $wp_admin_bar->remove_menu('orbitslider_settings');               //$wp_admin_bar->remove_menu('site-name');               //$wp_admin_bar->remove_menu('dashboard');               /*$wp_admin_bar->add_menu( array(                 'id' => 'custom-account',                 'parent' => 'my-account',                 'title' => __( 'Mi cuenta'),                 'href' => '/pedidos/products-page/your-account/'                 ) );*/             }              }     }      but not in the wp-admin menubar, why?


What filter/action hook can I use to add a few links to the admin comments page?

I would like to add a link to every comment when it's displayed in the recent comments admin page (edit-comments.php). For the sake of this question, the link should just be this: `<a href="mailto:[comment-author-email]?subject=hello">Mail comment author</a>` \- the actual thing I want to put there isn't really important, I just want to know how to do it. I have a few ideas for some things I want to add to the edit-comments.php page, so if you could help me understand where to place that example link in every comment, I'd be happy :) I would like to place this link in the 2nd column. The first column is the tick-box for bulk actions; the second column has the comment author name, akismet approved stats, email address and IP address. I'd like to be able to add this information under those items. Is this possible? I have been through the code for a few plug-ins that add links to the bottom of the comment itself, but I still can't even clearly work out how to do that, let alone put additional items in the 2nd column. If people could also give advice on what filter to use (and how to use it) to place this same link underneath the comment body (3rd column), that'd be great. I'm fairly experienced in using hooks, but can't get my head around this one. I'd be very grateful for any help!


User-Specific Timezones? Hack? Plugin?

Is there any way, whether it be a hack, a plugin, etc., to give users their own timezone? I am using a purchased SMS plugin. Users (my clients) login and are able to send out text messages when they choose. The plugin uses the post engine, including the scheduled post dialogue in the 'Publish' box, to send texts. Now, obviously the scheduled post dialogue works off the administrator's timezone under 'general' settings, which is a headache when you have users around the world using the plugin. Is there any way to give users their own timezones? There doesn't seem to be much information about this on the WordPress site, except a 'maybelater' here or there. Is there any workaround, hack, anything that one can use to force user timezones?


Custom form on front page redirects on error page

I've created a form in a wordpress page (it's hardcoded in it's template.) This form redirects on the same page as it's on. This form also verifies the data right there, in the template file. If I put this form on any page, it works. But on the front page, when I submit it, I get a page, with the default template, with only "There has been an error." in it's contents. So how can I make that form work everywhere? How can I use POST data returned by my form on the front page?


Get random posts between specific dates / of specific age

I need to get post IDs from a custom post type randomly and the posts are posted within 30 days.   But I can't really find a solution. How can I do it? This is my query.               query_posts("post_type='random_posts'&order='DESC'&posts_per_page=10");     //shuffle(query_posts())


Renaming a WordPress Admin Menu

I am trying to change the Admin Menu name for "WooCommerce" to "Store Settings". I tried the other code rename posts to articles, etc. but it did not work for WooCommerce. WooCommerce's Admin Menu function is as below:               function woocommerce_admin_menu() {         global $menu, $woocommerce;              if ( current_user_can( 'manage_woocommerce' ) )         $menu[] = array( '', 'read', 'separator-woocommerce', '', 'wp-menu-separator woocommerce' );              $main_page = add_menu_page( __( 'WooCommerce', 'woocommerce' ), __( 'WooCommerce', 'woocommerce' ), 'manage_woocommerce', 'woocommerce' , 'woocommerce_settings_page', null, '55.5' );              $reports_page = add_submenu_page( 'woocommerce', __( 'Reports', 'woocommerce' ),  __( 'Reports', 'woocommerce' ) , 'view_woocommerce_reports', 'woocommerce_reports', 'woocommerce_reports_page' );              add_submenu_page( 'edit.php?post_type=product', __( 'Attributes', 'woocommerce' ), __( 'Attributes', 'woocommerce' ), 'manage_product_terms', 'woocommerce_attributes', 'woocommerce_attributes_page');              add_action( 'load-' . $main_page, 'woocommerce_admin_help_tab' );         add_action( 'load-' . $reports_page, 'woocommerce_admin_help_tab' );              $wc_screen_id = strtolower( __( 'WooCommerce', 'woocommerce' ) );              $print_css_on = apply_filters( 'woocommerce_screen_ids', array( 'toplevel_page_' . $wc_screen_id, $wc_screen_id . '_page_woocommerce_settings', $wc_screen_id . '_page_woocommerce_reports', 'toplevel_page_woocommerce', 'woocommerce_page_woocommerce_settings', 'woocommerce_page_woocommerce_reports', 'woocommerce_page_woocommerce_status', 'product_page_woocommerce_attributes', 'edit-tags.php', 'edit.php', 'index.php', 'post-new.php', 'post.php' ) );              foreach ( $print_css_on as $page )             add_action( 'admin_print_styles-'. $page, 'woocommerce_admin_css' );     }          add_action('admin_menu', 'woocommerce_admin_menu', 9);      Below code helps to change the Menu Name, but it causes the CSS files to not properly load on Settings page.               function change_woocommerce_menu_title( $translated )     {         $translated = str_replace( 'WooCommerce', 'Store', $translated );         $translated = str_replace( 'WooCommerce', 'Store', $translated );         return $translated;     }     add_filter( 'gettext', 'change_woocommerce_menu_title' );     add_filter( 'ngettext', 'change_woocommerce_menu_title' );


Post__not_in only removing first 2 pages

I am using post__not_in to remove pages from a query but it's ignoring anything more than 2 items My code:               $selected_check = array();       $checks = new WP_Query( 'post_type=page&orderby=menu_order&order=ASC&posts_per_page=-1');       while($checks->have_posts()){        $checks->the_post();        global $post;        $this_check = get_post_meta($post->ID, '_cmb_hide_home', true);        if($this_check == 'on'){         $selected_check[] = $post->ID;        }       }        wp_reset_postdata();            $new_check = implode(", ", $selected_check);            $query1 = new WP_Query(array(       'post_type' => 'page',       'orderby' => 'menu_order',       'order' => 'ASC',       'posts_per_page' => '-1',       'post__not_in' => array($new_check)      ));      My $new_checks array is currently 51, 76, 10, 21 but it's only working on the first 2 items Is there something I am missing in my code?


How can I show/hide HTML elements if the page is_front_page

For example if its `'is_front_page'` I want to hide a div. If its not the `'is_front_page'` i want to show the div. How can i achieve this? I am not sure on how I can achieve this. Any assistance would be great. Thanks


Add "last" and "first" to Wordpress Comment Pagination Links

<?php paginate_comments_links(array('prev_text' => '«', 'next_text' => '»')); ?>      Using above in Wordpress theme to add comment pagination links - this displays as « 1 ... 4 5 6 "1" being the first page of comments and "6" being the last. I'd like to get something like this... (first) « 1 2 3 » (last)


How to query custom post types with multiple keys?

I recently upgraded WordPress from 3.0.x to 3.1.2. I had set it up to use custom post types before the upgrade. I need make a list of events that are occurring that started in the past until they occur. For example, if an event started today at Noon, it should show up in this list until it ends, which could be tomorrow at 6:00 PM. Can someone tell me how to modify this query so it will get custom posts that occur between the start and end date (multiple keys)?               $args = array ('post_type'      => 'events',                    'meta_key'       => 'end_date_value',                    'meta_compare'   => '>',                    'meta_value'     => $current_time,                    'orderby'        => 'meta_value',                    'order'          => 'ASC'                   );


Debugging / displaying errors in WP_Widget->form()

I'm finding that if I have errors in my code that's being called by my custom widget's form() method, I don't see any error display - the only indication I have is that in Admin > Appearance > Widgets the sidebars are all gone. What can be done to: a) avoid completely destroying all sidebars in Admin whenever your code has an error b) get more information about what is causing the error or exception?


how to show the syntaxis of a shortcode

i want to show the syntaxis in some posts about how to run a shortcode, I mean, something like this [myshortcode] but without running it, is that possible?


Automatically replace original uploaded image with large image size

As our users regularly upload ~6MB images to use on the website (and aren't too familiar with how to resize them first), WordPress stores the originals as well as resizing them to several different sizes. I'd like a function or plugin that takes the uploaded image, resizes it down to something more manageable and then replaces the original. I've seen some functions that delete the original but do not replace it, meaning it is impossible to regenerate the thumbnails at a later date. I need this to be replaced so the user can upload a large image and it is automatically resized down and stored for future resizing if needed.


How do I maintain static directories on multisite subdomains?

I'm trying to migrate from multiple subdomain blogs to WP multisite. The one stumbling block is that I'm pretty sure the static files and directories on my subdomains will not be found; each of my blogs has its own set of static files (downloads, mp3 archives, scripts, etc.). What would be a way to maintain these? Will the following work? I assume it will redirect anything with a `.` in it, no?               RewriteCond %{HTTP_HOST} ^sub\.domain\.org$     RewriteCond %{REQUEST_URI} \.     RewriteRule ^(.*)$ sub/$1 [R=301,L]


More quicktag driving me nuts

I'm a bit confused. I have my own custom post type - products. I'm listing all the products on page-products.php. Every product has also it's own page - single-products.php. And the big and strange thing is... I'm using more quicktag:               <!-- more -->      And it doesn't work on both single-products and page-products! I don't care about single page, but I'd love to use on the page-products listing. And I'm not able to. Documentation says: > The MORE quicktag will not operate and is ignored in Templates, such as > single.php, where just one post is displayed. http://codex.wordpress.org/Function_Reference/the_content So is it perfectly normal to not work for me in both cases? As far as I understand it should work in the first case... Is there a way to force more quicktag to display there? And yes, in both cases more "produces" perfect more span... But even content after the span is being shown... Thank you!


the_content() brings the medium size image

So I have the problem, the image I want to dispaly in post is not big enough and in my preffered size it gets bad quality, then i noticed that is not the default size image returned it's medium size and I tried to check but didn't find anything in particular.               while ( have_posts() ) : the_post();         the_content();         args = array( 'post_type' => 'attachment', 'orderby' => 'date', 'order' => 'DESC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID );         $attachments = get_posts($args);         $categories = get_the_category();     endwhile;


removing the list container <ul> from the custom menu output

any suggestions on how to get rid of **_ul_** tag wrapped around **_li_** tags in custom menu here at http://www.blueoceanportfolios.com/careers/ the custom menu is outputted with nested tags around like

Home

About

      I am trying to take out the tags and already passed the container => false parameter before outputting custom menu as mentioned at wordpress codex, below is code again.                $args = array(        'menu' => 'home_menu',        // 'sort_column' => '',         'container' => 'false',         //'container_id'=>'myID',         'menu_class' => 'navLeft',         'walker' => new my_walker()     );               wp_nav_menu( $args );


Corrupt htaccess after bulk changes

For some reason when I make bulk changes - such as mass edit tags or mass delete posts - my htaccess file becomes corrupt (lines of text disappear) leading to a 500 internal server error. I have a suspicion this is because the #Begin Wordpress rules are right at the bottom and WP Super Cache rules are above it. Has anyone else experienced this before?


Use different single.php file based on condition

I am customizing my WordPress site's theme and i need to use a different single.php file based on the condition. Here is my user case, i need to design a competition page where i need to show entries submitted by the people.Entries can belong to various categories so it is not possible to trek them based on the categories. I have created a tag (contest) and each entry belong to competition will be tagged with this tag, i can easily pick all entries based on this tag. On the main navigation bar i have placed a link `"Contest"` which will take user to the contest page, on this page i am showing all submitted entries with short description and link to go to story page. This is how i am displaying data on custom competition page               $ppp = get_option('posts_per_page');     $args = array(         "tag" => getContestPageData('tag_name'),         'posts_per_page' => 10,         'post_type' => 'post',         'orderby'=> 'date',         'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)                );      $posts=query_posts($args);      foreach( $posts as $post ) : setup_postdata($post); ?>         <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">            <img src="<?php echo $random_image[0]; ?>" alt="<?php the_title(); ?>" class="left"/>            moment user click on the anchor link it redirect user to the `single.php` page (if my understanding is correct) I need Tweak main story page so as can design it with Competition theme in mind and i can do it with following option   1. Put some conditional logic in `single.php`   2. For all user who click story link on my custom page, land them on some other page say `compition-single.php` Is this possible? please link to me appropriate resource or examples


What is the proper way to use add_rewrite_rule to remove the (question mark)?

I have a page called "People" with a custom template that takes in a variable called name: example.com/people/?name=FirstLast What I want is this: example.com/people/FristLast I know I need to use the add_rewrite_rule and add_rewrite_tag calls but I'm not sure how to achieve my desired result. I've tried this but I get a php error:               add_rewrite_rule('^people/([^/]*)/?','index.php?name=$matches[1]','top');     add_rewrite_tag('%name%','([^&]+)');      The error I get is: "Fatal error: Call to a member function add_rule() on a non-object" I think I'm on the right path. I'm very knowledgeable with WP but this is my first attempt to the rewrite rule. Thanks! \----- EDIT ----- I've updated the code. I no longer get an error but nothing "happens"               function rewrite_rule_people() {         global $wp_rewrite;         add_rewrite_tag('%name%','([^/]*)');         add_rewrite_rule('^people/([^/]*)','index.php?page_id=42602&name=$matches[1]','top');         $wp_rewrite->flush_rules();     }     add_action( 'init', 'rewrite_rule_people' );      going to /people/?name=JohnSmith doesn't change the url to /people/JohnSmith


Automatic SEO for wordpress

I know the ultimate seo plugin for seo optimizing seo. But with more that 250 post, and no seo plugin installed, i like to know if there is a plugin that will 1) make the title of the page, the title of the post 2) make the description based on the first paragraph 3) make the keyword meta by parsing the whole post, retreive all the reveland word that are more that 3% occurence, and fill the meta with them any idea ?


Redirecting after login?

I'm using the following to let the user login:                      <form name='loginform' id='loginform' action='<?php echo get_settings('siteurl')?>/wp-login.php' method='post'>                     User:
                     <input type='text' name='log' id='user_login' class='input' tabindex='20' /><input type='submit' name='wp-submit' id='wp-submit' value='Login' tabindex='23' />
                     Pass:
                     <input type='password' name='pwd' id='user_pass' class='input' tabindex='21' />                     <a href="<?php echo get_settings('siteurl')?>/wp-login.php?action=lostpassword"><?php _e('Forgot')?>?
                     <?php //echo "<input name='rememberme' type='hidden' id='rememberme' value='forever' />";?>                     <?php echo wp_register('',''); ?>                     <input type='hidden' name='redirect_to' value='<?php echo htmlspecialchars($_SERVER['REQUEST_URI'])?>' />                 </form>                 <?php                 global $opt_jfb_hide_button;                 if( !get_option($opt_jfb_hide_button) )                 {                     jfb_output_facebook_btn();                     //jfb_output_facebook_init(); This is output in wp_footer as of 1.5.4                     jfb_output_facebook_callback();                 }     ?>      But it stays in the same page, how can I redirect the user to the home page?


Blog Posts not showing title

I have my Reading settings set to Static pages and blog is set to a page called What's New. When I go to this What's New page I can see the post content but the post title with link to post page is not displaying. I can only see the post content. I have done everything I can think of to find the error, with no luck, please help! Code for index.php:
         <?php if (have_posts()) : ?>             <?php while (have_posts()) : the_post(); ?>                 <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?>
                     <?php the_time(__('F jS, Y')) ?>
                         <?php the_content(__('Read the rest of this entry »')); ?>

<?php the_tags(__('Tags:') . ' ', ', ', '
'); ?> <?php printf(__('Posted in %s'), get_the_category_list(' ')); ?> | <?php edit_post_link(__('Edit'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments »'), __('1 Comment »'), __('% Comments »''), '', __('Comments Closed') ); ?>

             <?php endwhile; ?>      I'm not sure if it's relevant but I have the commented out on the page template. Code for whats-new.php:               <?php if (have_posts()) : while (have_posts()) : the_post(); ?>         <div class="post" id="post-<?php the_ID(); ?>">
<?php the_title(); ?>

                     <?php the_content(''); ?>

     <?php endwhile; endif; ?>      I hope someone can help! If you have any ideas they're much appreciated. I've tried removing parts of my functions file, making the blog the home page under settings, and so other stuff. Any ideas?


Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?

I think `blogs.dir` is supposed to be used to separate content for the different blogs on a network install of Wordpress (MU or 3.0+ with networks enabled), however, I've not been able to find a clear guide to using it. Can someone shed some light and maybe post a few links to information on how to set it up, what to put in there, what the permissions should be set to, etc. ?


Change pagination in editing posts

> **Possible Duplicate:**   >  display all posts in wordpress admin How do I increase the pagination limit in the edit posts admin section (edit.php)? Thank you.


Is there a plugin that makes extnernal links open in new window, BUT

Is there a plugin that makes external links open in new window, BUT only on the pages or domains or links I specify?


Custom post type tag archives don't work for basic loop?

I have registered a custom post type with the right parameters. By that I mean I have added `'taxonomies' => array('post_tag','category')`, I have also tried using `register_taxonomy_for_object_type('post_tag', 'custom-post-type-name');` I have a custom function in my functions.php to load a basic loop using a conditional, along the lines of.               function child_maybe_do_grid_loop() {         if( is_tag() || is_category() || is_archive {     require(CHILD_DIR.'/custom-tag.php');      }     }      The content of custom-tag.php is just a very basic loop               <?php if (have_posts()) : ?>      <?php while (have_posts()) : the_post(); ?>         <?php the_permalink(); ?>" title="<?php the_title(); ?>       <?php endwhile; ?>         <?php else : ?>
Not Found
     <?php endif; ?>      This works fine for regular posts/page tags but for a custom post type tags I get "Not Found". Any ideas? I assumed a regular simple loop should work with custom posts type tag archives or do I need to put some extra conditionals/query's in there? ** Update toscho's comment made me turn on debugging and in comparison to a working tag page made through a default post, the debug for custom post tag is exactly the same. I even get count => 2 to show up as I incrementally add more custom posts to the same tag, yet the page refuses to return anything, I am at a loss.


Change default uploads file using wp Skeleton

I am using Wordpress Skeleton (https://github.com/markjaquith/WordPress- Skeleton) which pulls the themes etc out of the wp directory. I am trying to set it up so uploads have a custom url (eg: site.com/custom/url instead of site.com/uploads).               var_dump(wp_upload_dir());       Gives me:               array         'path' > '/file/system/path/www/wp/core/assets/2014/08'         'url' > 'http://site.local:8888/wp/core/assets/2014/08'         'subdir' > '/2014/08'         'basedir' > '/file/system/path/www/wp/core/assets'         'baseurl' > 'http://site.local:8888/wp/core/assets'         'error' > false      The Codex says: > This path can not be absolute. It is always relative to ABSPATH, therefore > does not require a leading slash. Is there any way to remove the wp from the url and baseurl while moving the path to a different directory? Like this:               array         'path' > '/file/system/path/www/core/assets/2014/08'         'url' > 'http://site.local:8888/core/assets/2014/08'         'subdir' > '/2014/08'         'basedir' > '/file/system/path/www/core/assets'         'baseurl' > 'http://site.local:8888/core/assets'         'error' > false      Note: although they are the same in the example, the path and url may be different (). EDIT: I forgot to mention I am currently using this to set the path in wp-config:               define( 'UPLOADS', 'core/assets' );      so I want to remove /wp/ from it (the subfolder where Wordpress is).


How to get the post count for the last x days filtering by categories

How can I get the posts count for eg the last 4 days, but only for specific categories eg. (1,2,3)? Thanks in advance.


remove page template from dropdown?

I created a page template, uploaded it, but then changed the template name later.               /*     Template Name: New Name     */      Now, the new template name is showing up on the Page dropdown, but so is the old template name. How can I delete the old one from the list??


Custom permalink for search and pagination

@Chip Bennet helped me out in a previous question and posted his entire pagination function. This function works perfectly fine for me but I'd like to have custom permalinks in german.               /**      * Paginate Archive Index Page Links      */     function oenology_get_paginate_archive_page_links( $type = 'plain', $endsize = 1, $midsize = 1 ) {         global $wp_query, $wp_rewrite;           $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;              // Sanitize input argument values         if ( ! in_array( $type, array( 'plain', 'list', 'array' ) ) ) $type = 'plain';         $endsize = (int) $endsize;         $midsize = (int) $midsize;              // Setup argument array for paginate_links()         $pagination = array(             'base' => @add_query_arg('paged','%#%'),             'format' => '',             'total' => $wp_query->max_num_pages,             'current' => $current,             'show_all' => false,             'end_size' => $endsize,             'mid_size' => $midsize,             'type' => $type,             'prev_text' => '<<',             'next_text' => '>>'         );              if( $wp_rewrite->using_permalinks() )             $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );              if( !empty($wp_query->query_vars['s']) )             $pagination['add_args'] = array( 's' => get_query_var( 's' ) );              return paginate_links( $pagination );     }      I use this function in my `search.php` template like this.               <div class="pagination">         <?php echo oenology_get_paginate_archive_page_links(); ?>     </div>      If I search in my search bar the url for the resulting page looks like this `mysite.com/?s=term` I'd like to have the german `suche` (means "search") instead … `mysite.com/suche/term` And the second bit … when clicking on the page 2 of the pagination the url looks currently like this … `mysite.com/page/2/?s=term` I'd like to have the german word the german word `seite` (for "page") instead. Maybe even like this … `mysite.com/suche/term/seite/2` Is that somehow possible with this function that @Chip provided? I can't seem to find a working solution for this. Thank you in advance. I'd really appreciate some help. * * * **UPDATE**               function oenology_get_paginate_archive_page_links( $type = 'plain', $endsize = 1, $midsize = 1 ) {         global $wp_query, $wp_rewrite;           $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;              // Sanitize input argument values         if ( ! in_array( $type, array( 'plain', 'list', 'array' ) ) ) $type = 'plain';         $endsize = (int) $endsize;         $midsize = (int) $midsize;              // Setup argument array for paginate_links()         $pagination = array(             'base' => @add_query_arg('paged','%#%'),             'format' => '?paged=%#%',             'total' => $wp_query->max_num_pages,             'current' => $current,             'show_all' => false,             'end_size' => $endsize,             'mid_size' => $midsize,             'type' => $type,             'prev_next'    => false         );              if ( $wp_rewrite->using_permalinks() )             $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'seite/%#%/', 'paged' );              /*if ( !empty($wp_query->query_vars['s']) )                 $pagination['add_args'] = array( 's' => get_query_var( 's' ) );*/              return paginate_links( $pagination );     }          /**      * Change search- & paginationbase      */          add_action( 'generate_rewrite_rules', 'wr_generate_rewrite_rules' );          function wr_generate_rewrite_rules( $rewrite ) {         $rewrite->rules = array_merge( array(              'suche/([^/]+)(?:/seite/(\d+))?/?' => 'index.php?s='.$rewrite->preg_index(1).'&paged='.$rewrite->preg_index(2)         ), $rewrite->rules );     }          add_filter( 'get_pagenum_link', 'wr_search_pagenum_link' );          function wr_search_pagenum_link( $link ) {          if ( !is_search() )             return $link;              // Attempt to parse the page number from the provided URL         if ( !preg_match( '#/page/(\d+)#', $link, $matches ) )             return $link;              // Return a re-formed URL         return home_url( '/suche/' . urlencode( get_query_var( 's' ) ) . '/seite/' . $matches[0] );     }


Search functionality in 'taxonomy postbox' on edit post page

* I created a custom taxonomy and added lots of terms.   * If I edit a page and want to add a certain term. It takes a lot of time to find the right one. I would like to have the WP autosuggest search box. How can I add the functionalitity that is already built on wp-admin/nav- menus.php? ![functionality that I would like to have on the edit page](http://i.stack.imgur.com/XkP1O.png) Hope anyone can help me to build this.


How to restrict a plugin from certain pages without editing its core

I've run into a problem using two different twitter plugins. One is for login and one is for displaying a twitter stream. The issue is they both use Oauth so I get a re-declare error when trying to login on my custom login template. Since I only use the twitter stream plugin on profiles I'd like to limit it's functions use purely to the profile but without actually changing the plugins core code. Possible?


Get buddypress profile page working with WP User Frontend

I am using Buddypress for advanced contact details such as Twitter username, etc. I am also using WP User Frontend to display the member profile page in the front end, however this brings through the default wordpress profile fields and not the extra Buddypress ones. Is it possible to bring these Buddypress fields through?


Transients API and multisite

we're using the Atlas HTML sitemap plugin, which caches the sitemap using the transients API with a call like:               set_transient( 'dmac_html_sitemap', $output, 60*60*24*7 );      Now, we also have a multi-site setup and I was wondering where the transients are stored and if WP multisite is keeping them separate. It keeps options separate as each site(blog) has its own DB table prefix (wp_29_options for example). I read somewhere that transients could be stored with memcached - so I'm guessing the back-end storage is pluggable. The reason for the question is that we have custom code that duplicates sites. If the transient is in the DB somewhere, it'll get copied and so I'll want to delete the cache for the newly duplicated site (part of the copy process also generates site-specific pages). If I just call:               delete_transient( 'dmac_html_sitemap' );       from our plugin's network page admin, which site's transient will that delete? all? none? only the main site? Edit: As Rarst points out below, when an external persistent cache plugin isn't being used, the transients are just stored as options (prefixed with _transient_ ). So, in that case they will be site-specific (as there is an options table for each site/blog). Hence, the question now becomes - does the wp_cache_set() and friends keep cache items separated by site by using the blog_id or something in the cache key or not? (e.g. if stored in memcached or APC for example)


Linked pages from plugin on front can't see $wpdb

I obviously need more knowledge re this one. From my plugin. I have a custom main page which displays my custom db data table of a list of stores. Each store has a "link" ie using a href eg.               <a href='wp-content\plugins\SBaronAdmin\Menus.php?xp=<?=$row->BrExpress;?> '>           but, the called page has an issue using $wpdb. I assume it is because it is not recognised as a WordPress page. though the called page resides in the plugin folder. I have tried this as well as function calls and also Shortcodes (beneath,..which don't work..I've done something wrong obviously) eg.                <a [caption] <?=$row->Express;?> [/caption]            with                 function Platters_shortcode( $atts, $content = null )        {          return '';       }       add_shortcode( 'caption', 'Platters_shortcode' );      but to no avail. Can anyone puh-lease point me in the right direction TIA


Can custom taxonomies be displayed inside of a custom meta box?

I'm currently displaying custom taxonomies in a drop down menu. Each taxonomy has its own little wrapper in the sidebar. Is it possible to move the taxonomy to _inside_ of my custom write box for ease-of-use purposes? ![enter image description here](http://i.stack.imgur.com/0jApe.png)


wordpress add_submenu_page adds broken link

I install my plugin in several sites and the submenu links generation at backed works fine, but fails in one specific site. I use the follow code to add the submenu items:               add_menu_page(         'Plugin name',         'Plugin name',         'manage_options',         basename(__FILE__),         'handle_this_action'     );          add_submenu_page(         basename(__FILE__),         'Link 1',         'Link 1',         'manage_options',         basename(__FILE__),         'handle_this_action'     );      This will generate a menu box at backed with one link inside and the main link in the title of menu box. When I click on the main link at menu box I get correctly redirected to my page with a URL like follow: **http://mysite.net/wp-admin/admin.php?page=myplugin.php** But when I click on the submenu link I'm wrongly redirected to: **http://mysite.net/wp-admin/myplugin.php?page=myplugin.php** Instead of: **http://mysite.net/wp-admin/admin.php?page=myplugin.php** I really don't know what I have to check in order to figure this out. The WordPress version used in the site that gives me this problem is Version 3.3.1 and I haven't any other plugin activated. How I can proceed? Any tip or help will be appreciated.


How do I get_the_content in a custom walker?

I have a custom walker and I would like to either `get_the_content()` (up to the Read More) or `get_the_excerpt()` to use in this walker, but I can't figure out how to get it to work - it either returns nothing, or if I put an `$item->object_id` in it (thinking maybe it needed the post/page ID), then it just returns that ID and not the actual post/page text. I tried googling Here is my code:               class Salamander_AdventMore_Walker extends Walker_page {     function start_el(&$output, $item, $depth, $args) {         if ( $depth ) {             $indent = str_repeat("\t", $depth);         } else {             $indent = '';         }              $advent_slug = get_post_meta($item->object_id, 'advent-slug', true);         $advent_small_title = get_post_meta($item->object_id, 'advent-title', true);         $advent_title = ( !empty($advent_small_title) ? $advent_small_title : $advent_slug);              $advent_content = apply_filters('the_content', $item->object_id);         $advent_content = str_replace(']]>', ']]>', $advent_content);              // this doesn't work         // $advent_content = get_the_content( $item->object_id, 'Read more ...' ) ;              $output .= $indent . '

' . $advent_title . '

                 <hgroup>
' . $advent_title . '
                 </hgroup>                 '. $advent_content .'

         ';     } // ends function     } // ends class


Custom Theme Want To Remove One Category From All Displays

I created my own custom Wordpress theme for my website, everything is great. However, I have a strange need, I have one category which is kind of a 'placeholder' for content which is automated and used by an automated background process. Each time this process finds new content to put into that category I end up with another entry when I go to the admin screen to post or edit any of the posts which I manually enter. Since it is more than just myself, I really want a way to just completely hide that one category from being shown in the Admin 'Edit/Post' screen to keep it nice and lean. I've poked around in some of the source code files, however, I have come to the point of frustration. Been searching around on Google and other places for any idea, yet, keep coming up empty. Does anyone know how to do this, or even IF it can be done? Thanks, Derek


Making an add_filter() call from within an add_filter() call

I am creating a plugin where I am checking for parameters passed in the url for a page, then using the values of those parameters to change the Title, meta tags and make some other SEO changes. But I am running into problems trying to combine actions and filters properly to make this happen. Here is a sample of some of the things I am doing. First I am registering the variable passed in the url                   add_action('init', 'register_tag');              function register_tag() {           add_rewrite_tag('%address%','([^&]+)');         }      Then I am obtaining the variable from $wp_query and setting the Title amongst other things.                   add_filter('wp_head', 'seo_features');              function seo_features() {            global $wp_query,$post,$address;            $address = $wp_query->query_vars['address'];            if ($address) {               $post->post_title = $address;               add_filter('wp_title', set_title);               add_filter('wpseo_title', set_title);               remove_action('wp_head', 'rel_canonical');            }         }         function set_title($title) {            global $address;            return $address;         }      But I don't think you can make `add_action()` or `add_filter()` calls from within an `add_filter()`? I'm not sure how to do this correctly. I have to use `add_action("init")` to register the tag (and also to add a related rewrite rule using `add_rewrite_rule()` ). But it seems I can only get the value of the variable `$address` from `$wp_query` from within an `add_filter` call. Trying to access it without a filter/action doesn't work as it is called too early. Any ideas on what the correct order I should be doing this?


How to integrate a different (JavaScript) editor in WordPress?

I'been using WordPress since 2005 and although I'm pretty much conquered in all respects, I still wonder **how some possibilities** are not there for the user. One of them: **changing the default TinyMCE editor** and replacing it with other modern alternatives. The popularity growth of the Markup language is clear, and the new Ghost CMS makes a point in this respect. Why does WordPress not support this fully either natively or with an official plugin? I will go even further: **I'd like to use whatever editor I want**. In my case, the Medium editor is absolutelly stunning, and I'd be delighted to be able to combine that editor to the other WordPress features. There are several alternatives programmed in JavaScript that allow to use an editor similar to Medium's, and **I wonder if it would be possible to integrate that into WordPress**. I guess it's not just a matter of the JavaScript, but the relation of the editor with the database. How can I integrate a different editor (for example, one of the JavaScript ones that copy the Medium one, like Pen Editor in WordPress??


wp_query for more fields plugin

I use this plugin : http://wordpress.org/support/plugin/more-fields/page/2 How use WP_QUERY for this inputs ?!


Removing WP-Login inputs

I'm building a passive captcha system for my WP sites, and I'm attempting to remove the inputs (username, password, submit) from my standard WP-Login page via php hooks; they'll be replaced via jQuery when validation succeeds. Unfortunately (as one would expect), there don't seem to be any hooks that remove these inputs. I can't remove them with jQuery, because that would defeat the purpose. Can anyone suggest in unobtrusive approach with php/html to remove these elements?


deregister scripts on certain page

i need to exclude certain scripts from running on a certain page. i have tried this code but it's not working - when i inspect the page the scripts are still being loaded into the footer of my page. here is my code in functions.php               add_action( 'wp_enqueue_scripts', 'my_deregister_javascript', 100 );          function my_deregister_javascript() {        if ( !is_page('my-page') ) {         wp_deregister_script( 'isotope' );         wp_deregister_script( 'anystretch' );         wp_deregister_script( 'imgliquid' );         wp_deregister_script( 'retina' );         wp_deregister_script( 'menutron' );         wp_deregister_script( 'imagesloaded' );         wp_deregister_script( 'myfunctions' );               }     }      what am i missing? thanks!


wp_trim_words is trimming by character instead of by words

I'm using Wordpress 3.9.2, and having trouble with the `wp_trim_words` function. It seems to be cutting the string down to X characters instead of X words. **Example** Put the following in a template file:               <?php      $str = "Imagine discovering a secret language spoken only online by a knowledgeable and learned few. Over a period of weeks, as you begin to tease out the meaning of this curious tongue and ponder its purpose, the language appears to shift in subtle but fantastic ways, remaking itself daily before your eyes. And just when you are poised to share your findings with the rest of the world, the entire thing vanishes.";          $str_excerpt = wp_trim_words($str, $num_words = 5, $more = '...' );          echo $str_excerpt;     ?>      In my browser, I see the output as `Imagi...`. That's not how it should function though, as far as I read from the docs: > Description > > This function trims text to a certain number of words and returns the > trimmed text. > > Usage > > $trimmed = wp_trim_words( $text, $num_words = 55, $more = null); Is there a setting or perhaps something in the theme I'm using that's causing this behavior?


How to customize this automatic slug shortener with an overrwrite function

I am using a slick little piece of code which I have included within my functions file which automatically takes any information entered into the title of a new post and create a slug with specific stop words automatically removed (code included below). The problem is that sometimes after this slug is automatically created I wanted to click on the slug (under the title) and modify it directly. My question to the community is... what would I need to change in the code below so that when I click on the slug (under the title) and modify it that whatever I enter there is used without the function below preventing that from happening. Here is the code:               // AUTOMATICALLY SANITIZE PAGE/POST SEO SLUG FROM SHORT WORDS     // SOURCE: http://www.vretoolbar.com/news/seo-slugs-wordpress-plugin        add_filter('name_save_pre', 'seo_slugs', 0);        function seo_slugs($slug) {         // We don't want to change an existing slug      if ($slug) return $slug;      global $wpdb;      $seo_slug = strtolower(stripslashes($_POST['post_title']));      $seo_slug = preg_replace('/&.+?;/', '', $seo_slug); // kill HTML entities         // kill anything that is not a letter, digit, space or apostrophe      $seo_slug = preg_replace ("/[^a-zA-Z0-9 \']/", "", $seo_slug);         // Turn it to an array and strip common words by comparing against c.w. array      $seo_slug_array = array_diff (split(" ", $seo_slug), seo_slugs_stop_words());         // Turn the sanitized array into a string      $seo_slug = join("-", $seo_slug_array);      return $seo_slug;        }        function seo_slugs_stop_words () {        return array ("a", "able", "about", "above", "abroad", "according", "accordingly", "across", "actually", "adj", "after", "afterwards", "again", "against", "ago", "ahead", "ain't", "all", "allow", "allows", "almost", "alone", "along", "alongside", "already", "also", "although", "always", "am", "amid", "amidst", "among", "amongst", "an", "and", "another", "any", "anybody", "anyhow", "anyone", "anything", "anyway", "anyways", "anywhere", "apart", "appear", "appreciate", "appropriate", "are", "aren't", "around", "as", "a's", "aside", "ask", "asking", "associated", "at", "available", "away", "awfully", "b", "back", "backward", "backwards", "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", "begin", "behind", "being", "believe", "below", "beside", "besides", "best", "better", "between", "beyond", "both", "brief", "but", "by", "c", "came", "can", "cannot", "cant", "can't", "caption", "cause", "causes", "certain", "certainly", "changes", "clearly", "c'mon", "co", "co.", "com", "come", "comes", "concerning", "consequently", "consider", "considering", "contain", "containing", "contains", "corresponding", "could", "couldn't", "course", "c's", "currently", "d", "dare", "daren't", "definitely", "described", "despite", "did", "didn't", "different", "directly", "do", "does", "doesn't", "doing", "done", "don't", "down", "downwards", "during", "e", "each", "edu", "eg", "eight", "eighty", "either", "else", "elsewhere", "end", "ending", "enough", "entirely", "especially", "et", "etc", "even", "ever", "evermore", "every", "everybody", "everyone", "everything", "everywhere", "ex", "exactly", "example", "except", "f", "fairly", "far", "farther", "few", "fewer", "fifth", "first", "five", "followed", "following", "follows", "for", "forever", "former", "formerly", "forth", "forward", "found", "four", "from", "further", "furthermore", "g", "get", "gets", "getting", "given", "gives", "go", "goes", "going", "gone", "got", "gotten", "greetings", "h", "had", "hadn't", "half", "happens", "hardly", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "hello", "help", "hence", "her", "here", "hereafter", "hereby", "herein", "here's", "hereupon", "hers", "herself", "he's", "hi", "him", "himself", "his", "hither", "hopefully", "how", "howbeit", "however", "hundred", "i", "i'd", "ie", "if", "ignored", "i'll", "i'm", "immediate", "in", "inasmuch", "inc", "inc.", "indeed", "indicate", "indicated", "indicates", "inner", "inside", "insofar", "instead", "into", "inward", "is", "isn't", "it", "it'd", "it'll", "its", "it's", "itself", "i've", "j", "just", "k", "keep", "keeps", "kept", "know", "known", "knows", "l", "last", "lately", "later", "latter", "latterly", "least", "less", "lest", "let", "let's", "like", "liked", "likely", "likewise", "little", "look", "looking", "looks", "low", "lower", "ltd", "m", "made", "mainly", "make", "makes", "many", "may", "maybe", "mayn't", "me", "mean", "meantime", "meanwhile", "merely", "might", "mightn't", "mine", "minus", "miss", "more", "moreover", "most", "mostly", "mr", "mrs", "much", "must", "mustn't", "my", "myself", "n", "name", "namely", "nd", "near", "nearly", "necessary", "need", "needn't", "needs", "neither", "never", "neverf", "neverless", "nevertheless", "new", "next", "nine", "ninety", "no", "nobody", "non", "none", "nonetheless", "noone", "no-one", "nor", "normally", "not", "nothing", "notwithstanding", "novel", "now", "nowhere", "o", "obviously", "of", "off", "often", "oh", "ok", "okay", "old", "on", "once", "one", "ones", "one's", "only", "onto", "opposite", "or", "other", "others", "otherwise", "ought", "oughtn't", "our", "ours", "ourselves", "out", "outside", "over", "overall", "own", "p", "particular", "particularly", "past", "per", "perhaps", "placed", "please", "plus", "possible", "presumably", "probably", "provided", "provides", "q", "que", "quite", "qv", "r", "rather", "rd", "re", "really", "reasonably", "recent", "recently", "regarding", "regardless", "regards", "relatively", "respectively", "right", "round", "s", "said", "same", "saw", "say", "saying", "says", "second", "secondly", "see", "seeing", "seem", "seemed", "seeming", "seems", "seen", "self", "selves", "sensible", "sent", "serious", "seriously", "seven", "several", "shall", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "since", "six", "so", "some", "somebody", "someday", "somehow", "someone", "something", "sometime", "sometimes", "somewhat", "somewhere", "soon", "sorry", "specified", "specify", "specifying", "still", "sub", "such", "sup", "sure", "t", "take", "taken", "taking", "tell", "tends", "th", "than", "thank", "thanks", "thanx", "that", "that'll", "thats", "that's", "that've", "the", "their", "theirs", "them", "themselves", "then", "thence", "there", "thereafter", "thereby", "there'd", "therefore", "therein", "there'll", "there're", "theres", "there's", "thereupon", "there've", "these", "they", "they'd", "they'll", "they're", "they've", "thing", "things", "think", "third", "thirty", "this", "thorough", "thoroughly", "those", "though", "three", "through", "throughout", "thru", "thus", "till", "to", "together", "too", "took", "toward", "towards", "tried", "tries", "truly", "try", "trying", "t's", "twice", "two", "u", "un", "under", "underneath", "undoing", "unfortunately", "unless", "unlike", "unlikely", "until", "unto", "up", "upon", "upwards", "us", "use", "used", "useful", "uses", "using", "usually", "v", "value", "various", "versus", "very", "via", "viz", "vs", "w", "want", "wants", "was", "wasn't", "way", "we", "we'd", "welcome", "well", "we'll", "went", "were", "we're", "weren't", "we've", "what", "whatever", "what'll", "what's", "what've", "when", "whence", "whenever", "where", "whereafter", "whereas", "whereby", "wherein", "where's", "whereupon", "wherever", "whether", "which", "whichever", "while", "whilst", "whither", "who", "who'd", "whoever", "whole", "who'll", "whom", "whomever", "who's", "whose", "why", "will", "willing", "wish", "with", "within", "without", "wonder", "won't", "would", "wouldn't", "x", "y", "yes", "yet", "you", "you'd", "you'll", "your", "you're", "yours", "yourself", "yourselves", "you've", "z", "zero");        }


Media is not attached after import

I am new there and I need some help for importing a wordpress blog. I have a old wordpress 3.1 blog (no multisites) and need to move to new hosting (a sites under multisites). I don't have the access of database so I do a wordpress export. Then I do the wordpress import as usual, with `Download and import file attachments` checked. My hosting a restrictive hosting so I need to do break down the process by keep on reloading the import page (step 2). After all done I found only the last imported images are attached to the posts, all other linkages are gone. Question:   * does it matter that the attachment linkage is gone?   * If I want to re-attach the attachment to the origin post, any plugin should I use?


Plugin version not updated with new version

I also checked this thread, and tested the `/trunk` and `/tags/1.1` readme.txt files stabletag are same.               /trunk/readme.txt     === Plugin Name ===     Contributors: jogesh_pi     Tags: tags goes here     Requires at least: 3.6     Tested up to: 3.9.1     Stable tag: 1.1     License: GPLv2 or later     License URI: http://www.gnu.org/licenses/gpl-2.0.html      and in `tags/1.1/readme.txt`               === Plugin Name ===     Contributors: jogesh_pi     Tags: tags goes here     Requires at least: 3.6     Tested up to: 3.9.1     Stable tag: 1.1     License: GPLv2 or later     License URI: http://www.gnu.org/licenses/gpl-2.0.html      But still my plugin displayed the first version 1.0 with the functionality of 1.1 just the version not updated. Please tell me what i have missed or how do i make it correct? ![enter image description here](http://i.stack.imgur.com/61fwb.png) ## Steps   1. First i created a folder with the new version in `tags/` directory, i have already a directory in exists with the base version that is `tags/1.0`. I created a new `tags/1.1`   2. In my local system i have tested everything and its working fine. So i copied all the files in the `tags/1.1`   3. One mistake that i have done in my previous release with the `Stable Tag` was i mentioned that `Stable tag: 3.8` in my `tags/0.1` so i changed it in `tags/1.1` to `Stable tag: 1.1` and commit entire `tags/1.1`.   4. Next i copied all the files from `tags/1.1` and pasted in `trunk/` directory and again commit the `trunk/` directory that it.  I have doubt on `Stable tag: 3.8` of version in `tags/0.1` so i changed it to `Stable tag: 0.1` and commit the `tags/0.1` too. I don't know if its wrong or not :(


Can't find text source file in WP theme

The site is http://www.rimongod.ee I'm having trouble with locating the file that holds the text "REDESIGN YOURSELF" that sits under the header image. There's nothing in index.php, header.php or one of the few dozens of php files that come with this wordpress theme. :/ Could anyone tell me the file that houses this text?


How to get gravatar url alone

I would like to use gravatar image as background image for a button. When i use `get_avatar` function it returns with height width src parameters. But i need only gravatar url. I mean like `http://gravatar.com/.../...` Can anyone tell me how? Thanks


Dynamic Post Type Variable echo as string?

Working on a Wordpress Theme. I'm trying to make dynamic post-type names. My code is throwing error but I feel like I'm close... what am I missing? my variables are correct, but the coding within the 'label' and such is not correct. EDIT: got the 'label' to process but it is not pulling my variable. It is displaying "Page" when it should display my input. Any ideas why?               $novus_comedy_to = get_option('novus_comedy_to');          // register comedy post type     register_post_type( 'comedy' , $args );          add_action('init', 'comedy_videos');          function comedy_videos() {         $args = array(             'label' => __($novus_comedy_to),             'public' => true,             'show_ui' => true,             'capability_type' => 'post',             // this controls whether or not post can have category format             'hierarchical' => true,             'supports' => array('title', 'editor', 'thumbnail', 'tags',),             'rewrite' => array( 'slug' => 'comedy', 'with_front' => true )         );              register_post_type( 'comedy' , $args );     }      This is how the labels were normally:               'label' => __('Comedy'),     'singular_label' => __('Comedy'),


Create a plugin to create a new page in wordpress for each time a record is added into the database

I am new to wordpress and would like to get a way forward for a particular problem.   1. I have a database table A with various columns.   2. For each record in table A a wordpress page needs to be created in the wordpress database.   3. The page should be custom designed.   4. The whole process has to be included in a plugin.   5. The admin uses the plugin to create pages after database is updated. Any help would be appreciated. Regards.


Changing settings of WooCommerce

I'm using the recently released WooCommerce plugin for my e-commerce site. In WooCommerce settings, the currency of my country is not listed. So I have to add it manually by coding in `woocommerce.php` and `admin-settings.php` file. The issue arises when there is an update. As soon as I update the plugin, the file is replaced with the new one in which my manually added code gets deleted and again, the currency of my country is not listed. How do I ensure that the updates do not replace the currency listings which I manually coded?


Is there a way to remove or hide individual pages on the Edit Pages screen?

I want to create a handful of pages that I do not want the client to have access to through the edit pages admin screen. I do want the pages to have all the normal functionality of pages in other parts of the control panel. For example, I want the pages to show on... Appearance > Menus ...so the client can reorder or rename them in the navigation. I found a question that almost had the perfect solution... Create a page without adding a page in the Database The answer was great - it forces the use of a template based on a key=>value pair in the URL, which means the "page" can exist without actually creating a page. The downside is that it doesn't behave like a page in other places (ex: not a custom menu option as mentioned above) because its not actually a page. The ideal solution for me would be to create a real page and filter it out when the Edit Pages screen is loaded, but I'm not sure how to do that. I'm open to completely different approaches, but if a custom page template is any part of the solution then the solution also needs to remove the page template as an option from the drop-down when editing other pages, so that the client can't replicate these pages. Thanks in advance for the help. ~ Kirkland


How to limit 1 image per post on homepage only?

most of my post on wordpress got 6 or 5 images perpost. My problem is if I posted 5 new post with new images, it will be totall 25 images display on my homepage. I want to limit 1 image perpost on "homepage only", the full content (lets say got total 6 images, it will be on single page). Anyone know how to do it?? Or any Image excerpt plugin that can limit image on homepage?


How to add a Variable to post query

the query is :               <?php      // Headlines variable can control admin area     // Its like ; 3,4,5,6     $headlines = ".get_option('t_turmanset').";     query_posts( array( 'numberposts' => 4, 'post__in' => array( HOW CAN I ADD HEADLINES ? ) ) );     if ( have_posts() ) : while ( have_posts() ) : the_post();           ?>      Thank you ;) Ps. sorry about my bad english