title: Ordering Posts with Custom Taxonomy Terms Array

text: I can't get the order of my posts (organized by custom tax terms) to come out right in my loop. I made a custom post type of 'staff', in staff there is a custom taxonomy of 'staff-title'. I added terms (similar to categories to keep the UI clean for the client) such as 'editor-in-chief', 'managing-editor', 'poetry-editor', etc. The idea is that the client can go into the 'staff' post type, create posts that are named after the employee and then check which position they hold and then the posts will be displayed in the proper order (displaying posts by running down the chain of command). Here is the function creating my custom tax in functions.php:               function add_custom_taxonomies() {         // Add new "Locations" taxonomy to Posts         register_taxonomy('staff-title', 'staff', array(             // Hierarchical taxonomy (like categories)             'hierarchical' => true,             // This array of options controls the labels displayed in the WordPress Admin UI             'labels' => array(                 'name' => _x( 'Staff Titles', 'taxonomy general name' ),                 'singular_name' => _x( 'Title', 'taxonomy singular name' ),                 'search_items' =>  __( 'Search Titles' ),                 'all_items' => __( 'All Titles' ),                 'parent_item' => __( 'Parent Title' ),                 'parent_item_colon' => __( 'Parent Title:' ),                 'edit_item' => __( 'Edit Title' ),                 'update_item' => __( 'Update Title' ),                 'add_new_item' => __( 'Add New Title' ),                 'new_item_name' => __( 'New Title Name' ),                 'menu_name' => __( 'Staff Titles' ),             ),             // Control the slugs used for this taxonomy             'rewrite' => array(                 'slug' => 'locations', // This controls the base slug that will display before each term                 'with_front' => false, // Don't display the category base before "/locations/"                 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"             ),         ));          }     add_action( 'init', 'add_custom_taxonomies', 0 );      Here is my WP_Query on the staff page...               $args = array(         'post_type' => 'staff',         'tax_query' => array(             array(                    'taxonomy' => 'staff-title',                    'field' => 'slug',                    'terms' => array('editor-in-chief', 'managing-editor', 'fiction-editor', 'poetry-editor', 'nonfiction-editor', 'production-manager' )             )         ),             'posts_per_page' => '-1',             'order' => 'ASC',             'orderby' => 'meta_value_num'     );          $my_query = new WP_Query( $args );      The tax_query 'terms' => array(...) has the terms (staff positions) listed in the order they should be displaying but this isn't the case. Visiting the staff page the posts are displaying in this order, which is the WRONG order: Editor in Chief - Ching-in Chen   Managing Editor - Shanae Martinez   Production Manager - Matthew Morris-Cook   Nonfiction Editor - Kate Nesheim   Poetry Editor - C. McCallister Williams   Poetry Editor - Kara van de Graaf   Fiction Editor - Loretta McCormick   Fiction Editor - Mollie Boutell   Here's the CORRECT order just for reference (same order as the tax query terms array): Editor in Chief - Ching-in Chen   Managing Editor - Shanae Martinez   Fiction Editor - Loretta McCormick   Fiction Editor - Mollie Boutell   Poetry Editor - C. McCallister Williams   Poetry Editor - Kara van de Graaf   Nonfiction Editor - Kate Nesheim   Production Manager - Matthew Morris-Cook   I put up the staff names as they are the title of the individual posts and I thought they might be a part of the problem. Anyone have any ideas on how I could fix this? If you need more information let me know I'd be happy to provide. Thanks in advance!


title: How to modify the default Wordpress 'Pages' widget to have titles on the anchor tags?

text:
So basically, the 'Pages' widget just prints out a list of all pages names as links (as you all probably know). Although, these anchor tags do not have any titles, and that is frowned upon in the SEO world. I would like to modify this to have the titles simply as the name of the page. For example, I would like to turn this:

About Us

Blog

Contact Us

      Into this:

About Us

Blog

Contact Us

      I have had a look around within the `wp-includes/default-widgets.php` file, although it is all pushed through a function called `wp_list_pages`. What must I do to achieve this? PS. Using Wordpress 3.8.1


title: Add Labels to Admin Menu ( How To )

text: I have a custom post type menu called "Notes". It has two basic sub menus: add new and show all. But I want to add more items under these post type but the default array just gave me these. How can I add unlimited items? I'm tired searching, but no result...


title: Iframe a WordPress template

text:
I am trying to iframe a template in WP e.g.
<a class='iframe' href="<?php bloginfo('template_directory'); ?>/training-form.php">Book Now
      This gives me a blank page, but if I do:               <?php get_template_part('training', 'form'); ?>      This displays the form, in the page I thought it might have been a permissions, so I set the template permissions (via ftp) to 644 but still no luck! Any ideas?


title: How do i get (unique) page name?

text: Like from the page of `http://localhost/wordpress/about_us/` how do i get only the "`about_us`" ? Thanks


title: Permalink Issue - Funny & Weird

text: I am having an issue where the permalink for my blog posts shows `www.example.com/blog/_______`. The `/blog` doesn't just seem to go. Please see screenshots.   * ![http://puu.sh/6Z3fi.png](http://i.stack.imgur.com/spMxU.png)   * ![enter image description here](http://i.stack.imgur.com/Mlv1u.jpg) So then I went here, and changed the structure. But it still reflects `/blog` there.   * ![enter image description here](http://i.stack.imgur.com/TNatg.png) (Edit Site)   * ![enter image description here](http://i.stack.imgur.com/0q00j.png) (inside the Settings)     * ![enter image description here](http://i.stack.imgur.com/8eEEl.png) (Permalink Str)


title: Add sku to product url woocommerce

text: I want to make url's with the following structure:               www.mywebsite.com/wordpress/product/postname-sku      for example:                wordpress/product/apple-ap01      Is this possible? And also tell if this done with .htaccess file


title: Multiple columns + Infinite Scroll?

text: I am trying to create a mashable like homepage so I want to loop posts by post views using WP-PostViews plugin, and make it compatible with infinite scroll. This is the loop code I am using, taken bits from here               global $wp_query, $more;          $defaults = array(); //* For forward compatibility     $args = apply_filters( 'genesis_custom_loop_args', wp_parse_args( $args, $defaults ), $args, $defaults );     $args=array(         'posts_per_page' => 8,          'post_type' => 'post',          'meta_key' => 'views',         'orderby' => 'meta_value_num',          'order' => 'DESC',         'post_status' => 'publish'     );     $wp_query = new WP_Query( $args );          //* Only set $more to 0 if we're on an archive     $more = is_singular() ? $more : 0;          genesis_standard_loop();      And I just call it with a shortcode. Now for infinite scroll, this seems like jetpack infinite scroll is not compatible with multiple columns even tough it is quite old but since it still requires the content ID (and not a class) I suppose it is still that way, I have tried the infinite-scroll plugin but seems like the same, it only loads one loop, yet the selector choice allows classes or any other kind of css selector...so maybe it can be tweaked?


title: My loop of random posts drags in comments of said random post

text:
Hi I am setting up a random post generator so that a list of random posts from a chosen category can be displayed on a post. I also made it into a shortcode so it could be applied in an editor. THE ISSUE is that, it is displaying comments from the random posts generated. And I can't figure out why. I do think it is something to do with the while loop I am using for this function, and it is for some reason interacting with the loop in the single.php and 'comments_template()' function, but I am not sure how to stop it here is my code:               function aa_related_posts($id){          $args = array(         'cat' => $id,         'orderby' => 'rand',         'posts_per_page' => '4'     );          $rand_query = new WP_Query($args);          echo '
';          while($rand_query->have_posts()) : $rand_query->the_post();          echo '
 ' , substr(get_the_title(), 0, 22) , '..
';              endwhile;           echo '
';          }      and below is the code I use to make it into a shortcode:               function related_ad($atts, $content = null){           extract(shortcode_atts(array('category' => 25), $atts));           return aa_related_posts($category);     }     add_shortcode('related_ad', 'related_ad');      any help would be appreciated


title: Why is a category/ tag name prefixed to title of every page?

text: Recently, I've noticed there is a category/ tag name "Contests" added to the title of all of my pages. I've checked the "Tagline" under "Settings" >> "General" of course, it hasn't changed. This is what's in `header.php` and I have never touched it at all:               <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?> </title>


title: Remove / Rename Uncategorized Category In Wordpress

text: I have installed wordpress Muilit Site (NETWORK) I need to Remove / Rename **`Uncategorized`** Category In Wordpress. How is this possible?


title: Using wp-uploads instead of wp-content/uploads

text: What is the difference between the `wp-uploads` directory and the `wp- content/uploads` directory? I am running Ubuntu Server 12.04 and recently installed WordPress using apt-get, but there have been a few problems. Most of the install went into `/usr/share/wordpress` including a `wp-content` directory, but inside that, there is no `upload` directory. Instead, in `/srv/www` there is a symbolic link to the main directory, and a `wp-uploads` directory. After changing the permissions of `/srv/www`, I am able to upload things, but not access them via any URL. Any ideas **how** to properly WordPress to serve stuff from `/srv/www/wp- uploads`? Any ideas **why** it's installed like that? Should I just delete it, and reconfigure to use `wp-content/uploads` like everyone else?


title: How can I get user URL by id

text: I am using custom post types, and I have a problem getting the author URL to his profile. I can get the author ID using:               $authers_interviewdoctor = get_post_meta( $post->ID , 'authers_interviewdoctor' , true );      However, I need to get the link to his profile, such as:               www.example.com/author/admin


title: Problem dynamically generating an all purpose title tag

text: The code (below) works fine on all pages **but front-page.php** in WordPress. Specifically, it adds an extra pipe symbol to the beginning of the title tag. For example, if the following is the homepage of the site, the title looks like this: `<title>| Acme Widgets | Custom Widgets for all occasions</title>` Note the pipe at the beginning? All other pages work as expected. **fyi** , my "Reading Settings" are set to a static page _(with selections for home & posts pages)_. Please advise.               in header.php          <title>     <?php if (function_exists('is_tag') && is_tag()) {         single_tag_title('Tag Archive for "'); echo '" | ';     } elseif (is_archive()) {         wp_title(''); echo ' Archive | ';     } elseif (is_search()) {         echo 'Search for "'.esc_html($s).'" | ';     } elseif (!(is_404()) && (is_single()) || (is_page()) ) {         wp_title(''); echo ' | ';     } elseif (is_404()) {         echo 'Not Found | ';     }      if ( is_home() || is_front_page() ) {         bloginfo('name'); echo ' | '; bloginfo('description');     } else {         bloginfo('name');     }     if ($paged > 1) {         echo ' | page '. $paged;     } ?>     </title>


title: wp-login.php ampersand in url results in 404

text: I've got this problem where the wordpress site will throw up a 404 if the wp- login.php has an ampersand appended after it (e.g. session expired argument). I've changed themes, disabled all plugins, renamed .htaccess to .htaccess1 and I still get a 404. It looks like wp-login.php is not linking the "&" after it e.g "wp- login&whatever=blah". I also have another problem if the "redirect_to" has a colon in it e.g. "redirect_to=http://blah.com/" it will result in a 404 too. If you remove the colon, you just get the login page. So I suspect both issues are related and its not encoding the url properly? So it sees theses symbols as programing syntax. I don't code in php so I need some help on what code and where to put it to ensure when WP loads a page it ensures the url its fed is encode properly... Any help grately appreciated.


title: Remove Links from Login page

text: I want to remove all the links from my network login page ("Register","Lost your password" and "Back to site") how can i do that? ![enter image description here](http://i.stack.imgur.com/bBHmF.jpg)


title: Admin Area Custom Type Search By Meta Fields Without Title & Content

text: I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code:               function custom_search_query( $query ) {       if ( is_admin() && is_main_query() && $query->is_search ) {         $query->set('meta_query', array(           "relation" => "OR",           array(             'key' => 'first_name',             'value' => $query->query_vars['s'],             'compare' => 'LIKE'           ),           array(             'key' => 'last_name',             'value' => $query->query_vars['s'],             'compare' => 'LIKE'           ),           array(             'key' => 'email',             'value' => $query->query_vars['s'],             'compare' => 'LIKE'           )         ));         $query->set('post_type', 'application'); // optional       };     }     add_filter( 'pre_get_posts', 'custom_search_query');      The problem is that with those code if I search for say the name "walker" and I have records of my custom post type that match that criteria in the meta field I get back no results. The reason this appears to be happening is that the SQL that is being generated by the query that gets executed is this:               SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts      INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)     INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)     INNER JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id) WHERE 1=1     AND (((wp_posts.post_title LIKE '%walker%') OR (wp_posts.post_content LIKE  '%walker%')))      AND wp_posts.post_type = 'application' AND (wp_posts.post_status =  'publish'      OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft'      OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private')     AND ((wp_postmeta.meta_key = 'first_name' AND CAST(wp_postmeta.meta_value AS CHAR) LIKE  '%walker%')     OR (mt1.meta_key = 'last_name' AND CAST(mt1.meta_value AS CHAR) LIKE '%walker%')     OR (mt2.meta_key = 'email' AND CAST(mt2.meta_value AS CHAR) LIKE '%walker%') )        GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 20      The query is attempting to search both the post title and content AND my custom fields. I don't want it to be looking for matches in the title or content. How can I get the query to stop doing that and thereby returning the restuls that aI want?


title: Save selected item from dropdown menu in a meta box as a metadata value for a custom post type

text:
I have been beating my brains on this one for days now and my Google-fu is failing me. I have created a custom meta box with a dropdown menu that lists all of the terms from a custom taxonomy. **What I cannot figure out is how to save the selected option from the drop down menu when the post is saved.** I'm a bit of a newb in PHP and though I have found plenty of tutorials and other questions that talk about how to do this, I always get baffled when they get to the part about saving the data. Here's my code to create the metabox:               <?php     function MC_Catalog_create() {         add_meta_box( 'MC_Catalog_meta', 'Course Information', 'MC_Catalog_course_info','mc_course_post', 'normal', 'high' );     }          function MC_Catalog_course_info( $post ) {          $MC_Catalog_course_area = get_post_meta( $post->ID, '_MC_Catalog_course_area', true );     $MC_Catalog_course_num = get_post_meta( $post->ID, '_MC_Catalog_course_num', true );     $MC_Catalog_course_name = get_post_meta( $post->ID, '_MC_Catalog_course_name', true );     $MC_Catalog_course_desc = get_post_meta( $post->ID, '_MC_Catalog_course_desc', true );          ?>

             Course Area:	                          <select name="MC_Catalog_course_area">                <?php                 $myterms = get_terms('course_areas', $args);                     $args = array('orderby'=>'name','order'=>'ASC','hide_empty'=>false);                 foreach($myterms as $term){                     echo "<option value='$term->term_id'" . selected( $term->term_id, $MC_Catalog_course_area, false) .">" . esc_html( $term->name ) . "</option>";                 }                 ?>             </select>

             Course Number:	             <input name="MC_Catalog_course_num" type="text" value="<?php echo esc_attr( $MC_Catalog_course_num ); ?>" size="50" />

             Course Title:	             <input type="text" name="MC_Catalog_course_name" value="<?php echo esc_attr( $MC_Catalog_course_name ); ?>" size="50" />

             Course Description:	             <textarea name="MC_Catalog_course_desc" rows="8" cols="100"><?php echo esc_attr( $MC_Catalog_course_desc ); ?></textarea>

     <?php } ?>      And here's my code to save the metadata:               //hook to save the meta box data     add_action( 'save_post', 'MC_Catalog_save_meta' );          function MC_Catalog_save_meta( $post_id ) {              //verify the meta data is set         if ( isset( $_POST['MC_Catalog_course_num'] ) ) {                  //save the meta data             update_post_meta( $post_id, '_MC_Catalog_course_area', strip_tags( $_POST['MC_Catalog_course_area'] ) );         update_post_meta( $post_id, '_MC_Catalog_course_num', strip_tags( $_POST['MC_Catalog_course_num'] ) );         update_post_meta( $post_id, '_MC_Catalog_course_name', strip_tags( $_POST['MC_Catalog_course_name'] ) );         update_post_meta( $post_id, '_MC_Catalog_course_desc', strip_tags( $_POST['MC_Catalog_course_desc'] ) );         }     }     ?>


title: Why do you need an unlikely integer in paginating?

text: The `paginate_links` Codex function reference has some sample code that's being reposted all over the net. It has a section that uses a variable called `$big = 999999999; // need an unlikely integer`:               echo paginate_links( array(         'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),         'format' => '?paged=%#%',         'current' => max( 1, get_query_var('paged') ),         'total' => $wp_query->max_num_pages     ) );      And is used in `str_replace` in the `echo paginate_links` function. Is this some form of encapsulation?


title: Custom url for portfolio post type and for posts

text: > **Possible Duplicate:**   >  How to have a custom URL structure for a custom post type? I create custom post type called "portfolio". Now I try to figure out url, for portfolio, and for standard posts. I want permalink like that: _sitename.com/portfolio/simple-project-name/_ - for portfolio post type. _sitename.com/blog/simple-post-name/_ - for posts. Now, my url for protfolio is fine, but for post i haven't a "/blog/" before post title. If I go to Permalink Settings in Dashboard and add "/blog/" to Custom Structure, it's works for posts, but for portfolio post type i have: _sitename.com/blog/portfolio/simple-project-name/_ - but i don't want /blog/ for portfolio post type. How to fix it?


title: List all authors by matching custom meta data on a category page

text: I have a number of category terms act as placeholders for our departments. I than pull in those terms on the backend profile edit screen using Justin Tadlock's tutorial: http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user- profile-fields and the following code by sanchothefat Now I can list all selected terms by the user on the users author page, but here is my real question and mind breaker: **How can I visit the term page, which acts like a home page for the department, and list all authors that have that term selected in their profile?** Thanks for the suggestions in advance.


title: Custom Infinite-post-scrolling in a custom theme:

text: In the process of attempting to implement "Infinite-Scrolling" in a custom wordpress theme.. I am not using the jetpack plugin, I followed this tutorial (http://wptheming.com/2012/03/infinite-scroll-to-wordpress-theme/) but have had absolutely no luck. It seems as if the JS isnt even loading even though its in the proper location. site: http://www.gd-gaming.com/wordpress Code being used: (This is all in functions.php)                       /**      * Load javascripts used by the theme      */          function custom_theme_js(){         wp_register_script( 'infinite_scroll',  get_template_directory_uri() . '/js/jquery.infinitescroll.min.js', array('jquery'),null,true );         if( ! is_singular() ) {             wp_enqueue_script('infinite_scroll');         }     }     add_action('wp_enqueue_scripts', 'custom_theme_js');          /**      * Infinite Scroll      */     function custom_infinite_scroll_js() {         if( ! is_single() ) { ?>         <script>         var infinite_scroll = {             loading: {                 img: "<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif",                 msgText: "<?php _e( 'Loading the next set of posts...', 'custom' ); ?>",                 finishedMsg: "<?php _e( 'All posts loaded.', 'custom' ); ?>"             },             "nextSelector":".nav-previous .alignleft",             "navSelector":".nav-previous",             "itemSelector":"#container .box",             "contentSelector":"#container"         };         jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll );         </script>         <?php         }     }     add_action( 'wp_footer', 'custom_infinite_scroll_js',100 );


title: Set header for default posts page?

text: In _Settings/Reading_ I set _Testimonials_ as post page. How can I change the header of that page?


How do I save each option in a multiple select menu as it's own meta_key + meta_value pair? This is the basic multiple select menu. Note: multiple select menus allow you to select more than one option.               <select name="products[]" multiple>         <option value="1">Product One</option>         <option value="2">Product Two</option>         <option value="3">Product Three</option>         .... etc     </select>      The bit of code inside the `save_post` function that I need help with.               if ( isset( $_POST[ 'products' ] ) ) {         foreach ( $_POST[ 'products' ] as $product ) {             // this would just keep adding the products as separate meta keys, which is what I want, but I need to modify it so it deletes them when they are unselected.             add_post_meta( $post_id, 'products', $product, false );         }        }      I'd like each option to be it's own meta key and value pair and not a serialized array. If the multiple select menu is updated I'd like old values no longer selected to be removed from the postmeta table with `delete_post_meta`. For example, the wp_postmeta table would look like this:               post_id     meta_key             meta_value     45          products             2     63          products             3     12          products             1


title: Is it possible to paste a link without tags and make it directly a link in a post?

text: So for example: if I post http://testeteststetetst.com, it won't make it a link if it's a post. If it's comment, it does make it a link... Now, I want it for posts too.. Is this possible, if so, how? Can someone help me with that please?


title: Return category posts with WP_Query

text: I have a some categories and want to get the posts with those categories:               $temp = $wp_query; // assign ordinal query to temp variable for later use       $wp_query = null;          $wp_query = new WP_Query('cat=85');      if($wp_query->have_posts()) {            ...     }      But it is not entering in the `if` condition. The category with `id=85` exists and some posts are using it. So I don't understand why it is not returning any post. Any idea. Am I doing something wrong?


title: WordPress & External Page: 404 error in IE and some others

text: I'm working some API. Core is WordPress. Okay, let me paste a sample:               <?php      include_once('../wp-blog-header.php');          $roll= esc_attr($_GET['roll']);          if ( $roll != "" ) {          $args = array(         'meta_key'     => 'std_roll',         'meta_value'   => $roll,     );          $blogusers = get_users($args);         foreach ($blogusers as $user) {             echo '<li>' . $user->user_login . '</li>';     }          }      This is working in FF, Chrome completely. But in IE, error 404 not found error. Same in .NET (in HttpWebRequest), and android (HttpGet) also. When I moved the code in WordPress theme ( a page template), everything was working fine. What was the problem and how that can be fixed?


title: How to add filter to __() and _e()?

text: I would wish to add a filter to `_e()` and `__()` functions. The filter is **FilterTextOfEmail()**. This will basically detect any emails and add anti- spam method to it. I assume, the function for filtering should look like:               function my_wp_text_email_filtering ($content) {         return FilterTextOfEmail($content)     }      But how to call it?


title: Tweets based on Twitter hashtag into a pending WP post

text: If a twitter user sends out a lot of content during the day, not all of their followers see it. It'd be good to have a way to 1) curate those links for followers 2) get more traffic back to your site Are there plugins or hacks to take tweets from a specific hashtag and dump them into a pending WP post? Further, what if you took tweets from a specific hashtag and a specific user (in case that hashtag gets spammed). At the end of the day, they'd login to the site, organize/clean up the links & titles and then publish. Any ideas on how one could do this? This answer Is there a plugin that creates a WP post based on a Twitter account's hashtag? seems somewhat similar, but i don't want to create a post for each tweet - just aggregate links. Any help/advice would be much appreciated!


title: Can’t use a specific custom URL (slug)?

text: I’m having some problems understanding an error I’m getting. I have a page which is called “pitch” and as such the URL and the slug should be “pitch” as well, so: www.my-domain.com/pitch/ But when I enter “pitch” it not only gives me a 404-Error, my host (Bluehost) itself makes a redirect to their “splash screen”. I really can’t figure out why there is a problem specific with that word “pitch” or if there is an explanation about what is happening. If I change the name to for example pitch1 or this_pitch it has no problem rewriting. But the problem is that I already have created some printed posters with the address www.my-domain.com/pitch/ without giving it any though that this keyword could not be used in Wordpress and/or Bluehost. I’ve looked at the rewrite rules in the database and as far as I can see there is no error or incorrectness neither in there nor in any other option-based tables. Does anyone have some kind of explanation, solution or suggestions to what the problem is and how I can help it? Any help is appreciated. Sincere   - Mestika


title: How does automatic redirection for the redirection plugin work?

text: I am experimenting with the Redirection plugin and I really like it so far, but I can't figure out how automatic redirections work. If you go to the options section there is this section: URL Monitoring - You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group. However, I can't seem to trigger this. What I would expect is that manually modifying the slug or changing my permalink structure would trigger the creation of the automatic redirects. However this doesn't happen. Does anyone have experience with this plugin?


title: Path Issue - Getting "localhost" instead the IP

text: Okay, currently I'm trying my WP Theme/Plugin development on LAN so that it can be accessed with multiple devices. What I noticed recently is that the way I include the CSS files makes them not to display in other devices but the host, as it gets an absolute path to "localhost", unknown in clients, instead of 192.168.1.X, and I think would happen the same when going online, as the path is get server side. Now I include it this way:               <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" title="<?php _e('Default'); ?>"/>      Is there any fix that makes use of the wp template? (I know that using a relative path would fix it, but I think thats not the way to go) Thanks :P


title: Adding a WordPress Widget to a settings page

text: I'm looking to put widgets in my plug-in settings page like the ones in the WordPress Dashboard. The action to register the widget is               add_action('wp_dashboard_setup', 'register_widgets' );      I wonder if it's possible to do the same for your own settings pages.


title: Completely disable comments

text: Is there a way (hacks, plugins…) to completely disable comments in WP? By this, I mean completely hiding the feature from view automatically, for existing and new users alike. In particular:   * the WP admin bar and menu   * the posts, pages and medias list, their screen options, and their filters   * the post, page and media editor and their screen options   * the widgets screen   * the applicable settings screens And of course, disabling the functionality. I've run into a variety of aging hacks to do part of this, namely and mostly code to disable meta boxes and a handful of hacks to auto-disable comments. I'm turning to SO in the hopes that some web designer or developer might have the entire set of features on hand. If not, might there be new APIs from the past 3-4 years that make the process simpler (my WP skills are getting rusty), or is seeing it through going to be an awkward output buffer manipulation-related hack?


title: Plugin or mod for wordpress to make content publication SUPER easy

text: Well, im making a wordpress web page for my dad, a psychiatrist, who barely knows how to check his email. He wants to put content regulary but the actual admin interface of wordpress is way to complex for him (i mean he does not care about comments, statistics, plugins, updates, and all the bunch of stuff wordpress comes with). Im a senior PHP developer and I can make a super easy interface but I wonder if there is not something already made?... It will be ideal something like: Login page -> Title -> Content -> send button -> done. If the solution is too technical dont worry, i can handle, I just dont want to make everything from 0. Thanks!


title: sort order for a custom post-type

text: How do I specify a sort order for a custom post-type like I can do with the pages post-type? All I have been able to find online is various plugins that do it for me, but I'd prefer not to use a plugin and just insert the code myself. Any suggestions? Thanks


title: Add $values to post_class()

text: This must be pretty simple, but it is eluding me. I need to add several classes to `post_class()` http://codex.wordpress.org/Function_Reference/post_class I can add one class in a page template, as below: `post_class($even_odd);` but I need to add several more, i.e. `$current_post` and `$current_in_total` They won't `echo`, and they won't output this way: `post_class($current_post; $even_odd; $current_in_total;)` I need to output these in a page template using `post_class()`, not add them via a hook in functions.php Ideas?


title: Upload gravatar in WP profile?

text: I'm interested in the theory of a user being able to register/upload a gravatar directly in their user account within a hosted WP system. Is this feasible?


title: How to make custom post type feed title = taxonomies?

text: I have a custom post type that doesn't use the default title bar to define the post's title. Instead it is a series of taxonomies: artist, album and year. Right now my xml feed is displaying `<title>Auto Draft</title>` for each post type. What filter can I use to have these three taxonomies be the post type's title tag in the feed?


title: Migration issue - blog home page is blank

text: I want to move my Wordpress blog to a different server. I dumped the database from the old server and imported it to the new server, and set up the new database details in `wp-config.php`. I can log in to the admin console online, and I can see all the posts, but if I go to the front page of the blog, the page is just blank. There are no errors in the apache logs. Does anyone have any idea what might be going on?


title: Any way to add custom options to Gallery Settings?

text: Now that Wordpress has updated to version 3.5, the media gallery has been overhauled and this custom options solution doesn't appear to work anymore. I'd like to add a couple of fields to the gallery, so that a client doesn't have to manually add these fields to the gallery shortcode. Does anyone know how to add custom fields with the new 3.5 gallery?


title: Edit Buddypress Groups Activity Page Text

text: I am setting up a Wordpress site with Buddypress functionality for a client. The client wants the "What's new" text under the "Activity" tab changed to something else. I feel like this should be editable in the Buddypress theme files, but I can't seem to find it. Here's a screenshot with the text I'm talking about: http://screencast.com/t/WsUdoycKro Anyone know which file generates this text?


title: Two WordPress sites sharing the same content

text: My question is this: Is it possible to have two separate installations of WP with two separate domains sharing the same content? **Scenario:** User on http://A.mysite.com publishes a post. http://B.mysite.com uses the exact same database and can show that post as if it was its own. I've been looking around for quite some time for this solution and cannot find a valid procedure to achieve this. **My ideas are:**   1. Is there a way to share the database without having the issue of the siteurl and theme stored in the database be an issue.   2. Maybe use just an RSS feed and somehow parse the XML and display them in a template. This is not the best idea because it would have zero functionality that WordPress provides.   3. Find a way to somehow sync the databases but exclude the wp_options table ?


title: Rewrite rule for incoming urls

text: **Part 1:** How do I get people visiting my blog with `http://example.com/archives/14073` redirect to `http://example.com/?p=14073`. **Part 2:** What about when the incoming link is like this: `http://example.com/archives/14073?utm_campaign=Foo&utm_source=foo.com&utm_medium=email`


title: Multiple entries in get_option results? or why is _multiwidget set to 1?

text: I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some configuration options for the widget that I need to access from a php function that is called via ajax, that is why I use the Options API (is there another way?) The code I have is the following (first, widget functions, then my ajax handling function):               public function update( $new_instance, $old_instance ) {          $instance = $old_instance;          $instance = array();     $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';     $instance['api_key'] = ( ! empty ($new_instance['api_key']) ) ? strip_tags ($new_instance['api_key']) : '';     $instance['forum_key'] = ( ! empty ($new_instance['forum_key']) ) ? strip_tags ($new_instance['forum_key']) : '';     $instance['limit'] = ( ! empty ($new_instance['limit']) ) ? strip_tags ($new_instance['limit']) : '';          return $instance;          } // end widget               public function form( $instance ) {          $instance = wp_parse_args(         (array) $instance     );          $title = ( isset ($instance['title'] ) ) ? esc_attr($instance['title']) : __( 'New title', 'eedee-dq-widget' );     $api_key = ( isset ($instance['api_key'] ) ) ? esc_attr($instance['api_key']) : '';     $forum_key = ( isset ( $instance ['forum_key'] ) ) ? esc_attr($instance['forum_key']) : '' ;     $limit = ( isset ( $instance ['limit'] ) ) ? esc_attr($instance['limit']) : 5 ;          // Display the admin form     include( plugin_dir_path(__FILE__) . '/views/admin.php' );          } // end form               public function handle_ajax_post() {          check_ajax_referer( 'my_nonce', 'security' );          if ($_SERVER['REQUEST_METHOD'] == 'POST') {              $error = false;              if ($error == false) {          $options = get_option('widget_my_comment_widget');     ...      everything works (form values saving, ajax calling php function), the only problem is that the line               $options = get_option('widget_my_comment_widget');      returns an array like so               $options = array[3]         $options[3] = array[4]             $options[3]['title'] = (string) discussion             $options[3]['api_key'] = (string) xxx             $options[3]['forum_key'] = (string) zzz             $options[3]['limit'] = (string) 5         $options[4] = array[4]             $options[4]['title'] = (string) New title             $options[4]['api_key'] = (string) xxx             $options[4]['forum_key'] = (string) yyy             $options[4]['limit'] = (string) 5         $options['_multiwidget'] = (int) 1      so it returns multiple widget configurations (why? i only have one instance of the widget in my one sidebar? because i have it in multiple themes?). How can I make sure to either get the correct id of the options I want, or make sure there is only one set of options with no id key? **Edit** After disabling the plugin, removing the db entry, enabling again, adding widget again the $options look like:               $options = array[2]         $options[2] = array[4]             $options[2]['title'] = (string) discourse             $options[2]['api_key'] = (string) xxx             $options[2]['forum_key'] = (string) highcut             $options[2]['limit'] = (string) 5         $options['_multiwidget'] = (int) 1      so still there is this index, I googled and found it is related to the _multiwidget setting, but why is it there? **Edit 2** My constructor is               parent::__construct(         'my_comment_widget',         __( 'my Comment Widget', 'eedee-my-widget' ),         array(             'description'   =>  __( 'Displays recent and popular comments ', 'eedee-my-widget' ), )     );      so I am not using namespaces (or am I unwillingly?) like noted in this part of the official documentation, I found googling multi-widget.


title: Disable all other page except index,register,login till user login

text: I need to block access to all other content except Index,wp-login.php, register.php till the user login. how to accomplish it. i created everthing but, when i try **mysite.com/members** it shows the page how to disable it..


title: why is this script not working on my site

text: I found a script so I can take care that on some months I can change the number of post at a page. So I implment this script at this way : http://pastebin.com/Nbqy0KBU But still all articles are displayed as you can see here : http://test.tamarawobben.nl/2005/04 Anyone a idea why and how to solve this ? Roelof Edit 1 : What I want to achieve is this in pseudo code. When the year is 2005 and the month april(04) and we are on the first page of that month then 1 article must be displayed. if not then the standard number of articles must be displayed.


title: Wordpress database tables crashing frequntly

text: For my site www.placementmantra.in, I am experiencing twice-daily table crashes, mainly `wp_posts`. I tried disabling all plugins, but the problem persists. Any suggestions?


I'm using following codes to have a share button via email. In the mail content box, when I tried to share some posts to test using the button, excerpt showing &#8217 instead of apostrophe and Â instead of space. Could somebody please help me to fix the issue.               <a title="Send via Mail" href="mailto:type%20email%20address%20here?subject=I%20wanted%20to%20share%20this%20post%20with%20you%20from%20<?php echo rawurlencode(get_bloginfo('name')); ?>&body=<?php echo rawurlencode(get_the_title()); ?>%20%20%3A%20%20<?php echo rawurlencode(get_the_excerpt()); ?>%20%20%2D%20%20%28%20<?php echo rawurlencode(get_permalink()); ?>%20%29"  target="_blank">


title: Permalink / sub-template issue

text:
I've got a WP page with many subpages with their own template. The main template includes them. Each element with its own template can be received with an id and an anchor that is linked to this idea, like so: **CHILD TEMPLATE**               <li class="customer" id="<?= ( basename(get_permalink()) );?>">     <a href="#<?= ( basename(get_permalink()) );?>">
             <img src="<?= field('logo') ?>" />
            Each child template has its own URL, of course. Now my problem is: when I use the built-in WP search, I get the permalink to this child template, when the matched keyword is on one of the child template pages. This causes an display error, because just the child template gets loaded and not the whole site it is placed at. Can u help me to get the right link that leads me to the child template anchor on my site it is placed in? That's my **SEARCH**

          Suchresultate für        <?           /* Search Count */           $allsearch = &new WP_Query("s=$s&showposts=-1");           $key = wp_specialchars($s, 1);           $count = $allsearch->post_count; _e('');           _e('');           echo $key; _e(''); _e(' — ');           echo $count . ' '; _e('Artikel');                wp_reset_query();        ?>
            <? if (have_posts()) : ?>                    <? while (have_posts()) : the_post(); ?>
                <a href="<? the_permalink() ?>">                   <? the_title() ?>                               <? the_excerpt() ?>
          <? endwhile; ?>
<? next_posts_link('« Ältere Einträge') ?> | <? previous_posts_link('Neuere Einträge »') ?>
            <? else : ?>
Leider nichts gefunden

           <? get_search_form() ?>
      **Thank you very much in advance. Your help is very appreciated! :)**


title: Search in Archive Pages by subcategory, tag, custom field and year

text: I've been struggling to find the best solution for a better (custom) search. I'm using WordPress for a large Media Catalog, so my intention is to provide better search options. So far I've been able to put various search forms in the archive.php that perform search by: subcategory, tag, custom field(autor) and year, all within the same Archive Category. I'm posting this here to see if there's any body out there that would like to improve or use what I've done so far. What I hate about it is having different forms for each type of search, I feel it's not user friendly at all. Perhaps somebody could help me out to build a better solution. Eventually I'll integrate this with jQuery to see if it can get any better, but first I want to clean up my code, I'm thinking that there could be easier and better ways to do the markup of what I've done. Forget about multiple forms.... UPDATE FORM:               <?php     // Current URL for setting up Search Form Action     global $wp;     $current_url = get_home_url(null, $wp->request, null);     ?>          <form role="search" method="get" action="<?php echo $current_url; ?>/">     <input type="hidden" name="s" value="true" />               General     <input type="text" name="s" />               Tag     <input type="text" name="tag" />               Autor     <input type="text" name="autor" />          <input value="Buscar" type="submit">     </form>      FUNCTION               // Extend Search     function search_filter($query) {     if ( !is_admin() && $query->is_main_query() ) {         if ($query->is_search) {                  $query->set( 'tag', $query->query_vars['s'] );                  $query->set( 'meta_key' , 'autor' );             $query->set( 'meta_value' , $query->query_vars['s'] );          }   }   }     add_action('pre_get_posts','search_filter');


title: Listbox return wrong value in WordPress 3.9

text: I have already created listbox for WordPress 3.8 but it's not working in new version WordPress 3.9. So I write the JavaScript code:               (function() {     var ICONS;     var icon = function(id) {         return '<i class="fa fa-' + id + '"></i>';     }          ICONS = ["rub", "ruble", "rouble", "pagelines", "stack-exchange", "arrow-circle-o-right", "arrow-circle-o-left", "caret-square-o-left", "toggle-left", "dot-circle-o", "wheelchair", "vimeo-square", "try", "adjust", "anchor", "archive", "arrows", "arrows-h", "arrows-v", "asterisk", "ban", "bar-chart-o", "barcode", "bars", "beer", "bell", "bell-o", "bolt", "book", "bookmark", "bookmark-o", "briefcase", "bug"]          var menuval=[];     for (var i = 0; i < ICONS.length; i++) {         var _id = ICONS[i];         menuval.push({text: icon( _id )+' '+_id, onclick: function(){setcontentfun(_id)}        });     }          tinymce.PluginManager.add("font_awesome_glyphs", function(editor, url) {         var menucreate=editor.addButton('fontAwesomeGlyphSelect', {             type: 'listbox',             text: 'Icons',             icon: false,             values: menuval         });     });          function setcontentfun(id) {         alert(id);         return false;     }     })();      So, it creates the listbox and displays well, but, when I click on the menu item, it alerts last element of "ICON" array, where it displays all the elements in the listbox well. So, how can I alert the list item, which I clicked?


title: Resolving Javascript errors likely related to Gantry framework

text: I'm trying to resolve some Javascript errors on a site I'm working on (built using the Gantry framework), as I have a sneaking suspicion they're keeping some plugins from working properly. For instance, the menu does not properly expand on small screens when the "menu" button is clicked, and support docs for the plugin suggest that's caused by Javascript errors. Moreover, I'd just like to clean things up so that I'm avoiding errors in general. Examining the console log, I see the following messages: > Uncaught ReferenceError: Class is not defined rokmediaqueries.js:80 > > Uncaught TypeError: Object [object global] has no method 'addEvent' > www.associatedkyotoprogram.dreamhosters.com/:95 I'm nearly certain the ReferenceError has something to do with Gantry, because the "rok" prefix is used by RocketTheme, the team behind Gantry. I'm less sure about the TypeError. Either way, I don't have the knowledge to resolve these issues. Could anyone please point me in the right direction (or explain to me how to fix them)? Thank you so very much.


title: How do I Use Multiple Loops with WP_Query?

text: Hi I am trying to add post from a certain taxonomy term to a cpt loop. The code below is the code I am using.                   <?php // Create empty array to store post ids in      $excludes = array();                           $args=array(                      'post_type' => array ('gallery','videos'),          'taxonomy'=>'series',          'term' => 'pretty-little-liars',                      'post_status' => 'publish',                     );                    $my_query = new WP_Query( $args );     if ($my_query->have_posts()) : while($my_query->have_posts()) : $my_query->the_post(); ?>      But the problem with the code is that all of my post are now missing. I then learned that I needed to add a second loop. Ok so after reading up on WP_Query I tried to add a second loop but it gave me an error, and here is the code i used for that                       <?php // Create empty array to store post ids in      $excludes = array();                           $args=array(                      'post_type' => array ('gallery','videos'),          'taxonomy'=>'series',          'term' => 'pretty-little-liars',                      'post_status' => 'publish',                     );                    $my_query = new WP_Query( $args );     if ($my_query->have_posts()) : while($my_query->have_posts()) : $my_query->the_post();           // Restore original Query & Post Data     wp_reset_query();     wp_reset_postdata();          /* The 2nd Query (without global var) */     $query2 = new WP_Query( $args2 );          // The 2nd Loop     if ($query2->have_posts()) : while($query2->have_posts()) : $query2->the_post();          // Restore original Query & Post Data     wp_reset_query();     wp_reset_postdata();          ?>      It gave me this error > Parse error: syntax error, unexpected $end in > /hermes/bosweb/web188/b1885/ipg.celebloidcom1/tvcafe/wp- > content/themes/tvcafe/archive-pretty-little-liars.php on line 258 What am I doing wrong here, can anyone help me fix this. I am not going for a seperated structure in my loop but more of a together structure. For Example I don't want the first loop at the top and the second loop at the bottom. I want them combined in one loop. If you need more info or would like to see my whole php please let me know.


title: How to provide a local fallback for Font Awesome if CDN fails?

text: I'm trying to develop a Wordpress theme and figure out how to provide a local fallback for Font Awesome if CDN fails or I develop my theme on a local server without internet connection. The solution I have in mind is something like this (pseudo code):               if ( $CDN_IS_AVAILABLE ) {              wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', false );         } else {             wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome/css/font-awesome.min.css', false, '4.0.3' );         }      Thank you!


title: WordPress: Sortable Metabox Fields Not Saving Position

text: I've run into a problem that has got me stumped: after upgrading to WP 3.6 my sortable metabox fields are not saving their position when you re-order them. Below is my code: PHP:               function save_box( $post_id ) {         $post_type = get_post_type();              // verify nonce         if ( ! isset( $_POST['custom_meta_box_nonce_field'] ) )             return $post_id;         if ( ! ( in_array( $post_type, $this->page ) || wp_verify_nonce( $_POST['custom_meta_box_nonce_field'],  'custom_meta_box_nonce_action' ) ) )              return $post_id;         // check autosave         if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )             return $post_id;         // check permissions         if ( ! current_user_can( 'edit_page', $post_id ) )             return $post_id;              // loop through fields and save the data         foreach ( $this->fields as $field ) {             if( $field['type'] == 'section' ) {                 $sanitizer = null;                 continue;             }             if( in_array( $field['type'], array( 'tax_select', 'tax_checkboxes' ) ) ) {                 // save taxonomies                 if ( isset( $_POST[$field['id']] ) ) {                     $term = $_POST[$field['id']];                     wp_set_object_terms( $post_id, $term, $field['id'] );                 }             }             else {                 // save the rest                 $old = get_post_meta( $post_id, $field['id'], $field['type'], true );                 if ( isset( $_POST[$field['id']] ) )                     $new = $_POST[$field['id']];                 if ( isset( $new ) && $new != $old ) {                     $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field';                     if ( is_array( $new ) )                         $new = meta_box_array_map_r( 'meta_box_sanitize', $new, $sanitizer );                     else                         $new = meta_box_sanitize( $new, $sanitizer );                     update_post_meta( $post_id, $field['id'], $new );                 } elseif ( isset( $new ) && '' == $new && $old ) {                     delete_post_meta( $post_id, $field['id'], $old );                 }             }         } // end foreach     }      jQuery:               $('.meta_box_repeatable tbody').sortable({         opacity: 0.6,         revert: true,         cursor: 'move',         handle: '.hndle'     });          // post_drop_sort        $('.sort_list').sortable({         connectWith: '.sort_list',         opacity: 0.6,         revert: true,         cursor: 'move',         cancel: '.post_drop_sort_area_name',         items: 'li:not(.post_drop_sort_area_name)',         update: function(event, ui) {             var result = $(this).sortable('toArray');             var thisID = $(this).attr('id');             $('.store-' + thisID).val(result)          }     });          $('.sort_list').disableSelection();      What I have is a metabox that contains a repeatable box, inside the repeatable box is an image upload button and caption text input. Everything works fine, I am able to add more repeatables and sort them, but when I save the post the repeatables go back to their original position. If anyone would like I can give you login details to see the live version. Any help would be greatly appreciated.


title: When clicking on submit from my searchform it takes me to home.php

text: I'm trying to setup the search feature for my website but when I try to search something it keeps taking me to my home page. I have created searchpage.php and I've added it to my theme, I've taken the URL and added that to a searchform.php. Here's the code for my searchform:               <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">         <label for="s" class="assistive-text"><?php _e( 'Search', 'lart' ); ?></label>         <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'lart' ); ?>" />         <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'lart' ); ?>" />     </form>      I'm thinking it might be something to do with my template structure? If you need more information just ask. Thanks.


title: Create Landing Page With Login or Subscribe Form That Redirects

text: I am new to wordpress answers and I cannot communicate with the people who were trying to help me with this question previously... I am trying to create a landing page with a subscribe or register/login form that does the following: • Redirects new users to a different page after registering (or subscribing), • Redirects returning users to page after login (or after re-entering their email address), • Automatically subscribes users to my mailchimp rss list. I am using the plugin MailChimp for WP right now and it redirects new subscribers to a new page but not returning ones. Is there a way I can do this with this plugin? If not, what plugin(s) can I use to make all of these things happen? I need to have this landing page finished bas soon as possible.


title: How get file address in wordpress folder?

text: In my wordpress's folder I have a file that I want make it available for some users with download link, does anybody have idea for this? Folder have these files: wp_admin wp_content wp_includes User.xslx I need a link for download "User.xslx". Thanks.


title: Where to call wp_enqueue_script in a plugin with custom template?

text:
I am writing my first plugin and I have this code in the main plugin php to replace home page with custom template               add_filter( 'template_include', 'replace_home_page' );          function replace_home_page( $template ) {           if (is_home()){         return plugin_dir_path( __FILE__ ) . 'mhomepagetemplate.php';       }       return $template;     }      before above code I call code to register some javascript                   $main_js_name='mhp_main.js';              function load_js(){             wp_enqueue_script($main_js_name,plugins_url($plugin_name.'/js/'.$main_js_name),array( 'jquery' ));     echo    '

'. plugins_url($plugin_name.'/js/'.$main_js_name);         }              add_action('wp_print_script','load_js');      the javascript file contains only one line now               console.log('test from js');      I was expecting to see the text `text from js` in javascript console but it is not there. I cannot find the code anywhere on the home page. The custom template calls `<?php wp_head(); ?>` Could someone help me to make the javascript work?


title: restrict subscribers to admin area. They have their own profile on fron-end

text: I want to make a simple website where users can register to my site. they can have their profile page. when they login they should be redirected to their profile page. Subscribers should not be allowed to view their profile in admin side. suggest me plugins or way to do it. Thanking for answer.


title: Add pagination to this following template

text:
                <?php query_posts($query_string . '&pagename=&page_id='); ?>         <?php query_posts('posts_per_page=3'); ?>              <?php  if (have_posts()) : ?>              <?php while (have_posts()) : the_post(); ?>                  <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<a class="blog-header" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?>
      Published on by . -->                           <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('portrait', array('class' => 'omc-staff-photo omc-quick-frame')); ?>
                          <?php the_excerpt('Read the rest of this entry »'); ?>
                      <a class="omc-search-result-link" href="<?php the_permalink(); ?>">Read More »

              <?php endwhile; ?>               <?php else : ?>
Not Found

Sorry, but you are looking for something that isn't here.
               <?php endif; ?>
                 <?php posts_nav_link(); ?>

      * * * code for pagination function pagination($pages = '', $range = 2) $showitems = ($range * 2)+1;                global $paged;      if(empty($paged)) $paged = 1;           if($pages == '')      {          global $wp_query;          $pages = $wp_query->max_num_pages;          if(!$pages)          {              $pages = 1;          }      }              if(1 != $pages)      {          echo "
";          if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "«";          if($paged > 1 && $showitems < $pages) echo "‹";               for ($i=1; $i <= $pages; $i++)          {              if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))              {                  echo ($paged == $i)? "".$i."":"".$i."";              }          }               if ($paged < $pages && $showitems < $pages) echo "›";            if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "»";          echo "
\n";


title: Different Layerslider by page id?

text: I'm in my `header.php` trying to get the layerslider to show depending of page id. It works for slider 1 and 2. But after slider 2 every page get the slider 2. Slider 3 and 4 is not showing. Why?               <?php     if(is_front_page()){layerslider(1);}     else     if(is_page('32'or'36'or'38'or'40')){layerslider(2);}     else     if(is_page('46'or'48'or'52'or'58'or'60'or'62'or'64'or'66'or'69'or'71')){layerslider(3);}     else     if(is_page('161'or'163'or'169'or'173'or'176'or'179'or'182'or'185'or'188'or'191'or'196'or'199'or'202')){layerslider(3);}     else     if(is_page('219'or'221'or'230'or'232'or'234'or'236'or'239'or'244'or'247'or'251'or'264')){layerslider(4);}     else     if(is_page('277')){layerslider(5);}     ?


title: Wordpress can only query up to 766

text:
Basically, I am little unaware of my WP can only run a query up to 766 custom post of one type (the actual posts). I have 26,000 posts that are within one custom post type, but cannot query them all as it only allows me to query the first 766 and then stops on number 767. Has anyone faced this problem before? If any idea on how it could be fixed? EDIT: From some of the comments I have debugged the website and found no errors to my query problem.I have used define('WP_DEBUG_DISPLAY', true); and got no where. The public can be found here: http://universitycompare.com/test/ As you see here it is only showing 766 custom posts, but when it gets to 767 the query stops and does not work form there on. I need a way to set the Reading settings of 'Blog pages show at most' to unlimited. (or 30k+) Also just FYI, the code i'm using to query can be found here:               <?php //wp_reset_query();  // Restore global post data stomped by the_post(). ?>          <?php           // args     $args = array(         'post_type' => 'uc_course',         'order' => 'DESC'     );          // get results     $the_query = new WP_Query( $args );          // The Loop     ?>     <?php if( $the_query->have_posts() ): ?>
         <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>         <?php $object = get_field('university') ?>             <?php if( $object->post_title == "University of Aberdeen" ) { ?>
                 <a href="<?php the_permalink(); ?>"><?php the_title(); ?>
             <?php } ?>         <?php endwhile; ?>
     <?php endif; ?>          <?php wp_reset_query();  // Restore global post data stomped by the_post(). ?>


title: Saving Taxonomies to Post Revisions

text: In a custom post type, I first got all the revisions using `wp_get_post_revisions()`. I looped through, and compared metadata and postdata to see the differences between the two. However, it seems that when I employ the same strategy on `get_the_terms()`, I'm getting the proper taxonomies for the actual published post, but the revisions do not have any taxonomy data. How can I save taxonomy information for revisions?


title: why is wp_new_user_notification not working?

text:
i dont like to use a plugin so i made use of user registration custom signup page and its not sending any emails:( at first everything is working then i added some functions to change the from and the email add using wp_mail_from, which worked then i decided to personalize the email as well by adding some conditions in the wp_new_user_notification then it doesn't send any emails any more... why is it not working? here's the whole template code: `               <?php require_once(ABSPATH . WPINC . '/registration.php');              /* Check if users can register. */         $registration = get_option( 'users_can_register' );              /* If user registered, input info. */         if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'adduser' ) {             $user_pass = wp_generate_password();             $userdata = array(                 'user_pass' => $user_pass,                 'user_login' => esc_attr( $_POST['user_name'] ),                 'first_name' => esc_attr( $_POST['first_name'] ),                 'last_name' => esc_attr( $_POST['last_name'] ),                 'user_email' => esc_attr( $_POST['email'] ),             );                  function make_blog_name_from_name($name) {                     return 'RNA Administrator';                     }                     add_filter('wp_mail_from_name', 'make_blog_name_from_name');                  function from_mail($content_type){                         return 'admin@rnaforum.com';                     }                     add_filter('wp_mail_from','from_mail');                  if ( !$userdata['user_login'] )                 $error = __('A username is required for registration.', 'frontendprofile');             elseif ( username_exists($userdata['user_login']) )                 $error = __('Sorry, that username already exists!', 'frontendprofile');                  elseif ( !is_email($userdata['user_email'], true) )                 $error = __('You must enter a valid email address.', 'frontendprofile');             elseif ( email_exists($userdata['user_email']) )                 $error = __('Sorry, that email address is already used!', 'frontendprofile');              else{                 $new_user = wp_insert_user( $userdata );                 if ( !function_exists('wp_new_user_notification') ) {                 function wp_new_user_notification($user_id, $plaintext_pass){                          $new_user = new WP_User($user_id);                          $user_login = stripslashes($user->user_login);                     $user_email = stripslashes($user->user_email);                          // The blogname option is escaped with esc_html on the way into the database in sanitize_option                     // we want to reverse this for the plain text arena of emails.                     $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);                          $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";                     $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";                     $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";                          @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);                          if ( empty($plaintext_pass) )                         return;                          $message  = sprintf(__('Username: %s'), $user_login) . "\r\n";                     $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";                     $message .= "Thank you";                          wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);                      }                    }                  }              }              // calling the header.php         get_header();?>

                                   <?php if ( is_user_logged_in() && !current_user_can( 'create_users' ) ) : ?>
                 <?php printf( __('You are logged in as %2$s.  You don\'t need another account.', 'frontendprofile'), get_author_posts_url( $curauth->ID ), $user_identity ); ?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e('Log out of this account', 'frontendprofile'); ?>"><?php _e('Logout »', 'frontendprofile'); ?>
                  <?php elseif ( $new_user ) : ?>
                 <?php                     if ( current_user_can( 'create_users' ) )                         printf( __('A user account for %1$s has been created.', 'frontendprofile'), $_POST['user-name'] );                     else                          printf( __('Thank you for registering, %1$s.', 'frontendprofile'), $_POST['user-name'] );                         printf( __('
Please check your email address. That\'s where you\'ll recieve your login password.
 (It might go into your spam folder)', 'frontendprofile') );                 ?>
                  <?php else : ?>                      <?php if ( $error ) : ?>
                         <?php echo $error; ?>
                 <?php endif; ?>                      <?php if ( current_user_can( 'create_users' ) && $registration ) : ?>
                         <?php _e('Users can register themselves or you can manually create users here.', 'frontendprofile'); ?>
                 <?php elseif ( current_user_can( 'create_users' ) ) : ?>
                         <?php _e('Users cannot currently register themselves, but you can manually create users here.', 'frontendprofile'); ?>
                 <?php endif; ?>                      <?php if ( $registration || current_user_can( 'create_users' ) ) : ?>                      <form method="post" id="adduser" class="user-forms" action="http://<?php echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">                               Name
                         <?php _e('Username (required)', 'frontendprofile'); ?>                         <input class="text-input" name="user_name" type="text" id="user_name" value="<?php if ( $error ) echo wp_specialchars( $_POST['user_name'], 1 ); ?>" />

                         <?php _e('First Name', 'frontendprofile'); ?>                         <input class="text-input" name="first_name" type="text" id="first_name" value="<?php if ( $error ) echo wp_specialchars( $_POST['first_name'], 1 ); ?>" />

                         <?php _e('Last Name', 'frontendprofile'); ?>                         <input class="text-input" name="last_name" type="text" id="last_name" value="<?php if ( $error ) echo wp_specialchars( $_POST['last_name'], 1 ); ?>" />
                          Contact Info
                         <?php _e('E-mail (required)', 'frontendprofile'); ?>                         <input class="text-input" name="email" type="text" id="email" value="<?php if ( $error ) echo wp_specialchars( $_POST['email'], 1 ); ?>" />

                         <?php echo $referer; ?>                         <input name="adduser" type="submit" id="addusersub" class="submit button" value="<?php if ( current_user_can( 'create_users' ) ) _e('Add User', 'frontendprofile'); else _e('Register', 'frontendprofile'); ?>" />                         <?php wp_nonce_field( 'add-user' ) ?>                         <input name="action" type="hidden" id="action" value="adduser" />
                      </form>                      <?php endif; ?>                  <?php endif; ?>          `


title: Custom Post Type or Custom Tables

text: I am in the process of writing a plugin that allows end-users to submit a form that includes customer information. Upon submission, I am notified that a new customer has submitted the request form. If I approve the account, I am going to create a WordPress user account. I am at the beginning stages of this plugin and want to know if I should use custom database tables to store my user information, or if I should go the route of just simply using a custom post type and adding meta-data to the post type? **UPDATE:** Wow, down-vote already! Anyway, an update to my question, let me word it this way...I have now attempted to create a custom post type of **customer** , and for **customer** , I wanted to only have a meta-box that contained **First Name** and **Last Name**. When I did this and disabled all of the supports options for the custom post type, it was a nightmare listing the posts due to the missing **Title** value. It would always set the **Title** to "Auto- Generated" and that doesn't work for me. I ran into this GREAT Plugin (super- cpt) that makes the creation of custom post types and meta-boxes a breeze. So, I'm not so sure custom post types will work for me since so much custom UI work needs to be done to convince the front-end and admin dashboard to work for me. I'm leaning more and more on custom data tables but would like more info on customizing the edit form for a custom post type. Anyone have a link they could share?


title: WordPress Custom Search by post_type

text: I've tried a couple of methods but I cannot seem to filter custom post_types from my search results and was hoping someone could help. I have installed "Job Manager" and created 4 jobs which have a custom `post_type = 'jobman_job'` I tried to create a manual search form and set a hidden value of `post_type = jobman_job` but it still returned all posts.               <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">     <input type="text" name="s" id="s" value=""/>     <input type="hidden" name="post_type" value="jobman_job" />     <input type="submit" id="searchsubmit" value="Search" />     </form>      I then tried creating a custom search page and redirecting the search to this page as follows (i.e added page_id hidden field):               <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">     <input type="text" name="s" id="s" value=""/>     <input type="hidden" name="page_id" value="123" />     <input type="hidden" name="post_type" value="jobman_job" />     <input type="submit" id="searchsubmit" value="Search" />     </form>      And then in the custom search page, I added the following code (as per wordpress guide - http://codex.wordpress.org/Creating_a_Search_Page) and I added the post_type of jobman_job to the query array:               global $query_string;          $query_args = explode("&", $query_string);     $search_query = array('post_type' => 'jobman_job');          foreach($query_args as $key => $string) {         $query_split = explode("=", $string);         $search_query[$query_split[0]] = urldecode($query_split[1]);     } // foreach          $search = new WP_Query($search_query);      And it still displays all posts... What am I doing wrong? I have checked the post_type column in the wp_posts table and I have 4 unique entries...so they are there... Any Insight?


title: Settings API withing Singleton class

text:
I've been trying to follow this tutorial but instead of just spawning code into the functions.php file, I'm trying to build a personal framework, so I can use this in other projects. Anyway, I wasn't able to date to make the settings fields appear in the Theme settings page. What am I doing wrong?                <?php          if(!class_exists('tee_configs')){              class tee_configs{                       private static $ins = null;                  public static function instance()             {                 // create a new object if it doesn't exist.                 is_null(self::$ins) && self::$ins = new self;                 return self::$ins;             }                       public function init(){                      add_action( 'admin_init', array(self::instance(), ' init_settings_api_fields'));                 self::sandbox_theme_display();                       }                  function sandbox_theme_display() {                 ?>

Sandbox Theme Options
                     <?php settings_errors(); ?>                          <form method="post" action="options.php">                         <?php settings_fields( 'sandbox_theme_display_options' ); ?>                         <?php do_settings_sections( 'sandbox_theme_display_options' ); ?>                         <?php submit_button(); ?>                     </form>
             <?php             } // end sandbox_theme_display                  function sandbox_initialize_theme_options() {                      // If the theme options don't exist, create them.                 if( false == get_option( 'sandbox_theme_display_options' ) ) {                     add_option( 'sandbox_theme_display_options' );                 } // end if                      // First, we register a section. This is necessary since all future options must belong to a                 add_settings_section(                     'general_settings_section',         // ID used to identify this section and with which to register options                     'Display Options',                  // Title to be displayed on the administration page                     'sandbox_general_options_callback', // Callback used to render the description of the section                     'sandbox_theme_display_options'     // Page on which to add this section of options                 );                      // Next, we'll introduce the fields for toggling the visibility of content elements.                 add_settings_field(                     'show_header',                      // ID used to identify the field throughout the theme                     'Header',                           // The label to the left of the option interface element                     'sandbox_toggle_header_callback',   // The name of the function responsible for rendering the option interface                     'sandbox_theme_display_options',    // The page on which this option will be displayed                     'general_settings_section',         // The name of the section to which this field belongs                     array(                              // The array of arguments to pass to the callback. In this case, just a description.                         'Activate this setting to display the header.'                     )                 );                      add_settings_field(                     'show_content',                     'Content',                     'sandbox_toggle_content_callback',                     'sandbox_theme_display_options',                     'general_settings_section',                     array(                         'Activate this setting to display the content.'                     )                 );                      add_settings_field(                     'show_footer',                     'Footer',                     'sandbox_toggle_footer_callback',                     'sandbox_theme_display_options',                     'general_settings_section',                     array(                         'Activate this setting to display the footer.'                     )                 );                      // Finally, we register the fields with WordPress                 register_setting(                     'sandbox_theme_display_options',                     'sandbox_theme_display_options'                 );                  } // end sandbox_initialize_theme_options                  function sandbox_general_options_callback() {                 echo '
Select which areas of content you wish to display.
';             } // end sandbox_general_options_callback                  function sandbox_toggle_header_callback($args) {                      // First, we read the options collection                 $options = get_option('sandbox_theme_display_options');                      // Next, we update the name attribute to access this element's ID in the context of the display options array                 // We also access the show_header element of the options collection in the call to the checked() helper function                 $html = '<input type="checkbox" id="show_header" name="sandbox_theme_display_options[show_header]" value="1" ' . checked(1, $options['show_header'], false) . '/>';                      // Here, we'll take the first argument of the array and add it to a label next to the checkbox                 $html .= ' '  . $args[0] . '';                      echo $html;                  } // end sandbox_toggle_header_callback                  function sandbox_toggle_content_callback($args) {                      $options = get_option('sandbox_theme_display_options');                      $html = '<input type="checkbox" id="show_content" name="sandbox_theme_display_options[show_content]" value="1" ' . checked(1, $options['show_content'], false) . '/>';                 $html .= ' '  . $args[0] . '';                      echo $html;                  } // end sandbox_toggle_content_callback                  function sandbox_toggle_footer_callback($args) {                      $options = get_option('sandbox_theme_display_options');                      $html = '<input type="checkbox" id="show_footer" name="sandbox_theme_display_options[show_footer]" value="1" ' . checked(1, $options['show_footer'], false) . '/>';                 $html .= ' '  . $args[0] . '';                      echo $html;                       }         }          }


title: How can I position ShareThis buttons manually when using the plug-in?

text: In developing custom themes I have clients who want to use ShareThis for their social media. ShareThis offers a plug-in with a control panel that lets the client manage the buttons, style, etc. the trouble is that the ShareThis plug- in renders the buttons using a filter on `the_content`. This means that the button must always appear right after the main content block. Is there some way I can manually control placement of the ShareThis buttons in my templates when using the plug-in? I know that I could manually place the ShareThis code in my templates, but then the client wouldn't have control inside the Wordpress Control panel.


title: No content found on page 2 of pagination with 1 post per page

text:
This loop (used on a taxonomy-term archive page) is not paginating correctly. The older/newer links for page 2 are there, but when I click on older, it returns "no content found" (when what I expected was to see the second post of this archive). Have I missed something?                   <?php     /**      * Template for various archive pages (category, tag, term, date, etc.      */     get_header();     ?>
                  <?php if ( have_posts() ) { ?>                  <?php                      // queue up the first post so we know what type of archive page we're dealing with                 the_post();                      /*                  * Display some different stuff in the header                  * depending on what type of archive page we're looking at                  */                      // if it's an author page, show the author box with their bio, social links, etc.                      if ( is_author() ) {                     get_template_part( 'largo-author-box' );                      // for categories, tags, and custom taxonomies we show the term name and description                      } elseif ( is_category() || is_tag() || is_tax() ) {                     if ( is_category() ) {                         $title = single_cat_title( '', false );                         $description = category_description();                     } elseif ( is_tag() ) {                         $title = single_tag_title( '', false );                         $description = tag_description();                     } elseif ( is_tax() ) {                         $title = single_term_title( '', false );                         $description = term_description();                     }             ?>                                      <?php                              if ( $title)                             echo '

';                                  // category pages show a list of related terms                              if ( is_category() && largo_get_related_topics_for_category( get_queried_object() ) != '

' ) { ?>

<?php _e('Related Topics:', 'largo'); ?>
                                 <?php echo largo_get_related_topics_for_category( get_queried_object() ); ?>
                      <?php                         }                     ?>                  <?php                      // if it's a date archive we'll show the date dropdown in lieu of a description                      } elseif ( is_date() ) {             ?>                                                      <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'><option value=""><?php _e('Select Month', 'largo'); ?></option>                             <?php wp_get_archives( array('type' => 'monthly', 'format' => 'option' ) ); ?>                             </select>                                      <?php } ?>
                     <?php                              /*                          * Show a label for the list of recent posts                          * again, tailored to the type of page we're looking at                          */                         $posts_term = of_get_option( 'posts_term_plural', 'Stories' );                              if ( is_author() ) {                             if ( function_exists( 'get_coauthors' ) && $author = get_coauthors( $post->ID ) ) {                                 printf(__('Recent %1$s', 'largo'), $posts_term, $author[0]->user_login );                             } else {                                 printf(__('Recent %1$s', 'largo'), $posts_term, get_author_feed_link( get_the_author_meta('ID') ) );                             }                         } elseif ( is_category() ) {                             printf(__('Recent %1$s', 'largo'), $posts_term, get_category_feed_link( get_queried_object_id() ) );                         } elseif ( is_tag() ) {                             printf(__('Recent %1$s', 'largo'), $posts_term, get_tag_feed_link( get_queried_object_id() ) );                         } elseif ( is_tax() ) {                             $queried_object = get_queried_object();                             $term_id = intval( $queried_object->term_id );                             $tax = $queried_object->taxonomy;                             printf(__('Recent %1$s', 'largo'), $posts_term, get_term_feed_link( $term_id, $tax ) );                         } elseif ( is_month() ) {                             printf(__('Monthly Archives: %s', 'largo'), get_the_date('F Y') );                         } elseif ( is_year() ) {                             printf(__('Yearly Archives: %s', 'largo'), get_the_date('Y') );                         } else {                             _e('Archives', 'largo');                         }                         ?>
              <?php                 // and finally wind the posts back so we can go through the loop as usual                      rewind_posts();     query_posts('posts_per_page=1');                  while ( have_posts() ) : the_post();                     get_template_part( 'content', 'singleseries' );                 endwhile;                              largo_content_nav( 'nav-below' );             } else {                 get_template_part( 'content', 'not-found' );             }                ?>
          <?php get_sidebar(); ?>     <?php get_footer(); ?>


title: Compare 3 custom fields and sort by oldest

text: I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build an array and loop through each post to check if the fields have values, then compare the values and sort by the first date (oldest or least recent date). If none of the fields have values the posted date should be used for sorting. I am already sorting posts of some categories and their child categories by one custom field like this:               function orderby_additionaldate($query) {     if (! is_admin() && $query->is_main_query() && is_category( array( 2,57,530 ) ) || cat_is_ancestor_of(2, get_query_var('cat') ) && $query->is_main_query() && ! is_admin() || cat_is_ancestor_of(57, get_query_var('cat') ) && $query->is_main_query() && ! is_admin() || cat_is_ancestor_of(530, get_query_var('cat') ) && $query->is_main_query() && ! is_admin() ) {     if ( $query->query_vars ) {         $query->set( 'order', 'DESC' );         $query->set( 'meta_key', 'additional_date' );         $query->set( 'orderby', 'meta_value' );     }     }     }     add_action( 'pre_get_posts', 'orderby_additionaldate' );      2 things are missing from this:   * It's not comparing 3 meta key values (`release_f`, `release_uk` and `release_us`), and   * It doesn't check if one of them is empty and use the posted date instead (it just sets the value of the empty ones to Jan 1 1970) I would like to create a similar function to the one above for               if (is_post_type_archive('project') )      then it should check the 3 meta_keys `release_f`, `release_uk` and `release_us` for values, if there are any pick the oldest date, if there is no value at all, pick the post's date and then `orderby` the result of this Array. Is this possible?


title: update_post_meta not working in plugin

text:
I am trying to update post meta for a voting plugin. Specifically it calls `update_post_meta()` on an ajax request. Here is the code:               function add_settings_menu() {          add_options_page('Contested Settings', 'Contested Settings', 1, 'manage_options', 'contested_settings');     }          function contested_settings() {         include("contested_admin_settings.php");     }          function get_posts_votes($post) {         $votes = get_post_meta($post, 'votes', true );         return $votes;     }          function add_contested_voting($category, $post) {         if (in_category($category, $post)) {                 wp_enqueue_script('jquery');                 $post = get_post($post);                 $post_id = (int)$post->ID;                 add_post_meta($post_id, 'votes', '0', true);                 /*if($votes == '') {                      update_post_meta($post, 'votes', '0');                      $votes = get_post_meta( $post, 'votes', true );                  }*/             ?>                 <form id='voting-form'>                     Vote now!
                     <?php echo get_posts_votes($post); ?>                     <input type='button' id='vote_up' value='+1' />                 </form>                              <?         }     }          function ajax_posted() {         $votes_plus = $_POST['votes']+1;         $id = $_POST['post'];         if (update_post_meta($id, 'votes', $votes_plus)) {             $votes_ret = get_post_meta($id, 'votes', true);             echo "Thanks for voting! ".$votes_ret." vote.";         } else {             echo "Voting failed!";         }         die();     }          add_action('admin_menu', 'add_settings_menu');     add_action('wp_ajax_contested', 'ajax_posted');      I'm not really sure what is wrong with this. Any thoughts?


title: Is Wordpress secure enough for a multi-user article directory?

text: One of my friends is going to launch a small article directory (ex: http://ezinearticles.com/) using WP. The site will be hosted on a shared hosting in the beginning and will be moved to a dedicated server in the future. The site will be open for public registration like any other article directory and each registered user can manage their posts using the WP admin. The user role will be set to **Author** for all the registered users. The question is that whether **WP is secure enough** for an article directory setup like this and whether the registered users can hack/de-stabilize the site even if all the WP security hardening is done. In a nutshell, **the main concern is with the open registration.** Please advice.


title: User Profile / Add Custom Fields

text: Hello: I am trying to add 7 custom fields to the standard Wordpress wp- admin/profile.php page. There are a few site which suggest a simple bit of code to do this, for example: http://wpengineer.com/2173/custom-fields-wordpress-user-profile/ But, I want to be able to add my custom fields so that they appear exactly below the "Biographical Info" box and above the "change password" field. Everything I have read and tried places custom fields at the bottom of the page, but I want them to appear between the "Biographical Info" box and above the "change password" field. How can I do this? Is it possible? Does this involve using javascript as well? Please advise. Thank you.


title: What is the correct way for a theme to support plugin UIs?

text: For instance if my plugin is creating a form on a page, what can I do to make it as easy as possible for theme developers to skin the form too?


title: How can I get posts from 9/13/11 to today with SQL?

text: I have been working with a client to redesign his site and we are at the stage where we are going live, except I'm running into a little problem. Time is of the essence, as the deadline is mid-day tomorrow. Since I began working on the site, he sent me a database of posts from the beginning of time up until September 13, 2011. Now that we're going live with the new design, I need to update the posts in the new database from that day up until today so they don't get lost in the process. I tried using WordPress' export feature, unfortunately there are far too many posts for it to allow me to even download the file. So what I want to do is use an SQL query to get these posts, and export a `.sql` file in phpMyAdmin. Can anybody give me an example of how I would do this? Any help is appreciated, thanks.


title: Difference between 'LIKE' and 'IN' in meta queries

text: You can use a variety of different comparison operators in meta queries, among which are `'LIKE'`, `'NOT LIKE'`, `'IN'`, and `'NOT IN'`. What is the difference in use between `LIKE` and `IN`? Here's the relevant section of the WP Query Codex page: > ### meta_query ( _array_ ) - Custom field parameters (3.1) > >   * **key** ( _string_ ) - Custom field key. >   * **value** ( _string_ | _array_ ) - Custom field value ( _Note_ : Array > support is limited to a compare value of 'IN', 'NOT IN', 'BETWEEN', or 'NOT > BETWEEN') >   * **compare** ( _string_ ) - Operator to test. Possible values are '=', > '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', > 'NOT BETWEEN'. Default value is '='. >   * **type** ( _string_ ) - Custom field type. Possible values are > 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', > 'TIME', 'UNSIGNED'. Default value is 'CHAR'. >


title: User not logged first time I open the homepage

text: I am experiencing a weird issue and I didn't find any luck on Google. Every time I open my homepage it looks like I am not logged in (there is the form to login). But if I click on any internal link or menu option from the homepage, it comes out I am logged (and from that moment on I am correctly recognized as logged). If I open the browser and point directly to an internal page I am recognized as logged. Only if the first page I open is the homepage, my session is not recognized. Sometimes refreshing is enough to have me logged in the homepage, but sometimes I can press F5 ad libitum without getting me logged there. I activated the debug and I don't get any error i the homepage. Anything else I can check? The author of the template cannot support me as this issue doesn't happen on the demo website of the template. Thanks in advance for your precious support! Cheers **UPDATE** : I made a quick test and it turned out that `is_user_logged_in()` is always false in the homepage... what could be the reason for that? :-o


title: How to hide custom sidebar on mobile

text:
So I have made some customizations to my wordpress premium theme,but I want to hide those customizations on mobile versions. I've tried to add `id` of widget inside `@media` with `display:none;` but nothing, still active. This is the code for the second sidebar I've made inside theme's `functions.php`:               if (function_exists('register_sidebar')) {     register_sidebar(array(     'name'=>'Sidebar Left',      'id'   => 'sidebar-left',             'description'   => 'Widget Area left',             'before_widget' => '
',             'after_widget'  => '
',             'before_title'  => '
',             'after_title'   => '
'            ));           }        Inside `index.php`:
 <? php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Left')): endif;?>
      How to hide it ? The 2nd thing I made with customizations is from vertical posts (latests) I've made 4 blocks inline. Here I changed `height` and `width`. In default version of theme thumbs are small and no visible on mobile, only the title is shown. Inside `@media` is this : `ul.headlines li img`, which hides those images, but the problem is that the changes I made now leave some gaps so its the title and below the title is the area where image should appear and since the line of code `ul.headlines li img` (`display:none;`) is used they don't, and only the place where the image should be is shown.What I want is to remove that gap on mobiles, like in default theme, but after 2 days no luck . Any idea?