title: How do I maintain static directories on multisite subdomains?

text: 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]


title: More quicktag driving me nuts

text: 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!


title: the_content() brings the medium size image

text: 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;


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

text:
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 );


title: Corrupt htaccess after bulk changes

text: 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?


title: Use different single.php file based on condition

text: 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


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

text: 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


title: Automatic SEO for wordpress

text: 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 ?


title: Redirecting after login?

text:
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?


title: Blog Posts not showing title

text:
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?


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

text: 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. ?


title: Change pagination in editing posts

text: > **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.


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

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


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

text:
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.


title: Change default uploads file using wp Skeleton

text: 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).


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

text: 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.


title: remove page template from dropdown?

text: 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??


title: Custom permalink for search and pagination

text: @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] );     }


title: Search functionality in 'taxonomy postbox' on edit post page

text: * 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.


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

text: 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?


title: Get buddypress profile page working with WP User Frontend

text: 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?


title: Transients API and multisite

text: 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)


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

text: 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


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

text: 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)


title: wordpress add_submenu_page adds broken link

text: 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.


title: How do I get_the_content in a custom walker?

text:
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


title: Custom Theme Want To Remove One Category From All Displays

text: 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


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

text: 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?


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

text: 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??


title: wp_query for more fields plugin

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


title: Removing WP-Login inputs

text: 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?


title: deregister scripts on certain page

text: 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!


title: wp_trim_words is trimming by character instead of by words

text: 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?


title: How to customize this automatic slug shortener with an overrwrite function

text: 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");        }


title: Media is not attached after import

text: 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?


title: Plugin version not updated with new version

text: 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 :(


title: Can't find text source file in WP theme

text: 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?


title: How to get gravatar url alone

text: 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


title: Dynamic Post Type Variable echo as string?

text: 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'),


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

text: 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.


title: Changing settings of WooCommerce

text: 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?


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

text: 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


title: How to limit 1 image per post on homepage only?

text: 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?


title: How to add a Variable to post query

text: 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


title: wp_query and comment_parent - select only posts with top level comments

text: I have a custom post type of 'films', and I'm creating a number of search filters using wp_query. All are working fine, but I now need to add in an option of exclude results that dont have any _top level_ comments. I was hoping it would be as simple as:                  $args = array(            'post_type' => 'films',            'comment_parent' => 0         );      But this still returns all results. Is it possible to do what I want with wp_query? EDIT Here is my query so far. It searches for the 'films' post type and filters based on genre. Its a bit messy at the minute, but I just wanted to get everything working before tightening up the code.                  $args = array(            'post_type' => 'films'         );                   if(isset($_GET['g'])){           $get_genres = $_GET['g'];                $get_genres = array(            'tax_query' => array(                 array(                    'taxonomy' => 'genre',                    'field' => 'id',                    'terms' => $get_genres,                    'operator' => 'IN'                 )              )           );                  $postsperpage = 10;        $offset = $paged == 0 ? 0 : ($paged-1)*$postsperpage;             $paging =   array(           'posts_per_page' => $postsperpage,           'offset' => $offset        );             $ordering =  array(           'orderby' => 'title',           'order' => 'ASC'        );             $args = array_merge($get_genres, $args);             $args = array_merge($args, $ordering, $paging);          $wp_query = new WP_Query($args);


title: How to find the posts page (home page) programatically

text: What php code can be used to find the page object that hosts the blogs? Note that this may not be the same as the first page of the web site. In the admin section we can specify in which page to display the blog posts. The hard part from what I can see is how to get this info programatically. I can cycle through all the pages using get_pages() but the is_home() is only available within the context of the loop. I don't see a field on the page objects returned by get_pages() which indicates that it is a page with blog posts.


title: Custom post type search using $_SESSION and pre_get_posts

text:
I've been hacking all day at a custom post type search/filter system. So far I have this:               function kdev_property_query($query) {          if(isset($_POST['rooms_n'])) $_SESSION['rooms_n'] = $_POST['rooms_n'];     if(isset($_POST['univer'])) $_SESSION['univer'] = $_POST['univer'];     if(isset($_POST['area_t'])) $_SESSION['area_t'] = $_POST['area_t'];          $query_post_type = $query->query_vars["post_type"];          if( !is_post_type_archive( 'properties' ) || $query_post_type == 'nav_menu_item' ) return;          //Show all available properties     $query->set('posts_per_page','-1');          $meta_query = array();     $tax_query = array();          global $query_string;     if(isset($_SESSION['rooms_n'])) $room_query = $_SESSION['rooms_n'];     if(isset($_SESSION['univer'])) $uni_query = $_SESSION['univer'];     if(isset($_SESSION['area_t'])) $area_query = $_SESSION['area_t'];          if(isset($room_query)) {         $meta_query[] = array(             'key' => '_rooms',             'value' => $room_query         );     }          if(isset($uni_query)) {         $tax_query[] = array(             'taxonomy' => 'university',             'field' => 'slug',             'terms' => $uni_query         );     }          if(isset($area_query)) {         $tax_query[] = array(             'taxonomy' => 'area',             'field' => 'slug',             'terms' => $area_query         );     }               if( ! empty( $meta_query ) )             $query->set( 'meta_query', $meta_query );     if( ! empty( $tax_query ) )             $query->set( 'tax_query', $tax_query );               }          add_action('pre_get_posts', 'kdev_property_query', 1);      I use the following form to search:               function display_area_university_filter_form(){     ?>
     <form method="post" action="">
property search
          <?php         if(isset($_SESSION['univer'])) $uni = $_SESSION['univer'];         else if(is_tax( 'university' ) ) $uni = get_query_var( 'term' );         if(isset($uni)) $uni = strtolower($uni);?>
University: <select name="univer"><option value="NULL">Any</option>     <?php          $uni_terms =  get_categories('taxonomy=university');          if (isset($uni)){             foreach ($uni_terms as $term) {                 $option = '<option value="'.$term->slug.'"';                 if ($uni == $term->slug){                     $option.= ' selected="selected"';                 }                 $option .= '>'.$term->name;                 $option .= '</option>';                 echo $option;             }         }else{             foreach ($uni_terms as $term) {                 $option = '<option value="'.$term->slug.'"';                 $option .= '>'.$term->name;                 $option .= '</option>';                 echo $option;             }         }     ?>     </select>
     <input type="hidden" name="custom_filter" value="area_uni">
              <?php         if(isset($_SESSION['area_t'])) $area = $_SESSION['area_t'];         else if(is_tax( 'area' ) ) $area = get_query_var( 'term' );         if(isset($area)) $area = strtolower($area);?>         Area:               <select name="area_t">             <option value="NULL">Any</option>         <?php              $area_terms =  get_categories('taxonomy=area');              if (isset($area)){                 foreach ($area_terms as $term) {                     $option = '<option value="'.$term->slug.'"';                     if ($area == $term->slug){                         $option.= ' selected="selected"';                     }                     $option .= '>'.$term->name;                     $option .= '</option>';                     echo $option;                 }             }else{                 foreach ($area_terms as $term) {                     $option = '<option value="'.$term->slug.'"';                     $option .= '>'.$term->name;                     $option .= '</option>';                     echo $option;                 }             }         ?>         </select>

     <?php      if(isset($_SESSION['rooms_n'])) $rooms = $_SESSION['rooms_n'];          ?>         Bedrooms:          <select name="rooms_n">             <option value="NULL">Any</option>             <?php              $room_array = array(3,4,5,6,7);             foreach($room_array as $no) {             $output = '<option ';             if(isset($rooms) && $rooms == $no) $output .= 'selected="selected" ';             $output .= 'value="'.$no.'">'.$no.'</option>';             echo $output;             } ?>              </select>

<input class="<?php if(is_archive()) echo 'new-search '; ?>button" type="submit" name="search_props" value="<?php if(is_archive() || is_post_type_archive('properties')) echo 'New '; ?>Search">
          </form>
     <?php          }      If I search for all three values at once (university, area and rooms) the page displays the correct results. However, if any or all of the option fields are left blank, then no posts are returned. $GLOBALS['wp_query']->request is all options are selected returns:               SELECT   wp_posts.* FROM wp_posts  INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1  AND ( wp_term_relationships.term_taxonomy_id IN (5) AND tt1.term_taxonomy_id IN (18,15) ) AND wp_posts.post_type = 'properties' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = '_rooms' AND CAST(wp_postmeta.meta_value AS CHAR) = '4') ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC       ...and if only university and rooms options are selected:                SELECT   wp_posts.* FROM wp_posts  INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1  AND 0 = 1 AND wp_posts.post_type = 'properties' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = '_rooms' AND CAST(wp_postmeta.meta_value AS CHAR) = '4') ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC       Please help! This is killing me! If you need any more info please ask.


title: How to exclude/remove submenu using Walker_Nav_Menu

text: i'm working on the new site with custom menu and extended Walker_Nav_Menu class to add custom content to the wp nav menu. i have registered a custom select box (key: my_custom_menu) in menu from wordpress admin, have a look at the following image: ![http://i.stack.imgur.com/JYb9u.jpg](http://i.stack.imgur.com/ssMxi.jpg) My question is: Is there any way to remove/exclude the submenu if the user use custom menu instead of multilevel submenu, example:               //conditional for parent menu item Contact us     if($menu_item->my_custom_menu !== 'none'){              //Remove all the nested submenu with depth != 0 (including <ul class="submenu">)         // so the expecting result is : remove all submenus inside Contact us .          }      i know there's a function called display_element() in Walker class but i dont know how to use it.


title: get_terms return errors

text: Hi when i try to `get_terms();` in theme options via this code               $catalogs_terms = get_terms( 'catalogs' );        $mycatalogs = array( -1 => 'Select a catalog' );        if ( $catalogs_terms ) {           foreach ( $catalogs_terms as $catalog_term ) {              $mycatalogs[$catalog_term->term_id] = $catalog_term->name;           }        }      return empty but this code is working fine every where in pages etc. when i try to `print_r( $catalogs_terms )` output i am getting errors               Array ( [errors] => Array ( [invalid_taxonomy] => Array ( [0] => Invalid Taxonomy ) ) [error_data] => Array ( ) )      i don't understand where am i wrong? my function for register taxonomy                   add_action( 'init', 'my_taxonomies', 0 );          function my_taxonomies() {         // Add new taxonomy, make it hierarchical (like categories)         $labels = array(             'name' => _x( 'Catalogs', 'taxonomy general name' ),             'singular_name' => _x( 'Catalog', 'taxonomy singular name' ),             'search_items' =>  __( 'Search Catalogs', 'mytextdomain' ),             'all_items' => __( 'All Catalogs', 'mytextdomain' ),             'parent_item' => __( 'Parent Catalog', 'mytextdomain' ),             'parent_item_colon' => __( 'Parent Catalog:', 'mytextdomain' ),             'edit_item' => __( 'Edit Catalog', 'mytextdomain' ),              'update_item' => __( 'Update Catalog', 'mytextdomain' ),             'add_new_item' => __( 'Add New Catalog', 'mytextdomain' ),             'new_item_name' => __( 'New Catalog Name', 'mytextdomain' ),             'menu_name' => __( 'Catalogs', 'mytextdomain' ),         );                // register catalogs hierarchical (like categories)         register_taxonomy( 'catalogs',             array( 'news' ),             array( 'hierarchical' => true,                 'labels' => $labels,                 'show_ui' => true,                 'public' => true,                 'query_var' => true,                 'rewrite' => array( 'slug' => 'catalogs' )             )         );     }


title: Sorting archive pages with "pretty" URLs?

text: We want the users to re-order the posts on a page similar to pagination but I can't find anything anywhere! It would be great to create a link to a url similar to `.../page/2/title/`, `title` being the new order. Is this even possible?! Found several pagination scripts but none offer this option...


title: List all subcategories from category

text: How can I get all subcategories from a certain category?


title: How to Get All Posts with any post status?

text: i am creating a frontend dashboard where i need to show all the post by the current user. So i need to show posts with all post status. Mainly published, trashed and the pending. I am now using simple query post but it is returning only the published posts as expected.               $query = array(         'post_type' => 'my-post-type',         'post_author' => $current_user->ID                       );         query_posts($query);      Can anyone help what i need do extra?


title: where is permalink info stored in database?

text: I see that I can edit permalink information in wp-admin page > settings > permalinks. However, where is that information actually stored in the database?


title: Grant a person permission to moderate all comments on a blog without giving them the ability to edit other peoples post

text: I'm trying to figure out how to create a wordpress role that grants the user the ability to only moderate all comments (including for posts that aren't there own). The only way I've been able to do this is by granting them the ability to edit other peoples posts, but I don't want to give them that much permission. Any idea how to do it?


title: Debug 500 Internal Server Error on WordPress blog

text: My WordPress blog is hosted on a shared webserver on Hostgator. I've been having 500 Internal Server Errors the last couple of days. I haven't installed any new plugins since the errors started showing up. I contacted tech support a few times but never got a succesful answer. The webhost has a process limit of 25. At times the process limit is reached, so the websites on that server go down. When looking at the process console, I see the process that's been spawning a lot is php serving the index.php file of my blog. When I first contacted support, they told me it could be due to a large traffic increase on my site. But I have no reasons to think the traffic might have increased that much in a day. Checking Analytics (although most request must be getting lost due to the errors), I notice there hasn't been any important increase on traffic. Besides the site has been through some "Slashdot effects" before going to four or five times the daily hits average without any issues. Another support guy told me to switch the WP-Super Cache plugin for W3 Total Cache, since that's the one Hostgator recommends. This didn't change anything either. I tried deactivating and uninstalling both, then checking with Hyper Cache, and I never found different results. When changing WP-DEBUG to true, all I see are some warnings from All In One Seo Pack and this other plugin. All of the tech supports told me there was a plugin that was causing this. So I disabled them all and started trying and enabling one by one. The thing is, I still haven't been able to figure out which plugin (if that's the issue) is causing the trouble. In conclusion, they haven't been of much help. What are my options to debug and find out where the problem is? **EDIT:** My active plugins: Akismet, All In One SEO Pack, Dagon Design Sitemap Generator, FastFast Secure Contact Form, Google XML Sitemaps, Laconica Tools, List Category Posts, NextGEN Gallery, RubyConf Uruguay Ribbon, Smooth Slider, Subpage Listing, Subscribe to Comments Reloaded, UserAgent Spy, W3 Total Cache, WP-PageNavi, WP-Syntax.


title: How to disable atom feed and only use RSS feed

text: Is there a way to disable atom feed and have only rss feed? When I click on the RSS button on my Firefox, I am show 'subscribe to domaintitle using RSS feeds' and 'subscribe to domaintitle using atom feeds' I do not use a plugin but rather a function.


title: How to add multi uploader to wordpress plugin?

text:
I have a plugin where i need it two handle multi uploading forms to capture some images. but when i program the first one everything goes well and i can simply upload image and show a preview of that image. but then when i try to program the second one it will mess up the first one and not show element in correct place. **HTML & PHP:**
                   <?php if(isset($faviconRecord->security_image) && $faviconRecord->security_image !='') { ?>                   <img id="faviconIMG" width="48px" src="<?php echo $faviconRecord->security_image;?>"/>                    <?php } else { echo $faviconDefaultImage; } ?>

                   <input id="faviconImageURL" size="15" type="text" name="faviconImageURL" value="" />                   <input id="faviconButton" class="button" type="button" value="Favicon" />

      **jQuery:** I have commented out each function of what it does.               /*Favicon Icon Upload*/     jQuery(document).ready(function() {         /*Favicon Upload Button Click*/         jQuery('#faviconButton').click(function(){             faviconField = jQuery('#faviconImageURLs').attr('name');             tb_show('', 'media-upload.php?type=image&TB_iframe=true'); /*Open Media Uploader*/             return false;         });         /*Close Media Uploader and return the result to field box */         window.send_to_editor = function(html){             faviconURL = jQuery ('img', html).attr('src');             jQuery('#faviconImageURL').val(faviconURL);             tb_remove();             /*Return the IMG to Favicon Thumnail */             jQuery('.favicon').html("");         }     });      After implementing all this code i just duplicate them, but it seems it doesn't wok that way. so what is the best way to achieve this multi image uploader? Thank you in advanced. :)


title: Set default link type to "file" for image galleries

text: Whenever you add a image gallery to a post, the images automatically link to the image attachment pages. This is not ideal, because I want to use Fancybox so the user can cycle through the images. I tried the following code to let the images link to the files by default, but this doesn't seem to work for galleries. Any suggestions on how to set the default link type to "file" for image galleries? I would be even happier if the image attachment page wouldn't be available at all (on galleries an regular images). I don't really like this feature.               /**      * Set default image link type to file      */     function tp_set_default_link_type() {         update_option( 'image_default_link_type', 'file' );     }     add_action( 'after_switch_theme', 'tp_set_default_link_type' );      Thanks in advance!


title: Is it possible to activate customfield 'text description' upon activating the customfield 'checkbox'?

text: I'm trying to find a solution how to activate a another customfield in WordPress pages when the selectbox is selected. This is the script to simply show the customfield `'checkbox'` in wordpress page editor.               array(         'name' => 'Lees meer button',         'desc' => 'Leesbutton weergeven.',         'id'   => $prefix . 'homepage_slider_leesmeer',         'type' => 'checkbox',     ),      What I want to achieve is to display a another customfield in the WordPress page editor, when the selectbox is checked. How can this be done?


title: Add new domain to 'My Sites' using network admin

text: Over a year ago this multi-domain Wordpress was set up by myself and a colleague using the Network Admin tool. There are 5 sites on different domains and it works fine: ![enter image description here](http://i.stack.imgur.com/iLMzv.png) I now need to add further sites to this setup, but cannot for the life of me remember how it's done... I have gone into **My Sites > Network Admin > Sites** and clicked 'Add New', but this only allows me to create subdirectories. I need to add new domains to this installation. I already have the correct server setup (Vhosts etc). Any help much appreciated!


title: Can you order posts from wp_query by two custom meta fields?

text: I'm working on a site that lists events. Right now this query lists events by date:               $args = array(                         'post_type' => 'espresso_event',                         'post_status' => 'publish',                         'posts_per_page' => 8,                         'category_name' => 'homepage',                         'meta_key' => 'event_start_date',                         'meta_query' => array(                             array(                                 'key' => 'event_start_date',                                 'value' => date('Y-m-d'),                                 'compare' => '>=', // compares the event_start_date against today's date so we only display events that haven't happened yet                                 'type' => 'DATE'                                 )                             ),                         'orderby' => 'meta_value',                         'order' => 'ASC'                     );                  $temp = $wp_query;             $wp_query = null;             $wp_query = new WP_Query();             $wp_query->query($args);      However, some events take place on the same date at different times and I need it to order posts first by date and then by a custom meta called event_start_time. Problem is, I'm at a loss on how to do that. wp_query doesn't seem capable of ordering by two custom meta. Is this something I can even do?


title: Prevent Wordpress from automatically correcting URLs

text: I notice that if I type in `http://www.example.com/pag` I can land on an existing page that has a name like `http://www.example.com/page_five`. I don't know exactly what causes this, but I want to know if there is a way to stop it from happening.


title: contact form 7 captcha support anyother captcha plugin?

text: I am Using Wordpress. I installed Contact form7.Now I Want To Add Captcha with Contact form7.I Don't like "Really Simple Captcha" because it shows very simple images.Any other Captcha Plugin Support Contact form7? I Need Like the output of " **SI CAPTCHA Anti-Spam"** or "Fast Secure Contact Form",Here Unfortunately I can't Remove Contact form7 Plugin.So I Want to Add Captcha Plugin with my Contact form7.Please Help Me.


title: Difference between Wordpress and Tumblr?

text: Newbee for Blogging Platform I have an account with Wordpress and Tumblr ..! In Wordpress, i can tag features which i believe more important for blogging sites. In tumblr, all my blogs are located on same page .. i have to eventually scroll down .. and i dont see any tags ..! If any expert can explain me about Difference or Merits of Wordpress or Tumblr .. i would be able to decide and go forward ..! Thank you


title: placement of wp_error with fetch_feed

text:
This might be really simple, but I'm pretty hopeless when it comes to rss and WP. Where should I put the `if ( is_wp_error( $feed ) ) {` in a code like this:               <?php                          $rss = fetch_feed('' . $instance["feed_address"] . '');                         $maxitems = $rss->get_item_quantity($instance["feed_count"]);                          $rss_items = $rss->get_items(0, $maxitems);                          $title = substr($item['title'],0,55)." ... ";                     ?>
                         <?php if ($maxitems == 0) echo ''; else foreach ( $rss_items as $item ) : ?>

<a class="description" href="<?php echo $item->get_permalink(); ?>" target="_blank"><?php echo substr($item->get_title(), 0, 49) . ' ...'; ?> <?php echo strip_tags(substr($item->get_description(), 0, 215)) . ' ...'; ?> <?php echo ''.$item->get_date('j F Y | g:i a'); ?>

                         <?php endforeach; ?>
      Thanks in advance. EDIT: I have the above code in a custom php page, not within core files. Does that make a difference? Anyhow, I managed to do this:               <?php                              $rss = fetch_feed('' . $instance["feed_address"] . '');     if ( !is_wp_error( $rss ) ) :                             $maxitems = $rss->get_item_quantity($instance["feed_count"]);                              $rss_items = $rss->get_items(0, $maxitems);                              $title = substr($item['title'],0,55)." ... ";     endif;                         ?>
                             <?php if ($maxitems == 0) echo ''; else foreach ( $rss_items as $item ) : ?>

<a class="description" href="<?php echo $item->get_permalink(); ?>" title="<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>" target="_blank"><?php echo substr($item->get_title(), 0, 49) . ' ...'; ?> <?php echo strip_tags(substr($item->get_description(), 0, 215)) . ' ...'; ?>

                             <?php endforeach; ?>
      The point being `if ( !is_wp_error( $rss ) ) :`, atleast it loads the feeds and everything seems to be working, but is this ok? The error may or may not appear from time to time, so testing is a bit hard. But before, when the error stroke, the feed stopped the loading that instant and did not load the other feed (I have two) after that either. With the code I posted above, will it skip the feed receiving the error and load the other one? Thanks. EDIT: Thank you very much, without the code above, the error occurs as expected, but with it, the feed is just left empty and the next one is loaded like usual. You rock!


title: New folders in wp-content/uploads have wrong owner:group

text: When new folders in the wp-content/uploads folder are being created, they have the linux owner and group set as root:root. Each month I have to ssh onto the server and change the owner and group to the apache owner/group. I appreciate this could be an apache issue rather than a Wordpress one but can anybody help me address this?


title: How to make widgetized footer styles be inherited from body?

text: I'm making a WordPress site using the Thesis framework. It has a widgetized footer area. I expect to be changing all the font styles frequently and don't want to have to change them in a few places every time to make the footer widget styles match the body styles. Does anyone know how I can make the footers styles (h3, text, li, a href) be automatically inherited from what I've set for the body styles? Thanks!


title: Replicating the_editor (Media Bar, TinyMCE, Visual/HTML Tabs) functionality without a huge rewrite

text: I've been pounding my head on the pavement for some time now regarding implementing the_editor functionality outside the post/page/cpt editor and retaining the look and feel of the function without having to rewrite a ton of things. The problems I've run into are all problems within WP Core. the_editor and it's surrounding JS scripts that pull in TinyMCE, handle the Visual / HTML tabs, and Media Bar are not meant to be used more than once. Furthermore, the_editor is not self-contained, meaning you've gotta load a number of styles and scripts in the header / footer to enable functionality. My question is, has anyone seen or built a self-contained editor function that standardizes the_editor-like implementation for use by plugins? I hired a developer to put their spin on the script and they ended up needing a new set of PHP functions and replicating many WP Core JS functions. This seemed to me tricky, especially for upgrades. For instance, 3.0 to 3.1 nuked the TinyMCE link button. Am I doomed here or is there someone out there who feels my pain?


title: Installing a Plugin ( Which is already manually uploaded )

text: I need to install wordpress plugin for placing source codes to my blogs. See, the following snapshot describes that I have already uploaded plugin to proper place. I didn't make even a single change to that directory & It is uploaded without any intact. What should be the next step for activating this plugin ? ( I am using my own domain ) ![enter image description here](http://i.stack.imgur.com/0Gy5L.png) I have followed steps 1 & 2 from here. I am confused what to do for further steps. Thanks in advance for sharing your knowledge.   Sugar.


title: Full RSS feeds for Custom Post Types

text: I would like my Custom Post Types to bee full text feeds, with the whole content. This url of course works http://sitename.com/feed/?post_type=name, but I only get excerpts in the feed. Regardless of setting feeds to be full text in Panel Settings. I know there is snippets for including the Custom Post Types feed to the main feed. But I want separate feeds to be full content feeds. Thankful for help


title: Wordpress - connection information

text: ![enter image description here](http://i.stack.imgur.com/UdJAX.png) I am entering valid details, though wordpress keep prompting same as follows. What would be the wrong thing ? Edit : Even after modifying the permissions as follows, I am getting same errors.![enter image description here](http://i.stack.imgur.com/8YNV6.png)


title: wp_login_form() redirect not redirecting users < admin

text: Any user that is not an admin is not being redirected to the defined URL with an instance of `wp_login_form()`.               $args = array(         'echo' => true,         'redirect' => site_url( '/chat/' ),          'form_id' => 'loginform',         'label_username' => __( 'Username' ),         'label_password' => __( 'Password' ),         'label_remember' => __( 'Remember Me' ),         'label_log_in' => __( 'Log In' ),         'id_username' => 'user_login',         'id_password' => 'user_pass',         'id_remember' => 'rememberme',         'id_submit' => 'wp-submit',         'remember' => true,         'value_username' => NULL,         'value_remember' => false );               wp_login_form( $args );      When I log in as an admin, it works fine. When I use a test subscriber or editor account, it redirects to the home page.


title: How to show multiple instances of the WP125 Widget?

text: I have multiple sidebars, based on different pages. How can I get the WP125 widget to show on all of them?? Once I add it to one sidebar, it is unavailable to put on others (like many other widgets by the way). Just to clarify, just multiple instances of the widget with the same content. In other words, the same widget but on more than one page (with different sidebars) Below the registration function:               //Create Widget     function wp125_create_ad_widget() {             register_sidebar_widget(__('WP125'), 'wp125_write_ads_widget');     }      Below the line I added to see if another widget is created in the widget area:                       register_sidebar_widget(__('WP125-2'), 'wp125_write_ads_widget'); //nothing happens with this line added.      The rest of the wp125.php file:               function wp125_write_ads_widget($args) {             extract($args);             echo $before_widget;             if (get_option("wp125_widget_title")!='') {                     echo "\n".$before_title; echo get_option("wp125_widget_title"); echo $after_title;             }             wp125_write_ads();             echo $after_widget;     }


title: Weird jquery problem when upgrade to Wordpress 3.1

text:
After installed Wordpress 3.1, a jquery plugin selectbox i'm using not work 100 percent any more I use this plugin in wordpress backend to replace my `<select></select>` with custom html codes on which i can apply css, but with wordpress 3.1, a lot of `<select>` don't get replaced 100%, `<option>` are missing in the replaced codes, for example               <select>       <option (some attributes...)>text</option>       <option (some attributes...)>text</option>     </select>      is supposed to be replaced with (actually not replace, the original `<select>` will be hide)

       text /* option 1 */       text /* option 2 */
     text of selected option
      while actual result is

       /* nothing here */
     nothing here
      weird thing is there are still quite a few `<select>` do get 100% replaced. i tried rollbacked to wordpress 3.0 and reinstall wordpress 3.1 twice, the script works perfectly once rollback to 3.0 and as long as 3.1 is intalled, the issue occurs. there are no wp plugins in my test site and the jquery library is loaded completely first, my other scripts all works well. Seached a lot and no luck, but i found where the issue happens, have no idea why it goes that way though.               return this.each(function() { // for each <select>         var _this = jQuery(this);             ... // I added an alert here, alert(_this.attr('id')), to print <select> id, and all <select> id are catched             jQuery('option', _this).each(function(k,v){                 ... // I added a same alert at first line this function, only replaced 100% <select> id are catched             });              ...         });      this is the plugin codes do replacement, for all not get 100% replaced `<select>`, the line i commented above doesn't get implemented, looks like just be jumped. Any ideas? * * * **[Update]** I removed all other scripts and the plugin, here is the only codes left in my script               jQuery(document).ready(function() {       jQuery('#myadmin select').each(function() {           jQuery(this).find('option').addClass('huh?');       });      });      All options in those were not replaced 100% `<select>` do not get the class 'huh?' * * * **[Update 2]** I changed the script in Update 1 to               jQuery(document).ready(function() {       jQuery('select option').addClass('huh?');      });      Guess what? All `<option>` got this class 'huh?'. It turns out like something about jQuery, but why WP 3.1? * * * **[Resolved]** WP 3.1 upgrade jQuery version to 1.4.4, i deregistered it and bring back jQuery 1.4.2 on my page, everything is ok now, all `<select>` get replaced 100% last question is how do i mark this question as resolved?


title: When Should we NOT Recommend a Client use WordPress?

text: As responsible professionals there has to be a line where we say, WordPress is not supposed to be used for that. When is WordPress _not_ the answer?


title: How to add future Posts to the new "Internal Linking" Feature

text: The new Feature "Internal Linking" is only showing already published posts. If writing a series of posts planned for future publishing, these posts are not showing up in the list. Is there any hook or other possibilities to change the posts aggregated for the list in the tinyMCE-Editor?


title: How to change the main site url on a multisite installation (network)?

text: My multisite (network) installation has 3 sites.   * the main site (nothing there, just very brief information)   * client 1 site -- siteurl/client1   * client 2 site -- siteurl/client2 With domain mapper, siteurl/client# changed to clientdomain.com. Up to that point all is good. Now I want to change siteurl to mydomain.com How do I do that?


title: [Plugin: DukaPress] Modifying template output

text: I'm building a catalog of publications for a Research Center with DukaPress plugin. http://cea3.iscte.pt/publicacoes/occasional-paper-series/ Some publications are available for order, others are just downloaded for free and some are available through the publishers (we just provide a link to them). I see that when there is no price defined, the product does not appear in the grid display. I need the latter two types of publications to appear even with no price, and without the “Add to cart” button. Does anyone know where can I hack this? Or, what can be my best solution here? Thank you


title: Wordpress as framework

text: Working for couple of Months with Wordpress and developing basic plugins I have the impression that wordpress is not able to handle properly requests if more plugins are activated and mainly because that all of theme are reachable inside of the hole framework. Is there a way to setup the plugins in such a way that each plugin should be called when it needs to be called?


title: Redirecting users to referrer page after logging in using custom login form

text: I am using a custom wordpress login form using the following code. I have this form in the sidebar of my site:               <?php     if ( ! is_user_logged_in() ) { // Display WordPress login form:         $args = array(             'redirect' => admin_url(),              'form_id' => 'loginform-custom',             'label_username' => __( 'Username' ),             'label_password' => __( 'Password ),             'label_remember' => __( 'Remember Me' ),             'label_log_in' => __( 'Log In' ),             'remember' => true         );         wp_login_form( $args );     } else { // If logged in:         echo 'you are already logged in';         wp_loginout( home_url() ); // Display "Log Out" link.         echo " | ";         wp_register('', ''); // Display "Site Admin" link.     }     ?>      And in the functions.php page, I am using the following code to **redirect users to the homepage** after they log in:               function my_login_redirect( $redirect_to, $request, $user ){         //is there a user to check?         if( isset( $user->roles ) && is_array( $user->roles ) ) {             //check for admins             if( in_array( "administrator", $user->roles ) ) {                 // redirect them to the default place                 return $redirect_to;             } else {                 return home_url();             }         }         else {             return $redirect_to;         }     }     add_filter("login_redirect", "my_login_redirect", 10, 3);      **My question is:** , Is there a way to redirect users to the 'referrer page (page from where they logged in)' after they login by making changes to the above code or perhaps using a better code? Thanks in advance.


title: wordpress category.php query for featured news item, broken pagination and repeating posts

text:
I am having a few issues with a site I am building, on the news page It has 1 featured post from the news category and then under that more news category posts, but missing out the featured news item as I don't want that item repeating. for example **page 1**   * featured post - post 1    * post 2   * post 3   * post 4   * post 5 **page 2**   * post 6   * post 7   * post 8   * post 9 and so on... So far I have had quite a few different issues created by different methods of resolving the problem. I have had the last post from page 1 repeating on page 2, I have had pagination break, thinking on page 1 it has 3 pages and then on every page after it says there are 5 pages and then it just gets messy from there. This is the code I have currently, It isn't working, if anybody can help me with this that would be fantastic. Basically what I need is my news category list to have for example 5 posts on the first page with one of those posts being featured (and in a separate row from the rest of the posts, they are contained in one row ) and all other pages have 4 posts and for it all to paginate properly and have no duplicate posts. Hopefully this enough to go on. (the numbers for posts per page in the code block are just for test purposes, dont fancy making lots of test posts)               <?php get_header(); ?>          <?php global $wp_query;            $total_pages = $wp_query->max_num_pages;                $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;          ?>                   <?php if(is_paged()) : ?>

                      <?php if (have_posts()) : ?>                 <?php while (have_posts()) : the_post(); ?>
                         <?php the_post_thumbnail(); ?>
<?php the_title(); ?>

<?php echo limit_words(get_the_excerpt(), '25'); ?>...

<?php echo get_the_date(); ?>
                         <a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, 'block_link', true); ?>Full story »
                           <?php endwhile;                      if ($total_pages > 1){                            $current_page = max(1, get_query_var('paged'));                            echo '
';                           echo paginate_links(array(                         'base' => get_pagenum_link(1) . '%_%',                         'format' => 'page/%#%',                         'current' => $current_page,                         'total' => $total_pages,                       ));                            echo '
';                           }  ?>                 <?php endif; ?>

                   <?php else : ?>
                      <?php query_posts('showposts=1'); ?>                      <?php if (have_posts()) : ?>                 <?php while (have_posts()) : the_post(); ?>

                             <?php the_post_thumbnail(); ?>

<?php the_title(); ?>

<?php echo limit_words(get_the_excerpt(), '25'); ?>...

<?php echo get_the_date(); ?>
                             <a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, 'block_link', true); ?>Full story »

                           <?php endwhile; ?>                      <?php endif; wp_reset_query(); ?>

                 <?php global $query_string; ?>                  <?php query_posts( $query_string . '&offset=1' ); ?>                 <?php if (have_posts()) : ?>                 <?php while (have_posts()) : the_post(); ?>
                         <?php the_post_thumbnail(); ?>
<?php the_title(); ?>

<?php echo limit_words(get_the_excerpt(), '25'); ?>...

<?php echo get_the_date(); ?>
                         <a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, 'block_link', true); ?>Full story »
                           <?php endwhile;                      if ($total_pages > 1){                            $current_page = max(1, get_query_var('paged'));                            echo '
';                           echo paginate_links(array(                         'base' => get_pagenum_link(1) . '%_%',                         'format' => 'page/%#%',                         'current' => $current_page,                         'total' => $total_pages,                       ));                            echo '
';                           }  ?>                 <?php endif; ?>

              <?php endif; ?>          <?php get_footer(); ?>      I get the following using this code **Page 1**   * featured post - post 1   * post 2   * post 3   * post 4   * post 5 **page 2**   * post 5   * post 6   * post 7   * post 8 **page 3**   * post 9   * post 10 ...and so on, After page 2, the pagination is working properly and there is no repeated posts :S


title: Possible to create a multisite network where the main site is non-WP?

text: **example.com** <\- large non-WP site I would like to add multiple blogs to the site, with different URL requirements, and manage them all within one Multisite install. However, the original site will remain unchanged, and will not be a part of the WordPress site. Intended architecture:   * **example.com** <\- stays as a large non-WP site    * **blog.example.com** <\- one site in a multisite install    * **team.example.com** <\- another site in a multisite install    * **areallybigteam.com** <\- another site in a multisite install (note the different domain)   * **example.com/myteam/blog** <\- another site in a multisite install (this is not a blocker as it can be moved to a subdomain from the subfolder if needed) Is this possible with multisite? My concerns:   * The multisite/domain mapping may not be able the handle the case where the main domain is not part of WordPress, but other domains within the network are subdomains or subfolders on that domain?   * Can't mix subdomain and subfolder sites (pretty sure that's the case, and not a huge deal)


title: Add comments to any of several posts in an archive listing?

text: I just had a client ask for this and I am not sure it is even possible (or doable in anything close to staying in our time constraints/budget). I have a custom post type that only consists of very short statements, and multiple comments that are replies. On the single article page, it is no problem: I display my comments template and that is that. My client would like to list a bunch of these articles on a single page (an archive, fine so far) and then below each article list the comments (still doable, but a bit confusing I think) and THEN allow comments or replies inline under each article, the same as it would work on a single page, but with multiple comments possible against different articles in a multi post listing (an archive). Is this even possible (in not more than a couple of hours max)?