title: How to load shortcode sooner

text:
I am trying to add a shortcode to my menu, the menu item shows up but not the shortcode output. I think the problem is that the shortcode runs after the menu has run and therefore the shortcode output is not present. Is there a way to load shortcode sooner? Thanks Edit: Sorry here it is:               //--Nav Menu     function add_profile_link_to_nav(){       if ( is_user_logged_in() ) { ?>

 All  Members

<?php echo custom_execute_shortcode(); ?>

         <?php }      }     add_action( "wp_nav_items","add_profile_link_to_nav" );          function custom_execute_shortcode() {      $myfunction= '[bc_user_groups amount="20"]';      $myfunction_parsed = do_shortcode($myfunction);      return $myfunction_parsed;     }      Edit: Hello Ralf912, thanks for the response, I am trying to use your suggestion and I am getting this error code: **php_code_error:1:/hsphere/local/home/c262876/mydevelepmentsites.com/maol_bp/wp- content/themes/CC-Child-Theme/functions.php:72:Call to undefined function do_bc_user_groups() Message:A fatal code error occurred.** I have:               //--Nav Menu     function profile_link_to_nav(){       if ( is_user_logged_in() ) { ?>

 All  Members

<?php echo custom_execute_shortcode(); ?>

         <?php }      }     add_action( "bp_menu","profile_link_to_nav",1 );          function custom_execute_shortcode() {     $atts = array( 'amount' => 20 );     $myfunction_parsed =bc_user_groups( $atts );     return $myfunction_parsed;     }      Thanks


title: Nest Next and Previous in a href with class that has a background image

text: How do I nest Next and Previous link in a href attribute that has a class and background image in a single post page? I want to make it something like the below which is not working.               <a class="next" href="<?php echo $prev; ?>">Previous     <a class="prev" href="<?php echo $next; ?>">Next      Here is the link to a sample site: http://ifunnypic.com/dad-i-m-gay_3317.html Thanks


title: Custom Permalinks for Custom Post Types and Taxonomies

text: I've been struggling with this for hours. I'm trying to get this URL structure:   `example.com/business/%custom-tax-name%/%custom-post-name%/`   By custom tax name I don't mean the name of the taxonomy ("Location"), I mean the value that is chosen for that particular post, which will be a city name. So,   `example.com/business/long-island-city/business-name`   or   `example.com/business/phoenix/business-name/` So far I've made a custom taxonomy:               $singular = 'Merchant Location';     $plural = 'Merchant Locations';     $taxonomy_args = array(         'rewrite' => array(             'slug' => 'business-location',             'with_front' => FALSE,             'hierarchical' => FALSE         )     );       // Register taxonomy ...      and have changed the links in the `post_type_link` filter               function filter_business_permalinks($post_link, $post, $leavename, $sample) {          if ($post->post_type == 'my_custom_post_type') {         $terms = get_the_terms($post->ID, 'my_custom_taxonomy');          foreach ($terms as $term) {              $post_link = str_replace('business/', 'business/'. $term->slug .'/', $post_link);              break;          }          return $post_link;     }     add_filter('post_type_link', 'filter_business_permalinks', 10, 4);      And the resulting URL is fine after that, just what I wanted, so the filter function is working perfectly. However when I click the URL, it goes to this:   `example.com/business/long-island-city/long-island-city/business-name`   which yields a 404. What could be causing this and how could I fix it? All help is greatly appreciated. **Note:**   What I don't want is a URL structure like this:   `example.com/business/location/long-island-city/business-name/`   having the taxonomy _name_ in the URL.


title: How to search for articles containing two words?

text: I'd like to serach my blog for articles that contain the two words `bash` and `variable`. There is an article that contains both words, but it is not found. It seems to me that the wordpress search only searches for a single string. If I search e.g. for `bash script`, it finds articles. If I search for `script bash` it doesn't find one, since the words have a different order in the article. Is it somehow possible to allow the search for multiple words irrespectively of their order?


title: Comment Nav versus jquery Tabs

text:
I have a page full of comments. These comments have 3 custom_fields assigned to it (using get_comment_meta):   1. New    2. In Progress   3. Solved From my page I call the comments using:               wp_list_comments( array( 'callback' => 'service_comments', 'style' => 'ul', 'format' => 'html5','reverse_top_level'=>1,  ) );      In my service_comments function I have assigned the outcome of the custom fields (new, in progress, solved) to the class of each comment. On my page I have 3 (jQuery) tabs to filter the comments by ‘new’, ‘in progress’ or ‘solved’. The jQuery does this thanks to the class assign to the comment div. So far, everything works out. Until I noticed the comment_navigation > this is placed on every tab and counts ALL comments (not just the comments on that specific tab with that specific comment_meta assigned to it's class). This is my comments nav and it’s placed below the wp_list_comments:                <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :  ?>                              <?php                     $paginate_args = array(                         'prev_text' => '',                         'next_text' => ''                     );                     paginate_comments_links($paginate_args);                 ?>

                        <?php endif; // check for comment navigation ?>      So with comments_per_page set to 10, on the “New” tab which only holds 6 new comments, it also shows the page nav (it also counts the comments on the in progress and solved tab). How do I solve this? I need the comment nav to see the difference between new, in progress and solved issues and start counting per tab/comment_meta.


title: 1 bit audio player

text: I have wordpress and I use 1 bit audio player (Wordpress Plugin) to add songs. When I try to download a song, it shows in the URL but it is not inserted in the description.


title: XML Sitemap Generator can't notify google and bing

text: I am using wordpress Version 2.9.2 and XML Sitemap Generator 3.2.3 I have registered with Google Webmaster Tools. But I get an error while notifying to Google and I really don't know what it means. Heres a screenshot : ![alt text](http://i.stack.imgur.com/T2dwe.png) And when I click on view result it show me the following message:               Ping Test          Trying to ping: http://www.google.com/webmasters/sitemaps/ping?sitemap=http%3A%2F%2Fsearock.bplaced.net%2Fsitemap.xml.gz. The sections below should give you an idea whats going on.     Errors, Warnings, Notices:     WP_DEBUG was set to false somewhere before. You might not see all debug information until you remove this declaration!     Result (text only):     Result (HTML):      If I want to debug the error where can I find WP_DEBUG ? Can someone tell me what's wrong here. Note : I have completed Google Webmaster verification process. Thanks.


title: User Access Manager plugin

text: I have updated the UAM plugin from 1.0Beta2 to 1.1.4 (latest at the moment) and it stopped working. When I select a group to have rights for an article - the selection is not saved. I checked with firebug - the info is present in HTTP POST content, but is not saved in the backend. How can I fix that?


title: How to specify or extend the CSS-class of a menu item?

text: is there a way to allow admin users to add classes to individual menu items in the back end? we have done some individual javascripting and CSS using the title tag, but that is not flexible as it is visible to the end user, so the method is not suited effects needed to be applied to multiple items.


title: Add static value between second & third menu value

text: How can I add a static value between second and third menu value? For example, like this: Menu value 1, Menu value 2, **STATIC VALUE HERE** , Menu value 3, Menu value 4 I know about the Walker_Nav_Menu and start_el/end_el. But this adds prefix to all menu values. I just want to add one - as stated - in between second and third value. How do I accomplish this?


I want to display Show subcategories with image only for selected category Code for subcategory :               <?php      if (is_category()) {          $this_category = get_category($cat);      }          if($this_category->category_parent)      $this_category =  wp_list_categories('orderby=id&title_li=&child_  of='.$this_category- >category_parent."&echo=0"); else      $this_category =  wp_list_categories('orderby=id&title_li=&child_ of='.$this_category->cat_ID."&echo=0");      if ($this_category) { ?>          <ul>       <?php echo $this_category; ?>     </ul>     <?php } ?>      It show only subcategory name, but I want to display images as well.


title: Local wordpress install only shows home page, all other pages Not Found

text: I am working on a local install of a live wordpress site, all links from the main page show Not Found errors. all .htaccess files are all present. The problem is that every page except for the home page is showing a Not Found error, I can't find any problems with permissions or anything else that would cause it to not work. Is there anything that I can try that I might be overlooking? I apologize for the vauge questions but I am having trouble figuring out where to start.


title: conditional statement for custom taxonomy

text:
Struggling to find out how to achieve this, if it is at all possible. The equivalent of `is_category` but for a custom taxonomy I've set up. The taxonomy category if which being `Taxonomy Name` with 2 taxonomies: `Taxonomy One` and `Taxonomy Two`. But this:               <?php if ( has_term('taxonomy-one' ) ) {?>
<?php the_field('field_name'); ?>
     <?php } elseif ( has_term('taxonomy-two' ) ) {?>
<?php the_field('field_name'); ?>
     <?php } ?>      There doesn't seem to be any documentation for this either so I'm not at all sure if it's possible, I'm hoping so though, any suggestions would be greatly appreciated!


title: Display filesize of custom field value

text: I wanted to display the filesize of a document (pdf, word, excel etc) from a custom field. I already search and I found nothing. I got this code from other site but its in PHP. So I add it manually to my theme.               if($kpmFile !== get_post_custom_values("kpm_UploadFile")) {     $head = array_change_key_case(get_headers($kpmFile, TRUE));     echo $filesize = $head['content-length'];     }      I get this warning from above code:               Warning: get_headers() [function.get-headers]:      But if I make it like this:               if($kpmFile !== get_post_custom_values("kpm_UploadFile")) {     $head = array_change_key_case(get_headers("http://example.net/publications/Wellspring-of-Hope.pdf", TRUE));     echo $filesize = $head['content-length'];     }      The code will show the filesize in 44147474 which the file is actually 42.1MB I need help on how to display the correct file size of the document in kb, mb or gb from custom field value. Thanks in advance.


title: Nested loop called with shortcode duplicating the content above the main loop

text:
I'm trying to use a shortcode to call one post from a custom post type and display it inside another page's content. (Basically, we have a custom post type called 'testimonials' and we want to display a random testimonial on each page, but inside the page's content.) I used this tutorial as my starting point. Here's my code:               function cd_random_testimonial($atts) {             // EXAMPLE USAGE:        //[loop the_query="showposts=1&post_type=testimonials&orderby=rand"]             // Defaults        extract(shortcode_atts(array(       "the_query" => ''        ), $atts));             // de-funkify query        $the_query = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $the_query);        $the_query = preg_replace('~&#0*([0-9]+);~e', 'chr(\\1)', $the_query);             // query is made          query_posts($the_query);             // Reset and setup variables        $output = '';             // the loop        if (have_posts()) : while (have_posts()) : the_post();                $testimonial = the_content($post->ID);           $clientname = get_the_title($post->ID);                 // output all findings - CUSTOMIZE TO YOUR LIKING           $output .= '

';           $output .= get_the_content($post->ID);           $output .= '

~ ';           $output .= $clientname;           $output .= '

';             endwhile; else:                $output .= 'nothing found.';             endif;        wp_reset_query();        return $output;              }         add_shortcode("loop", "cd_random_testimonial");      It's working exactly as it should where the shortcode is entered, but it's also adding that same content above the page's content. How do I keep it from posting that extra content and just stay where it's supposed to? Thanks!


title: Browsing to permalink prefix results in 404

text: I have set my blog permalink as follows:               /news/%postname%      This works. Going to any post, such as `/news/test`, will serve the `single.php` as expected. I can also browse to a category such as `/news/category/uncategorized`, which brings up the `archive.php`. All good. However, when I browse to `/news` (which I was expecting to also bring up `archive.php`) I get a `404` and I don't understand why? I was at least expecting to be served the `index.php` not a `404`. Ideally I have the `archive.php` template served by browsing to `/news` but to solve the `404` issue first would be great. Any suggestions much appreciated. **PS** : I was hoping to prevent to create a dummy `/news` page. **PPS** : Yes, I always clear my permalinks by saving them from the Settings panel.


title: Create a User Role with permissions to only upload files to the media library?

text: Some of the employees at my organization need to be able to upload files to a folder and share a link with others. It’s primarily documents like pictures, pdf’s and Word documents. And instead of creating a completely new File Management System, I was thinking about just using the built-in Wordpress Media Library function for this task. But my problem is, that I want to create a User Role with permissions to **only** do that and nothing else. If possible, also hide all other option panels, custom post types, etc. I’ve been reading a bit about User Roles and Capabilities, and founded a Plugin but I think it is a bit much to install a large plugin when it is the only User Role I need to create. And more, I would like to learn some more about it and I think this is a good way to do it. Any help would appreciate. Sincere - Mestika


title: Ajax call does not work for this simple code

text:
I have this ajax call which gets the value from a hidden input field
         <input type="hidden" name="GreetingAll" id="GreetingAll" value="Hello Everyone!" />           <input type="submit" id="PleasePushMe" />

            jQuery(document).ready(function() {           var GreetingAll = jQuery("#GreetingAll").val();          alert(GreetingAll);          jQuery("#PleasePushMe").click(function(){             jQuery.ajax({                   type: 'POST',                   url: 'http://www.yoursitename.com/wp-admin/admin-ajax.php',                   data: {                       action: 'MyAjaxFunction',                       GreetingAll: GreetingAll,                   },                   success: function(data, textStatus, XMLHttpRequest){                       jQuery("#test-div1").html('');                       jQuery("#test-div1").append(data);                   },                   error: function(MLHttpRequest, textStatus, errorThrown){                       alert(errorThrown);                   }                   });             });         });        the functions fails to return or do anything inspite of including these functions , in the function.php               function add_myjavascript(){           wp_enqueue_script( 'ajax-implementation.js', get_bloginfo('template_directory') . "/scripts/ajax-implementation.js", array( 'jquery' ) );       }       add_action( 'init', 'add_myjavascript' );     function MyAjaxFunction(){           //get the data from ajax() call           $GreetingAll = $_POST['GreetingAll '];           $results = "
".$GreetingAll."
";           // Return the String           die($results);       }       // creating Ajax call for WordPress       add_action( 'wp_ajax_nopriv_ MyAjaxFunction', 'MyAjaxFunction' );       add_action( 'wp_ajax_ MyAjaxFunction', 'MyAjaxFunction' );        Any idea why is this code not working?


title: Is there a plugin for feedback like Kissmetrics available?

text: Kissmetrics has a little widget thing that pops up from the bottom-right corner of the page, asking for comments or offering a short feedback survey. Is there anything like this available for Wordpress for free? I'm on a shoestring and need a free plugin. I don't mean a subscription-based service: just a plugin that can pop up a little form for feedback/ a survey, collecting and storing the data locally.


title: How do you put your own rules into .htaccess?

text: Is it possible to put your own rules in .htaccess but still give WordPress control over 'it's bit'?


title: Max Number of Post Versions Supported

text: We are running a news site based on WP 3.5.1. Some editors complain that the WYSIWYG editor on the post editing page is not working properly for some posts. The editing buttons are not shown. In some cases we need to update a post many times (like more than 500 times).   May it be the cause?   What will happen to these posts if I set `WP_POST_REVISIONS` to 10?   Will old versions be deleted automatically, or will they remain?


title: what file I need to create to work date archive links?

text: I am using my own theme. **my archive.php..**               <?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'show_post_count' => 1 ) ); ?>     <?php wp_list_categories( array ( 'title_li'=> '' , 'show_count' => 1))?>     php wp_list_authors( array ('optioncount' => 1)); ?>      I have **author.php** and **category.php** so the linkes generated by `wp_list_categories` and `wp_list_authors` but if click on the links generated by `<?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'show_post_count' => 1 ) ); ?>` it's just post back the archive.php. eg: If I click **dec/2013** from `www.mydomain.com/blog/archive` then the URL become `www.mydomain.com/blog/dec/2013/12` with same content of `www.mydomain.com/blog/archive` why? what I wanna do to solve this? * * * If I click **category1** on `www.mydomain.com/blog/archive`then the URL become `www.mydomain.com/blog/archive/category1` and content generated from **archive.php**


title: Can't change excerpt length and more tag

text: I tried to change the excerpt length and the more tag the way it is described in the codex:               function custom_excerpt_length( $length ) {         return 10;     }     add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );               function new_excerpt_more( $more ) {         return '[.....]';     }     add_filter('excerpt_more', 'new_excerpt_more');      this is how I call the excerpt from within the template:               <?php the_excerpt(); ?>      But it still has the same length and more tag as before. How can that be?


title: Show title when inserting single images

text: I just can't get how to do this. When inserting a gallery I have this output:                               But when inserting single images the title doesn't shows. How to fix that? It's not showing on default wp themes, which is strange.


title: Can I use the different settings sections over different pages using the save options group?

text: I registered one options group with few different options sections. Each section is meant for different page.               register_setting(                       // http://codex.wordpress.org/Function_Reference/register_setting             'mhp_options',                  // Options group             'mhp_plugin_options',           // Database option             'mhp_plugin_options_validate'   // The sanitization callback,     );          // Manage Menu section     add_settings_section(                   // http://codex.wordpress.org/Function_Reference/add_settings_section             $mhp_manage_menu_section,   // Unique identifier for the settings section             __('Manage Menu Settings', 'mhp'),  // Section title             '__return_false',               // Section callback (we don't want anything)             $mhp_manage_menu_section            // Menu slug     );     add_settings_section(                                $mhp_home_page_layout_settings_section,                  __('Home Page Layout Settings', 'mhp'),                  '__return_false',                            $mhp_home_page_layout_settings_section               );      Then each page is using               settings_fields( 'mhp_options' );      do_settings_sections( $mhp_manage_menu_section);      so the other page is using               settings_fields( 'mhp_options' );      do_settings_sections( $mhp_home_page_layout_settings_section);      but it looks like on save only current section is saved in the options table. What ever was already there is deleted. Do I have to create new options group for each page or is there any other solution?


title: How can I replace Email addresses with BitMessage Addresses througout wordpress?

text: BitMessage (bitmessage.org) is a peer-to-peer email system kind of based on BitTorrent. By itself, this software and its' messages are not compatible with email, so in order to send an email to a bitmessage address, a Gateway service has been created here: https://bitmessage.ch The gateway works by simply allowing anyone to send an email to **{bitmessage- address}@bitmessage.ch** This is a less secure way of using bitmessage of course, but I don't see any other way of setting wordpress up to natively use bitmessage. So my question is: How exactly do I change out the email address field of wordpress 3.9.1 to a Bitmessage address field, & what exactly do I need to change in which files to ensure that "@bitmessage.ch" is attached to the end of the bitmessage address at any & all email send requests? Thanks in advance! SYG


title: wp_editor not saving data, and text area showing html tags

text:
This is my custom meta box, here text area showing html tags.i used tinymc textaea editor. and i try to use wp_editor also. but data not saving.if it saved, i don't know how to call it. please help me find solution --THANK YOU--                         <?php     add_action("admin_init", "admin_init");         add_action('save_post', 'save_points');         function admin_init(){         add_meta_box("productInfo-meta", "Product Details", "product_meta_options", "product", "normal", "low");}              function product_meta_options(){             global $post;             $custom = get_post_custom($post->ID);             $category = $custom["category"][0];             $brand = $custom["brand"][0];             $features = $custom["features"][0];             $holds = $custom["holds"][0];     ?>

             Category              <input type="text" size="100" name="category" value="<?php echo $category; ?>" />

             Brand              <input type="text" size="100" name="brand" value="<?php echo $brand; ?>" />

             Features	             <textarea rows="20" cols="100" name="features"><?php echo $features; ?>

             	                          <?php wp_editor( $content, 'test_content', $settings = array('textarea_name'=>'test_content','textarea_rows'=>20) );?>

             Holds             <textarea rows="20" cols="100" name="holds"><?php echo $holds; ?>

          <?php     }          function save_points(){         global $post;         update_post_meta($post->ID, "category", $_POST["category"]);         update_post_meta($post->ID, "brand", $_POST["brand"]);         update_post_meta($post->ID, "features", $_POST["features"]);         update_post_meta($post->ID, "holds", $_POST["holds"]);     }?>


title: Display latest 10 galleries

text: I want to create a custom page that will display let's say 20 latest galleries / page - but only the first image from the gallery, not all of them. something like this: http://www.autoblog.it/gallerie/ I've done this:               <?php     $args = array(     'post_type' => 'attachment',     'posts_per_page' => 10,     'post_parent' => $postid,     'numberposts' => 1,     'paged' => $paged,     );     $attachments = get_posts($args);     if ($attachments) {     foreach ($attachments as $attachment) {         echo the_attachment_link($attachment->ID, false, false, true )         echo get_the_title();   }     }?>      it works but what it does is to display latest 10 images, not latest 10 galleries, so first image from each gallery. Please help Thank you


title: count number of user comments with a specific comment meta value

text: I am using the code below to count the number of comments by a certain user:               global $wpdb;                  $count = $wpdb->get_var(               'SELECT COUNT( comment_id ) FROM '. $wpdb->comments .'               WHERE user_id = '.$user->ID.'               AND comment_approved = "1"               AND comment_type NOT IN ("pingback", "trackback" )'             );      I am in addition, using a comment meta field ('consider') which takes 0 or 1 as values. To get its value I use:               get_comment_meta($comment_id, 'consider',true);      How can I merge these two operations so that I get the number of comments submitted by the user and which have the meta value `'consider'` equal to `1`? I am not an SQL user and it seems that I need to use inside my SQL query the table `wp_commentmeta`? Your help is always appreciated.


title: Make Custom Taxonomy Category Use Parent Template

text: I have a Wordpress custom post type set up in my `functions.php` called "Research" I have a custom taxonomy called "Classifications" Under that taxonomy I have the terms/categories:               Old Research (parent)      --- sub cat 1      --- sub cat 2      I have created the file "taxonomy-Classifications-oldresearch.php" which successfully changes the parent layout for me. However, it does not hold the layout in the sub categories. The sub-category pages revert to another file `taxonomy-Classifications.php` I can alter it by also creating `taxonomy-Classifications- subcat1-oldresearch.php` but I will have a lot of sub categories that I want to use ONE template for - the parent cat template. This way I don't have to create a new template file for every new category.


title: Keep permalinks in Wordpress

text: Is there any way to set my permalinks to keep their exact link. If I have a post like this one http://blog.rigo.ro/?p=11, then I would like that every time I edit the post to keep this link. I have installed the Revision Control plugin and I set it to do not keep revisions. Any ideea how to do this? I want to keep this format of links. Edit: I took a look again, the permalinks keep their links, but every time I edit it adds a new version to the database and the next post will have a higher number. If I edit my current post for 3 times (blog.rigo.ro/?p=11) the next post will be blog.rigo.ro/?p=14. Now, my question is how can I keep all my post and edits clean, one post/more edits = one entry in the database, so if I have. 10 post on my site and I edit them, I would like that my permalinks to be from 1 to 10. PS: I don't want to edit my database manually, is there any plugin to do this?


title: APC object caching in combination Batcache/memcached page caching?

text: In the post WordPress Caching Comparisons Part 2 Matt Martz compares different caching setups, among them APC object caching together with Batcache page caching. In his post this combination seems to be the best tradeoff between setup complexity and efficiency. He doesn't mention memcached so I'm unsure if it's used or not. From reading Mark Jaquith's post APC Object Cache Backend for WordPress it seems to me that his plugin works as a drop-in replacement backend to be used in place of memcached which is what the Batcache installation instructions says to use. This is also how it has worked in my experiments with these plugins. I.e. either the APC or memcached backend is used, but not together and in combination. However, from watching Iliya Polihronov's High-performance WordPress video (and this is where I started when looking into caching) I got the impression that APC object cache can be used for opcode caching in combination with Batcache/memchached for full page caching, for even better results. (the batcache discussion is at the very end of the video) Is this possible and would there be of any benfit, or am I just confused? In my case I'm looking for the best solution for multiple virtual single- WordPress servers (i.e. not multisite) served by a single webserver (nginx). This runs on solid state media (Raspberry Pi/SD-card) so it would be preferable to keep cache in memory. I have full access to the system and have apc, memcache and memcached extensions installed. **edit:** From reading the Batcache source my understanding is that Batcache uses whatever is offered by `object-cache.php`, so it's either APC or memcached object cache as used exclusively by the respective backend plugins. Also, I found Matt's definition of bytecode, object and page caching at the end of his post enlightening.


title: Multisite/network--automatic self-registration, blog setup

text: I am creating a WordPress Network multisite blog in a university environment. It's set up in subdirectory mode, so that each new blog appears as a subdirectory off a common domain name. The Network authenticates against our corporate Active Directory using LDAP. Only Active Directory users may sign in. The first time a user signs in, our Active Directory plugin creates a WordPress account that corresponds to that user's Active Directory account. Each subsequent sign in, that account's properties are updated with the Active Directory account information. We expect to have hundreds, possibly thousands of blogs in the system. In the interest of reducing administrator time, I want this to be automated, either:   1. From time to time, we run a script that checks the WordPress network against our Active Directory and automatically creates or deletes blogs depending on whether the blog's name corresponds to an account in the Active Directory.   2. Users may self-register for their own blog, and the blog's URL is based off an attribute of their account that will be imported from the Active Directory. So far, my searches are not revealing canned ways of doing this. Are there existing modules that can help? Or am I looking at something custom?


title: Storing additional information about the user

text: I'm creating a recruitment website in wordpress and need a way to store details about the user such as previous experience and qualifications. I want the user to be able to edit this information as soon as they have registered an account (not on the registration page). I've looked at adding user profile fields but I want the information to be isolated from their profile information, in whatever way works. Can anyone recommend any plugins or ways for doing this. Also, when the user wants to edit this information - I do not want it to be displayed next to miscellaneous account details.


title: Form action doesn't work if slug isn't same as custom post title

text:
I'm facing the following situation, i've created an event-custom-post-type and display those with a single-event.php template. I've also implemented a signup-form in that template and all worked just fine. However, I've noticed that when the title gets changed of the event (and not the slug), submitting the form will result in a 404 (or in my case a notification that blog-post isn't found). The work-around would be to change the slug accordingly to the title, but i've noticed that that aswell doesn't always work, especially when they put multiple ... in a title for example. It's driving me nuts that i can't seem to figure out where I went wrong :( How one of you can show me in the right direction to get this solved :D This is the code of my custom post type               /**      * Flushes rewrite rules on plugin activation to ensure event posts don't 404      * http://codex.wordpress.org/Function_Reference/flush_rewrite_rules      */          function ep_eventposts_activation() {         ep_eventposts();         flush_rewrite_rules();     }          register_activation_hook( __FILE__, 'ep_eventposts_activation' );          function ep_eventposts() {              /**          * Enable the event custom post type          * http://codex.wordpress.org/Function_Reference/register_post_type          */              $labels = array(             'name' => __( 'Events', 'eventposttype' ),             'singular_name' => __( 'Event', 'eventposttype' ),             'add_new' => __( 'Add New Event', 'eventposttype' ),             'add_new_item' => __( 'Add New Event', 'eventposttype' ),             'edit_item' => __( 'Edit Event', 'eventposttype' ),             'new_item' => __( 'Add New Event', 'eventposttype' ),             'view_item' => __( 'View Event', 'eventposttype' ),             'search_items' => __( 'Search Events', 'eventposttype' ),             'not_found' => __( 'No events found', 'eventposttype' ),             'not_found_in_trash' => __( 'No events found in trash', 'eventposttype' ),             'parent' => __( 'kalender' ),         );              $args = array(             'labels' => $labels,             'public' => true,             'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ),             'capability_type' => 'post',             'rewrite' => array("slug" => "event"), // Permalinks format             'menu_position' => 5,             'menu_icon' => plugin_dir_url( __FILE__ ) . '/images/calendar-icon.gif',  // Icon Path             'has_archive' => true         );               register_post_type( 'event', $args );     }          add_action( 'init', 'ep_eventposts' );          /**      * Adds event post metaboxes for start time and end time      * http://codex.wordpress.org/Function_Reference/add_meta_box      *      * We want two time event metaboxes, one for the start time and one for the end time.      * Two avoid repeating code, we'll just pass the $identifier in a callback.      * If you wanted to add this to regular posts instead, just swap 'event' for 'post' in add_meta_box.      */          function ep_eventposts_metaboxes() {         add_meta_box( 'ept_event_date_start', 'Start Date and Time', 'ept_event_date', 'event', 'side', 'default', array( 'id' => '_start') );         add_meta_box( 'ept_event_date_end', 'End Date and Time', 'ept_event_date', 'event', 'side', 'default', array('id'=>'_end') );         add_meta_box( 'ept_event_location', 'Event Locatie', 'ept_event_location', 'event', 'side', 'default', array('id'=>'_location') );         add_meta_box( 'ept_event_price', 'Event Prijs', 'ept_event_price', 'event', 'side', 'default', array('id'=>'_price') );         add_meta_box( 'ept_event_page', 'Event Pagina', 'ept_event_page', 'event', 'side', 'default', array('id'=>'_page') );         add_meta_box( 'ept_event_full', 'Event Volzet', 'ept_event_full', 'event', 'side', 'default', array('id'=>'_full') );          }     add_action( 'admin_init', 'ep_eventposts_metaboxes' );          // Metabox HTML          function ept_event_date($post, $args) {         $metabox_id = $args['args']['id'];         global $post, $wp_locale;              // Use nonce for verification         wp_nonce_field( plugin_basename( __FILE__ ), 'ep_eventposts_nonce' );              $time_adj = current_time( 'timestamp' );         $month = get_post_meta( $post->ID, $metabox_id . '_month', true );              if ( empty( $month ) ) {             $month = gmdate( 'm', $time_adj );         }              $day = get_post_meta( $post->ID, $metabox_id . '_day', true );              if ( empty( $day ) ) {             $day = gmdate( 'd', $time_adj );         }              $year = get_post_meta( $post->ID, $metabox_id . '_year', true );              if ( empty( $year ) ) {             $year = gmdate( 'Y', $time_adj );         }              $hour = get_post_meta($post->ID, $metabox_id . '_hour', true);              if ( empty($hour) ) {             $hour = gmdate( 'H', $time_adj );         }              $min = get_post_meta($post->ID, $metabox_id . '_minute', true);              if ( empty($min) ) {             $min = '00';         }              $month_s = '<select name="' . $metabox_id . '_month">';         for ( $i = 1; $i < 13; $i = $i +1 ) {             $month_s .= "\t\t\t" . '<option value="' . zeroise( $i, 2 ) . '"';             if ( $i == $month )                 $month_s .= ' selected="selected"';             $month_s .= '>' . $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) . "</option>\n";         }         $month_s .= '</select>';              echo $month_s;         echo '<input type="text" name="' . $metabox_id . '_day" value="' . $day  . '" size="2" maxlength="2" />';         echo '<input type="text" name="' . $metabox_id . '_year" value="' . $year . '" size="4" maxlength="4" /> @ ';         echo '<input type="text" name="' . $metabox_id . '_hour" value="' . $hour . '" size="2" maxlength="2"/>:';         echo '<input type="text" name="' . $metabox_id . '_minute" value="' . $min . '" size="2" maxlength="2" />';          }          function ept_event_location() {         global $post;         // Use nonce for verification         wp_nonce_field( plugin_basename( __FILE__ ), 'ep_eventposts_nonce' );         // The metabox HTML         $event_location = get_post_meta( $post->ID, '_event_location', true );         echo 'Location:';         echo '<input type="text" name="_event_location" value="' . $event_location  . '" />';     }          function ept_event_price() {         global $post;         // Use nonce for verification         wp_nonce_field( plugin_basename( __FILE__ ), 'ep_eventposts_nonce' );         // The metabox HTML         $event_price = get_post_meta( $post->ID, '_event_price', true );         echo 'Price:';         echo '<input type="text" name="_event_price" value="' . $event_price  . '" />';     }          /* Prints the box content */     function ept_event_page( $post, $args ) {         global $post;         // Use nonce for verification         wp_nonce_field( plugin_basename( __FILE__ ), 'ep_eventposts_nonce');         // The Metabox HTML         $event_page = get_post_meta( $post->ID, '_event_page', true );         $dropdown_args = array(             'post_type'        => 'page',             'depth'            => -1,             'show_option_none' => '-----',             'name'             => '_event_page',             'sort_column'      => 'menu_order, post_title',             'selected'         => $event_page,             'echo'             => 1,         );              //Dropdown of pages         wp_dropdown_pages( $dropdown_args );     }          function ept_event_full() {         global $post;         // Use nonce for verification         wp_nonce_field( plugin_basename( __FILE__ ), 'ep_eventposts_nonce' );         // The metabox HTML         $event_full = get_post_meta( $post->ID, '_event_full', true );         echo 'Volzet: ';         if( $event_full ){ $checked = "checked=\"checked\""; }else{ $checked = "";}         echo '<input type="checkbox" name="_event_full" ' . $checked . ' />';     }          // Save the Metabox Data          function ep_eventposts_save_meta( $post_id, $post ) {              if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )             return;              if ( !isset( $_POST['ep_eventposts_nonce'] ) )             return;              if ( !wp_verify_nonce( $_POST['ep_eventposts_nonce'], plugin_basename( __FILE__ ) ) )             return;              // Is the user allowed to edit the post or page?         if ( !current_user_can( 'edit_post', $post->ID ) )             return;              // OK, we're authenticated: we need to find and save the data         // We'll put it into an array to make it easier to loop though              $metabox_ids = array( '_start', '_end' );              foreach ($metabox_ids as $key ) {                  $aa = $_POST[$key . '_year'];             $mm = $_POST[$key . '_month'];             $jj = $_POST[$key . '_day'];             $hh = $_POST[$key . '_hour'];             $mn = $_POST[$key . '_minute'];                  $aa = ($aa <= 0 ) ? date('Y') : $aa;             $mm = ($mm <= 0 ) ? date('n') : $mm;             $jj = sprintf('%02d',$jj);             $jj = ($jj > 31 ) ? 31 : $jj;             $jj = ($jj <= 0 ) ? date('j') : $jj;             $hh = sprintf('%02d',$hh);             $hh = ($hh > 23 ) ? 23 : $hh;             $mn = sprintf('%02d',$mn);             $mn = ($mn > 59 ) ? 59 : $mn;                  $events_meta[$key . '_year'] = $aa;             $events_meta[$key . '_month'] = $mm;             $events_meta[$key . '_day'] = $jj;             $events_meta[$key . '_hour'] = $hh;             $events_meta[$key . '_minute'] = $mn;             $events_meta[$key . '_eventtimestamp'] = $aa . $mm . $jj . $hh . $mn;              }                  // Save Locations Meta                   $events_meta['_event_location'] = $_POST['_event_location'];                     // Save Price Meta                   $events_meta['_event_price'] = $_POST['_event_price'];                  // Save Page Meta                   $events_meta['_event_page'] = $_POST['_event_page'];                   // Save Full Meta                   $events_meta['_event_full'] = $_POST['_event_full'];                   // Add values of $events_meta as custom fields              foreach ( $events_meta as $key => $value ) { // Cycle through the $events_meta array!             if ( $post->post_type == 'revision' ) return; // Don't store custom data twice             $value = implode( ',', (array)$value ); // If $value is an array, make it a CSV (unlikely)             if ( get_post_meta( $post->ID, $key, FALSE ) ) { // If the custom field already has a value                 update_post_meta( $post->ID, $key, $value );             } else { // If the custom field doesn't have a value                 add_post_meta( $post->ID, $key, $value );             }             if ( !$value ) delete_post_meta( $post->ID, $key ); // Delete if blank         }          }          add_action( 'save_post', 'ep_eventposts_save_meta', 1, 2 );          /**      * Helpers to display the date on the front end      */          // Get the Month Abbreviation          function eventposttype_get_the_month_abbr($month) {         global $wp_locale;         for ( $i = 1; $i < 13; $i = $i +1 ) {                     if ( $i == $month )                         $monthabbr = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );                     }         return $monthabbr;     }          // Display the date          function eventposttype_get_the_event_date() {         global $post;         $eventdate = '';         $month = get_post_meta($post->ID, '_month', true);         $eventdate = eventposttype_get_the_month_abbr($month);         $eventdate .= ' ' . get_post_meta($post->ID, '_day', true) . ',';         $eventdate .= ' ' . get_post_meta($post->ID, '_year', true);         $eventdate .= ' at ' . get_post_meta($post->ID, '_hour', true);         $eventdate .= ':' . get_post_meta($post->ID, '_minute', true);         echo $eventdate;     }          // Add custom CSS to style the metabox     add_action('admin_print_styles-post.php', 'ep_eventposts_css');     add_action('admin_print_styles-post-new.php', 'ep_eventposts_css');          function ep_eventposts_css() {         wp_enqueue_style('your-meta-box', plugin_dir_url( __FILE__ ) . '/event-post-metabox.css');     }          /**      * Customize Event Query using Post Meta      *       * @link http://www.billerickson.net/customize-the-wordpress-query/      * @param object $query data      *      */     function ep_event_query( $query ) {              // http://codex.wordpress.org/Function_Reference/current_time         $current_time = current_time('mysql');          list( $today_year, $today_month, $today_day, $hour, $minute, $second ) = split( '([^0-9])', $current_time );         $current_timestamp = $today_year . $today_month . $today_day . $hour . $minute;              global $wp_the_query;              if ( $wp_the_query === $query && !is_admin() && is_post_type_archive( 'event' ) ) {             $meta_query = array(                 array(                     'key' => '_start_eventtimestamp',                     'value' => $current_timestamp,                     'compare' => '>'                 )             );             $query->set( 'meta_query', $meta_query );             $query->set( 'orderby', 'meta_value_num' );             $query->set( 'meta_key', '_start_eventtimestamp' );             $query->set( 'order', 'ASC' );             $query->set( 'posts_per_page', '2' );         }          }          add_action( 'pre_get_posts', 'ep_event_query' );          ?>      And this is the code that displays the event and generates the form:               <?php            //response generation function       $response = "";            //function to generate response       function my_signup_form_generate_response($type, $message){              global $response;              if($type == "success") $response = "
{$message}
";         else $response = "
{$message}
";            }            //response messages     $not_human       = "Foutieve verificatie";     $missing_content = "Gelieve alles in te vullen.";     $email_invalid   = "Email is foutief.";     $message_unsent  = "Inschrijving niet doorgestuurd. Probeer opnieuw";     $message_sent    = "Bedankt! Uw inschrijving is doorgestuurd.";          //user posted variables     $firstname = $_POST['message_firstname'];     $lastname = $_POST['message_lastname'];     $persons = $_POST['message_persons'];     $email = $_POST['message_email'];     $phone = $_POST['message_phone'];     $human = $_POST['message_human'];     $price = $_POST['price'];     $event = $_POST['event'];     $date  = $_POST['date'];          $message = "Beste " . $firstname ."\r\n\r\n";     $message .= "We hebben uw inschrijving goed ontvangen en danken u voor het vertrouwen in onze diensten.\r\n";     $message .= "U ontvangt kort vóór de activiteit nog een herinneringsbericht en meer praktische informatie.\r\n\r\n";     $message .= "Vitale groeten,\r\n";     $message .= "Barbele\r\n\r\n";     $message .= "Details van uw inschrijving:\r\n";     $message .= "Naam: " . $firstname . " " . $lastname . "\r\n";     $message .= "Telefoon: " . $phone . "\r\n";     $message .= "Aantal personen: " . $persons . "\r\n\r\n";     $message .= "Activiteit: " . $event . "\r\n";     $message .= "Datum: " . $date . "\r\n";     $message .= "Inschrijvingsgeld: " . $price . "\r\n";          //php mailer variables     $to = get_option('admin_email');     $subject = "Inschrijving voor \"". $event . "\" (" . $date . ")";     $conf_subject = "Bevestiging inschrijving \"". $event . "\" (" . $date . ")";     $headers [] = "From: " . $firstname . " " . $lastname . " <" . $email . ">";     $headers [] = "Reply-To: " . $email;     $conf_headers[] = 'From: Mens Sana Health <info@menssanahealth.be>';     $conf_headers[] = 'Reply-To: info@menssanahealth.be';          if(!$human == 0){       if($human != 2) my_signup_form_generate_response("error", $not_human); //not human!       else {          //validate email         if(!filter_var($email, FILTER_VALIDATE_EMAIL))           my_signup_form_generate_response("error", $email_invalid);         else //email is valid         {           //validate presence of name and message           if(empty($name) || empty($phone)){             my_signup_form_generate_response("error", $missing_content);           }           else //ready to go!           {             $sent = wp_mail($to, $subject, strip_tags($message), $headers);             if($sent){               $sent_conf = wp_mail($email, $conf_subject, strip_tags($message),$conf_headers);               my_signup_form_generate_response("success", $message_sent); //message sent!             }             else my_signup_form_generate_response("error", $message_unsent);           }         }       }     }     else if ($_POST['submitted']) my_signup_form_generate_response("error", $missing_content);                    ?>     <?php get_header(); ?>

Kalender

                      <?php if ( have_posts() ) : while ( have_posts() ) :               the_post(); ?>
                       <?php              // Gets the event start month from the meta field             $month = get_post_meta( $post->ID, '_start_month', true );             // Gets the event start day             $day = get_post_meta( $post->ID, '_start_day', true );             // Gets the event start year             $year = get_post_meta( $post->ID, '_start_year', true );                  $start_hour = get_post_meta($post->ID, '_start_hour', true);             $start_minute = get_post_meta($post->ID, '_start_minute', true);             $end_hour = get_post_meta($post->ID, '_end_hour', true);;             $end_minute = get_post_meta($post->ID, '_end_minute', true);;                  $location = get_post_meta($post->ID, '_event_location', true);             $price = get_post_meta($post->ID, '_event_price', true);             $event_full = get_post_meta( $post->ID, '_event_full', true );                  $event_page = get_post_meta( $post->ID, '_event_page', true );                            ?>
<img src="<?php echo get_template_directory_uri(); ?>/images/date-arrow.png"/><?php echo $day . '.' . $month . '.' . $year; ?>

<?php the_title(); ?><?php if($event_full) : ?> (volzet)<?php endif; ?>
                       <?php the_content(); ?>                       <?php if($event_page != "") : ?>                       <a href="<?php echo get_permalink( $event_page ); ?>">Meer informatie

                       <?php endif; ?>                       <?php if($location != "") : ?>                       Waar: <?php echo $location; ?>
                       <?php endif; ?>                       Wanneer: <?php echo $start_hour . ':' . $start_minute . ' - ' . $end_hour . ':' .$end_minute; ?>
                       <?php if($price != "") : ?>                       Prijs: € <?php echo $price; ?>
                       <?php endif; ?>                       <?php if(!$event_full) : ?>
                       Inschrijven
                         <?php echo $response; ?>                         <form action="<?php the_permalink(); ?>" method="post">
Voornaam: *
<input type="text" name="message_firstname" value="<?php echo esc_attr($_POST['message_firstname']); ?>">
                             Familienaam: *
<input type="text" name="message_lastname" value="<?php echo esc_attr($_POST['message_lastname']); ?>">
                          Aantal personen: *
<input type="text" name="message_persons" value="<?php echo esc_attr($_POST['message_persons']); ?>">
                           Telefoon: *
<input type="text" name="message_phone" value="<?php echo esc_attr($_POST['message_phone']); ?>">
                           Email: *
<input type="text" name="message_email" value="<?php echo esc_attr($_POST['message_email']); ?>">
                           Verificatie: *
<input type="text" style="width: 60px;" name="message_human"> + 3 = 5
                           <input type="hidden" name="submitted" value="1">                           <input type="hidden" name="event" value="<?php the_title(); ?>">                           <input type="hidden" name="price" value="<?php echo $price; ?>">                           <input type="hidden" name="date" value="<?php echo $day . '/' . $month . '/' . $year; ?>">
<input type="submit">
                         </form>

                       <?php endif; ?>                       <?php if (get_adjacent_post(true, '', true) || get_adjacent_post(true, '', false)) : // if there are older posts ?>
<?php previous_post_link('%link', '< %title', TRUE); ?> <?php next_post_link('%link', '%title >', TRUE); ?>
                       <?php endif; ?>                       <?php $quote = get_post_meta(get_the_ID(), 'quote', true); ?>
                       <?php endwhile; else: ?>
                 <?php _e('Nog niets aanwezig.'); ?>
               <?php endif; ?>

     <?php get_footer(); ?>      Also, the permalink structure in the settings is /%category%/%postname%/ don't really think this is the issues as I get the same result when I set this to default. An example can be found on http://www.menssanahealth.be/kalender/ whitch lists all events And this is one of the posts where the title has been changed: http://www.menssanahealth.be/events/workshop-relaxatie-thuis-en-in-de-klas/ Thanks in advanced for any help!


title: Insert Ads "into" comments section in Genesis Themework

text: I am trying to insert two 125x125 ads into the comment section of a Genesis Child Theme - ![Where I would love 2 ads](http://i.stack.imgur.com/ASQbz.png) The screen above shows where I would want it but I am at a total loss on where to insert this overall. I have search for a code snippet for functions.php or even trying to figure which file (comments.php etc) to insert code into to make them show up. Any help would be great appreciated.


title: rewrite rules add a folder in the path

text: I have to do some url rewritting for custom post types.   I have 2 custom post types: _portfolios_ and _locations_. What I need to change is the url like this:               current: http://example.com/portfolios/user1/     Should change to: http://example.com/production/portfolios/user1/          current: http://example.com/locations/loc1/     should change to: http://example.com/production/locations/loc1/      How can I use `add_rewrite_rules`? Would it be better to use `generate_rewrite_rules`?


title: Serving HTTP and HTTPS from one installation

text: I've got a WordPress install that is serving up content via both HTTP and HTTPS. The site URL is configured as "http://www.example.com". This works for most situations - if a person requests a page at "https://www.example.com/page" the page is served up via HTTPS. However, the challenge that I'm facing is that there are a number of WordPress template functions which pull the site URL (like get_bloginfo('stylesheet') ) and when they do that, they include "http://" in the returned results. Similarly, images that are inserted in the WYSIWYG editor have the "http://www.example.com..." path hard coded. What I'd really like to do is find a way to define the base site URL as "//www.example.com", which would hopefully make everything work correctly. However, the WordPress admin fields won't support this. Does anyone have any ideas how to do this?


title: How to get role of user

text: I need to get the role associated with a user -- not the "currently logged in user". I am using Buddypress (not that should matter to the nature of this question) and I am in the `bp_members()` loop. How can I retrieve the role of the user I am reporting on in the loop at any given time? Thanks.


title: How to prevent tinyMCE editor to be loaded completely in Text Editor?

text: I'm working on a theme. Part of which there are editing modes:   * Syntax-new mode using CodeMirror   * the two native modes (Visual and Text editor)  I have an odd scenario that tinyMCE is loaded on text editor, so that means the buttons, etc. resembles like the Visual editor. Is there a WP hooks that I can use to prevent it from loading completely in the text editor?   I only need to use the native Text area without these tinyMCE functionality.


title: Wordpress vs Dot Net Nuke (DNN)

text: I am trying to piece together justification for our internal teams to use a CMS to maintain their knowledge base. It will be largely content driven and will need to achieve the following   1. Host Text Based Content (with large amounts of screenshots and rich formatting)    2. Display videos   3. Significant amount of searching   4. Integrate with Google Analytics   5. Taxonomies and classification (basic number - no extensive hierarchies)   6. Highly scalable (accessed by over 4000 users a day) I will not require user permissions (content authoring will be managed by a small group of people), no forum type posts or commenting or elaborate front page graphics. I have a fair amount of knowledge on WP but our organisation is a Microsoft shop and requires us to justify why a similar MS product cannot be used. I really don't know Dot Net Nuke (DNN) too well so does anyone have any thoughts around why I might or might not use DNN over WordPress?


title: wp_mail_from is ignored

text: I'm setting the specific "from" address using wp_mail_from. I've verified that it's actually called and I'm passing a legit me@domain.com email address. But by the time it hits /var/log/mail.log, the from address is "localaccount@my.hosting.server.com". In the wp_mail( ) call I'm even setting the headers 'From:....'. Doesn't matter, it's still ignored. I'm not sure this is a wp thing, but I've checked all my php settings and I'm not finding anything that would indicate that it forces the "from" of every email. For now I've used a generic map in postfix to convert the local account email address to a legit "from" address. But the problem is I need some emails in wordpress to be sent from one address and other emails sent from another. I have it setup in wp_mail_from to set the correct from address, only it's ignored completely somewhere along the way, just not sure what's doing me in. Ideas?


title: Repeatable custom meta select boxes

text:
I am working on meta fields for a custom post type storing match data. I have two sepearte meta boxes one which the team and the score are chosen and the values are submitted. The second takes that information and provides a series of select boxes in which players from the team in question are displayed. As there are several goals scored, several players are chosen (some more than once) I am working off a tutorial http://wp.tutsplus.com/tutorials/reusable-custom- meta-boxes-part-3-extra-fields/ and am modifying the code to use repeat select boxes. This is what I have come up with:               $goal_info_meta_fields = array(         'label' => 'Home Goals by:',         'desc' => 'List home scorers',         'id' => $prefix.'home-scorers',         'type' => 'home_player_list'     );          function show_goal_info_meta_box() {     global $goal_info_meta_fields, $post;               echo '<input type="hidden" name="goal_info_meta_box_nonce" value="'.wp_create_nonce(basename(__FILE__)).'" />';               echo '
';     foreach ($goal_info_meta_fields as $field) {              $meta = get_post_meta($post->ID, $field['id'], true);              echo '
             '.$field['label'].'	             ';         switch($field['type']) {                  // home_player_list         case 'home_player_list':             echo '+
';             $post_id = get_the_ID();             $team_id = get_post_meta( $post_id, 'report_home-select');                  $items = get_users( array (                     'meta_key' => 'team-meta',                     'meta_value' => $team_id                 ));             $i = 0;             if ($meta) {                 foreach($meta as $row) {                     echo '
|||';                     echo '<select name="'.$field['id'].'['.$i.']" class="chzn-select" style="width:200px;" id="report_home-scorers">                     <option value="">Select One</option>'; // Select One                     foreach($items as $item) {                         echo '<option value="'.$item->ID.'"',$meta == $item->ID ? ' selected="selected"' : '','>'.$item->display_name.'</option>';                     }                     echo '</select>-
';                          $i++;                 }             } else {                 echo '
|||';                 echo '<select name="'.$field['id'].'['.$i.']" class="chzn-select" style="width:200px;" id="'.$field['id'].'">                 <option value="">Select One</option>'; // Select One                      foreach ($items as $item) {                     echo '<option value="'.$item->ID.'"',$meta == $item->ID ? ' selected="selected"' : '','>'.$item->display_name.'</option>';                 }                      echo '</select>-
';                  }             echo '
'.$field['desc'].'';             break;                   } //end switch         echo '
';     } // end foreach     echo '
'; // end table      } It works perfectly if I use text imputs but not the select boxes and I think the problem is that `$meta == $item->ID ? ' selected="selected"' :` and currently `$meta = a:1:{i:0;s:3:"179";}` I've tried unserializing the array as well. The tutorial I've used has a github repository https://github.com/tammyhart/Reusable-Custom-WordPress-Meta-Boxes which I tried as well but I couldn't apply the repeatable example as the options are in a loop I can't use a foreach statement in an array. I would love some help with this as I've been tearing my hair out for the past two days.


title: Tax_Query using WP_Query not working

text:
I cannot get this query to work properly. It just renders one post even though I have three posts that are categories in the 'Firm News' and 'Test' categories. Can anyone see a problem with my code?               <?php                 $myquery = array(                     'post_type' => 'post',                     'tax_query' => array(                         'relation' => 'OR',                              array(                             'taxonomy' => 'category',                             'field' => 'slug',                             'terms' => array('test', 'firm-news'),                           )                          ),                     'posts_per_page' => 5,                      'orderby' => 'RAND',      );                                $m = new WP_Query( $myquery );                      if ( $m->have_posts() ) : $m->the_post();?>
<li <?php post_class();?>><a href="<?php the_permalink(); ?>"><?php the_title(); ?>

                  <?php endif; wp_reset_postdata(); ?>      Thanks Matt


title: How to allow potential clients to preview a theme

text: I have several themes installed in a Wordpress network. New clients will receive a network sub-site. I'd like them to be able to preview the available themes that are installed in Wordpress. There are a handful of plugins that claim to allow this to happen, but none of them have been updated in the last couple of years. Do such plugins not work in the recent versions of Wordpress? Is it possible to create some code myself which will achieve the same effect as a plugin? Thank you.


title: Making a class available via actions filters

text: I'm creating a plugin which displays a tabbed view. The way it currently works is when the user clicks a tab `class Loader` reads the `$_GET` parameter and creates an instance of the class specific to that tabs content. Now that I have this working, I want to be able to extend the functionality of this plugin to others. ie, I want another plugin to be able to create a new tab type. Each of my tab classes are derived from an abstract base though I can work around this using `if_method_exists()`. How can I make an instance or the name of a class available from a second plugin to my plugin? What I want to achieve is for my `Loader` class to have available a list of class names from which it can first populate the tabs then create the instance when that tab is selected.


title: When is the 'post_content_filtered' column in database cleared by WordPress?

text: Some WordPress plugins (although very few) use the `post_content_filtered` column in database to save some data related to a post. For example, Markdown on Save stores the markdown version of a post separately in the `post_content_formatted` column and the parsed HTML in the `post_content` column, so that when the plugin is deactivated the posts won't spew out Markdown (because HTML is stored in `post_content`). Now, I came to realize that `post_content_filtered` is pretty much used for temporary storage i.e. the content in the column is lost (or cleared) when:   * you make changes to a post (title, tags, categories, etc.) using the 'Quick Edit' option   * a scheduled post is (automatically) published   * you do bulk edits to posts   * you switch between revisions of a post   * a post is saved from an external editor (i.e. not the WordPress post editor) **Questions:**   1. In what other situations is the data in the `post_content_filtered` column cleared?   2. Is there a way to prevent this from happening at all? (I mean, is there a way to make sure that the data is stored permanently, the way the `post_content` column is treated?)


My WP site http://kyl.fi has stopped displaying anything else than Front Page when browsing the site with IE. The problem has been confirmed by several users with several versions of IE from 9-11. When accessing Front Page (i.e. kyl.fi/), everything works fine. But when trying to access any other page (e.g. kyl.fi/english/), user receives error " **Internet Explorer cannot display the webpage** ". Btw, IE has different type of error message for 404 and 500, so this is something else. The problem occurs only with IE. When browsing with other browsers such as Chrome and Firefox, everything is working fine. The site was working earlier without any problems with IE as well and I haven't made any changes to anything since that testing, except that WordPress was updated from 3.9 to 3.9.1. I have tried the basic fixes already, but without success:   * Clearing browser caches and refreshing   * Re-installing WP 3.9.1 (not manually though)   * Disabling WP plugins   * Testing with Twentyfourteen theme   * Updating permalinks   * Verifying .htaccess file is ok Some other tests I have made:   * Tried to access resources (e.g. images) in theme's directory with direct URI - working fine   * Changed IE's user-agent to Chrome - doesn't fix the problem   * Changed Chrome's user-agent to IE - problem does not occur   * Tried to access WP admin panel with IE - working fine   * Tried to access site's pages with non-rewritten URLs (e.g. kyl.fi/?p=1891) - doesn't fix the problem I'm running out of ideas what could cause this strange behavior. Any help would be highly appreciated!


title: Using wp_get_image_editor in a standalone script

text: With WP 3.5, they updated the image resizing scripts with `wp_get_image_editor`. Currently, in this standalone script that is accessed with Ajax, I have included `wp-load.php` so I can access all of the WP functions. Particularly, `$wpdb;`. In order to use the `$wpdb` functions, I had to declare `global $wpdb;` first. I assumed I had to do the same for `wp_get_image_editor`, but there is no global variable to declare. When using:               $image = wp_get_image_editor($current);          //if (!is_wp_error($image)) {         $image->resize(100, 100, false); }      nothing happens, and if I remove the `if` statement, I get the error > PHP Fatal error: Call to undefined method WP_Error::resize() Does anyone know how I can do this? Would it be smarter to install my own image-resizing scripts?


title: Featured Image URL is Showing but not thumbnail

text: I added posts from other CMS to my new word press site. For featured images I changed, `wp_post` table as               post ID: 2300      **Attachment in "wp_post":**               ID:3400     post_type: attachment     post_mime_type: images/jpeg     post_parent: 2300     post_title: file name     post_name: fileName-in-WP-Content-upload     post_status:inherit     guid: site.com/upload/oldImages/fileName-in-WP-Content-upload.jpg      **Making Featured image in "wp_postmeta"**               post_id:2300     meta_key: _thmubnail_id     meta_value: 3400      Now I am not seeing featured image in post however I can see the image url with               echo wp_get_attachment_url( get_post_thumbnail_id(3400) );


title: Using `auth_redirect` : keeps asking me to login even when I'm logged in

text: I am trying to use `auth_redirect` to automatically redirected not logged-in visitors when then visit a specific page. Here is the code I use:               add_action('template_redirect','wpse16975_check_if_logged_in');     function wpse16975_check_if_logged_in(){         $pageid = 29;         if(is_page($pageid)) auth_redirect();     }      The redirection works (I see the login page), but when I log in, I see the login page again. There is no way to access to the protected page because the browser keeps redirecting it to the login page. I saw this question and its answer from @chrisguitarguy and modify my code to this :               add_action('template_redirect','wpse16975_check_if_logged_in');     function wpse16975_check_if_logged_in(){         $pageid = 29;         if(!is_user_logged_in() && is_page($pageid)) {         $url = add_query_arg(             'redirect_to',             get_permalink($pageid),             site_url('wp-login.php')         );         wp_redirect($url);         exit;     }      This code solved my problem : a logged in user can now access to the page. The question is : why cannot simply use `auth_redirect` ?


title: Pagination for single custom post type page, using Posts 2 Posts plugin

text: Is it possible to add pagination to the single.php for a Custom Post Type, such as single-items.php. On this single page, I am using the Posts 2 Posts plugin (http://wordpress.org/plugins/posts-to-posts/) to get all connected custom post types that are connected to the Item custom post type. I would like to paginate these connected posts on this single page. How would I go about doing this? Thank you.


title: Metabox date month number to word

text: I use custom metabox with date (day, month and year). The problem is when I try to transform date number to date word - for example 10 to be October. I use this code:               function eventposttype_get_the_month_abbr($month) {     global $wp_locale;     for ( $i = 1; $i < 13; $i = $i +1 ) {                 if ( $i == $month )                     $monthabbr = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );                 }     return $monthabbr;     }      But now the month is displayed only with three symbols - Oct. I like to be full month name. Is there any way to define it? Thank you in advance!


title: incorrect path of plugin dir on network

text: I am using wordpress 3.5+ and I use it as network. I read that the plugins I upload are activated for all the sites on that network. So here is the issue. I uploaded a plugin say `XYZ`. It uploaded properly except for the activation part. Whenever I activate it, it gives out this warning-               Warning: fopen(/home4/koc01002/public_html/wordpress-content-folder/plugins/home4/koc01002/public_html/wordpress-content-folder/plugins/XYZ/abc.php) [function.fopen]: failed to open stream: No such file or directory in /home4/koc01002/public_html/wp-includes/functions.php on line 3508          Warning: fread(): supplied argument is not a valid stream resource in /home4/koc01002/public_html/wp-includes/functions.php on line 3511          Warning: fclose(): supplied argument is not a valid stream resource in /home4/koc01002/public_html/wp-includes/functions.php on line 3514      The path seems to get appended to the basepath. I dont get where is issue is. Can anyone help me with this?


title: How to make nested page structure?

text: For a project at work, we're needing to make support pages that reside at http://abc.com/support, and have each one of the pages be another wordpress page. So, for instance, /support/product1/troubleshooting and /support/product1/videos would be two different wordpress pages, and the maximum depth would be two levels, like /support/product1/troubleshooting/blank-screen. I came up with the method of making each permalink for a support page be the url that we want, but with slashes replaced with underscores, like support_product1_tutorial-videos... also, all of these pages will share a special template. Now I need to hijack the WP routing system to tell each one of these pages to send requests for http://abc.com/support/product1/troubleshooting to the appropriate page. Is there an easy method of doing this? Thanks.


title: Easiest way to display post archives in category-then-alphabetical order?

text: I've got a buddy who's trying to organize his recipe blog and would love to have an archive page that displays his recipes broken up by broad subject areas (read: categories) and then have the recipes listed alphabetically under each section (similar to this). Do I need to go the custom query route, or is there a better way, or, even easier, a plugin with shortcode support? (My Google Fu is failing me, as is my WP.org Fu as well. I _swear_ I've seen something like this before but I can't seem to find anything along these lines.)


title: Wordpress permalink, stop redirection

text: I'm having some hard-time with with WordPress permalinks. WordPress 3.1 seems to force url redirection, ex: This is the correct post url:               http://www.mysite.com/test/1/mypost.html      If I go to any of the url's below WordPress is redirecting me to the url above               http://www.mysite.com/test/1/mypost-teste21.html     or     http://www.mysite.com/test/1/blabla-mypost-example99.html      Basically, what I want to achieve is that WordPress matches the post id, in this case 1, and presents the post content without redirecting users to the correct url. Any ideas on how to achieve this ? Thank you all! PS- Please don't move this question to SO WordPress because I've already tried to get an answer there for a couple of days without luck.


title: Add column to pages table

text: Hey all i am trying to find the section within the edit.php page where it populates the table with all my current pages. What i want to do is add another colum to the table in order to launch a side page for changing a picture. ![enter image description here](http://i.stack.imgur.com/YAcgz.jpg) Could anyone point me to the code that populates the table? Thanks! David


title: Why AJAX response 0!

text:
It is irritating me why AJAX response is 0 !. I want to check whether the email address is valid or invalid on blur.Please suggest me here is my code This is my php code                add_action('wp_ajax_send_message_to_customer','add_send_msg');?>     <form>         <input type="text" name="email_customer"  id="email_customer"/>     </form>

     <?php     function add_send_msg(){         $email = isset($_POST['email_customer']) ? $_POST['email_customer'] : null;          if( $email ){             if(is_email($email)){             $msg = 'valid';             }         }         echo $msg;         die();     }      Adding js and localize script                   add_action( 'init', 'my_script_enqueuer' );          function my_script_enqueuer() {        wp_enqueue_script( "send_email", path_join(WP_PLUGIN_URL,basename(dirname(__FILE__)).'/send_email.js', array('jquery')));        wp_localize_script( 'send_email', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));             }      and js file send_email.js               jQuery(document).ready(function () {         jQuery("input[name='email_customer']").blur(function (){             dataString = "email_customer="+jQuery(this).attr("value")+"&action=send_message_to_customer";                       jQuery.ajax({                 type: "POST",                 data: "email_customer="+jQuery(this).attr("value")+"&action=send_message_to_customer",                 url: myAjax.ajaxurl,                 beforeSend: function(){                     jQuery("#email_info").html("Checking Email......");                 },                           success: function(data) {                     alert(data);                     if( data == 'valid'){                     jQuery("#email_info").html("Email Ok");                      }                 else{                     jQuery("#email_info").html("You have entered invalid email");                      }                  }                  });         });     });


title: Limit access to page depending on user level

text: I've been asked to build a WordPress that limits access to posts with a particular custom post type based on the logged in users level. There will be a number of pre made user roles and they would like to choose which levels can view each post when the post is written. What is the best way to do this?


title: Having an issue doing a WP_Query with post_content and category__and

text: This is the array for my arguments for the WP_Query.               Array     (         [showposts] => 4         [paged] => 1         [post_type] => post         [post_content] => tree         [category__and] => Array             (                 [0] => 6                 [1] => 15                 [2] => 28             )          )      I want to return the posts where they are in the categories 6, 15, 28 and where the post_content has the word tree. My problem is that I'm returning several duplicated results for the posts that have the word tree in it. Ideally I would like to return one. anyone have any idea how I can fix or improve this?


title: how i can hide some category from author admin panel?

text:
i want author can not see some category from author admin panel but administrator can see that.how i can hide some category?my site http://techjagot.com .. here show some function.php code               <?php          // Theme Settings Page     require_once(TEMPLATEPATH . "/theme-settings.php");          // Theme Styles     require_once(TEMPLATEPATH . "/theme-styles.php");          // Theme Widgets     require_once(TEMPLATEPATH . "/theme-widgets.php");          // Load Custom Post Options for Write Post and Write Page     require_once(TEMPLATEPATH . "/theme-metaboxes.php");          // Load Theme Javascript     require_once(TEMPLATEPATH . "/theme-js.php");          // Theme Image Functions     require_once(TEMPLATEPATH . "/theme-images.php");          // Register widgetized areas     function theme_widgets_init() {         register_sidebar(array (             'name'=>'Sidebar-Wide - Top',             'id'=>'widget-1',             'before_widget' => '

',             'after_widget' => '

',             'before_title' => '
',             'after_title' => '
',             ));         register_sidebar(array (             'name'=>'Sidebar-Wide - Bottom Left',             'id'=>'widget-2',             'before_widget' => '

',             'after_widget' => '

',             'before_title' => '
',             'after_title' => '
',             ));         register_sidebar(array (             'name'=>'Sidebar-Wide - Bottom Right',             'id'=>'widget-3',             'before_widget' => '

',             'after_widget' => '

',             'before_title' => '
',             'after_title' => '
',             ));         register_sidebar(array (             'name'=>'Sidebar-Narrow',             'id'=>'widget-4',             'before_widget' => '

',             'after_widget' => '

',             'before_title' => '
',             'after_title' => '
',             ));         register_sidebar(array (             'name'=>'Footer Widget 1',             'id'=>'widget-5',             'before_widget' => '

',             'after_widget' => '

',             'before_title' => '
',             'after_title' => '
',         ));


title: How do I display a WP Option from an array?

text:
I have a problem displaying the data that I am successfully saving to my database.               function create_input_twitter_option() {         $options = get_option('global_options_arraykey');         ?><input type="text" name="global_options_arraykey[twitterid]" value="<?php echo $options['twitterid']; ?>" /><?php     }      This is what I am putting in my template:
<a href="<?php echo get_option("twitterid");?>">Visit our twitter Account
      However I am not getting the href value that I see in the database.


title: List the categories under custom taxonomy

text:
I have a problem here, I registered a custom post type and I named it 'recipe' then I created a custom taxonomy under the post type, I named it 'recipe category'. Now I want to display the of categories under that custom taxonomy, but unfortunately I have no luck. I tried this code               <?php          $taxonomy = 'recipecategory';     $tax_terms = get_terms($taxonomy);     ?>
     <?php     foreach ($tax_terms as $tax_term) {     echo '
' . 'name ) . '" ' . '>' . $tax_term->name.'
';     }     ?>
      but it displays nothing, what's wrong with my code? did I missed something. Almost forgot to mention, I am using the plugin Custom Post Type UI


title: WooCommerce checkout gateway creating redirect loop

text: I have set up PayPal as my payment gateway for WooCommerce, do not have an SSL certificate, and am **not** forcing SSL. Checkout and payment are set to go to the checkout page. When I try to test the checkout button, it gives me a redirect loop error. How do I fix this? Thanks in advance.


title: post in a lightbox?

text:
Ive installed "lightbox plus colorbox" plugin and im trying to call the latest post from the CPT notices. the notices have post expiration so essentially im looking to display the latest alert on the homepage. What ive'e learned from google so far:               <?php         $hotfoodpresent = get_posts( array('post_type' => 'st_notice', 'posts_per_page' =>-1) );         if($hotfoodpresent) echo '

           <?php if (have_posts()): while (have_posts()):the_post();         wp_redirect(get_permalink());              endwhile;      endif; ?>

'; ?>      But I think im going about this the wrong way as I don't see anything in the pop-up. I would not like to use plugins as this wordpress installation will remain on a local network without internet access. Thankyou in advance for the help if you can! Revision 2

      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>          <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?>
         <?php the_content(); ?>

          <?php  endwhile; ?>      <?php  endif; ?>      Revision 3

             <?php             $args = array(               'posts_per_page' => 1,               'post_type' => 'st_notice'                          );            query_posts($args);                 if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_title(); ?>
         <?php the_content(); ?>         <a href="<?php the_permalink(); ?>">
Please click here for further information

          <?php  endwhile; ?>      <?php  endif; ?>


title: Filtering 'the_title' with option to return subhead?

text: ### Problem: The WordPress iPhone app (and other WordPress-related smartphone apps) do not allow for much other than the Title and Body fields (i.e. no access to custom fields). ### Goal: My current project requires that we give our mobile bloggers the option to include a subhead with their mobile (and desktop) posts. ### Solution: I'd like to use an optional delimiter in the title. Example: > Main headline | Secondary headline Screen shot: ![enter image description here](http://i.stack.imgur.com/OA2ja.png) Where the `|` is the delimiter that separates main title: > Main headline ... from the subheadline: > Secondary headline ### Code requirements: **All** built-in, and plugin, code that use "title"-getting WP methods should always return the half before the delimiter (using example from above): > Main headline In other words, **by default** , **no** title-getting functions will ever return: > | Secondary headline ### My code so far: The code immediately below is a simple starting point. As you can see, I'm filtering `the_title` and removing: > | Secondary headline               /**      * Head/deck handling.      *      * Unaltered title (no quotes): "Main headline | Secondary headline"      *      * @see http://stackoverflow.com/a/16279114/922323      * @see http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/post-template.php#L118      * @see http://wordpress.stackexchange.com/questions/45589/      */          function foo_the_title($title, $id) {              return trim(current(explode('|', $title))); // Returns: "Main headline".          }          add_filter('the_title', 'foo_the_title', 10, 2);      By doing the above, I avoid having to worry about any other functions spitting out the delimiter (and the stuff following it), right? I'm assuming all "title"-getting functions/methods will be affected by the filter `the_title`? Maybe I'm missing a corner case here? **UPDATE: I found a corner case:wp_title() ... Makes me wonder what else is out there?** ### Question(s): Heres where I'm stuck. How can I write a custom function (or filter/other) that will return the second half of the title? I was playing with this:               function foo_the_subheadline() {              return apply_filters('the_title', '  My Custom Title (tm)  | after the stuff    ');          }      Obviously, that's not doing anything useful (I need the ability to manipulate the code/`$title` variable in `foo_the_title()`). For example, what I'd really like to do is something like this (pseudo code follows, **do not use in real world** ):               function foo_the_title($title, $id, $part = 'current') {              return trim($part(explode('|', $title)));          }          add_filter('the_title', 'foo_the_title', 10, 3);          function foo_get_me_the_subheadline() {              foo_the_title(pass the title here, pass the id?, 'end'); // Using variable function: http://php.net/manual/en/functions.variable-functions.php          }      ### Conclusion: Well, honestly, I'm hoping ya'll can help me find a conclusion. :) * * * # UPDATE (2013/05/14): See my answer below. **Thoughts:**   * Could the fundamental logic be improved?   * Are there any alternative approaches that could work better?


title: navigation among single posts

text: In the twentyeleven theme each single post page has two navigation links which point to previous and next post, irrespective of the search made by the user. That is, the next post is the successive post in chronological order as it appear in the main blog page even if the user has opened the single post page from a category or tag page, and so such next post could be of another category and tag. Is there any theme/plugin or something else that makes the previous/next post links consistent with the page the user come from?


title: Wordpress Plugin Admin Tab

text: I'm not sure on the terminology because a Google search isn't really sending me in the right direction. I currently have a WordPress Plugin which is inside the settings tab. I would like to have my own tab which has 3 subsections underneath it. I've tried looking at these:               add_action('admin_menu', 'jobboard_admin_actions');     function jobboard_admin_actions() {     add_options_page('JobBoard', 'JobBoard', 'manage_options', __FILE__, 'JobBoard_admin');     }      But I'm still stuck. Thanks, Changes :               add_action('admin_menu', 'jobboard_admin_actions');     function jobboard_admin_actions() {     add_menu_page('JobBoard', 'JobBoard', 'manage_options', JobBoard_admin,  'JobBoard_admin', '');     add_submenu_page( 'JobBoard_admin', 'JobBoard', 'JobBoard', 'manage_options',    'JobBoard_admin', 'JobBoard_admin_delete' );           }


title: Insert Message before content of after title

text: How can I insert custom message after post title. For example               ## The Post Title                My custom message


title: 4 posts per page from single category

text:
I've been trying to display posts that I've categorized as "news-categories". My goal is to only display 4 posts on sidebar of "cbs-news" slug underneath "news-categories" category. By below mention code all the post underneath "cbs-news" are displaying. But i need to display only 4 latest post.
         <?php                  $args = array('tax_query' => array( array('taxonomy' => 'news-categories', 'posts_per_page' => '5', 'field' => 'slug','terms' => 'cbs-news',                 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 )                 )));                 $the_query = new WP_Query( $args );                 if($the_query->have_posts() ) :                  //have_posts("showposts=4");                 while ( $the_query->have_posts() ) : $the_query->the_post();                 ?>
                <a href="<?php echo get_permalink(); ?>"><?php the_title(); ?>
              <?php endwhile; else: ?>
Nothing Here.
              <?php endif; wp_reset_postdata(); ?>


title: Get single object term for custom taxonomy

text:
I am trying to get the custom taxonomy term for a single custom post type and seem to be falling flat. I thought the most obvious answer was to use `single_term_title()` but have tried just about every term related Wordpress function I could find in the codex but most of them seem to return arrays and I only want the term title for `single-match.php` Here is what I thought would work.               <?php $matchtype = single_term_title("", false); ?>
<?php echo  $matchtype->slug . ' match' ?>


title: Can I install/embed Wordpress on a 'single page'?

text: I'm building a website from scratch (PHP, jQuery) and want to have full control over the design, implementation, etc. I want to install Wordpress so that when you go to a certain section of the site, the blog link in the menu bar, it takes you to root/blog/ but I don't want to have to use a template and design the rest of the site around it.   Obviously, I don't want the blog pages' design to be uniform with the rest of the site. Surely this is possible right? If not, then I'll settle for suggestions on a different, more appropriate technology but I think this should be possible. Edit:   Is there is a way to set it up so that the user would use the wordpress.com site for admin and I simply integrate it with a PHP API. That would be fine also


title: How to find out if page_for_posts is showing (in order to style menu item)

text:
I have set a static page for posts (page id = 110). This page shold only be included in the menu when the user is logged in. The latter is achieved with the following addition to `header.php` (snippet from inside the `menu <ul>` tag).               <?php wp_list_pages('sort_column=ID&exclude=100,110,145&title_li='); ?>             <?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink(110); ?>">Title
             <?php } else { ?>                  <?php } ?>      I'm using `freshy2` and have customized the CSS so that the link for the current page in the header navigation menu has another background colour from the rest (standard procedure...). However, as page with ID 110 is the static posts page, I cannot find a solution to do the same for this page. This is because `is_page(110)` returns `false` as it recognizes the current post type to be `is_single()` and when I query for post ID, the ID for the latest post is returned. I obviously can't use the latter for querying the current display as it changes all the time. Here is what I have at the moment. This kind of works, but only halfway through as now the background colour is _always_ the special colour, even if the posts page is not the current "item" on display.               <?php if ( is_user_logged_in() ) { ?>                 <li <?php                     if (get_option('page_for_posts'))                     {                          echo " class=\"page_item page-item-110 current_page_item\"";                     }                     else                     {          global $wp_query;         $thePostID = $wp_query->post->ID;                         echo " class=\"" . $thePostID . "\"";                     }                 ?>><a href="<?php echo get_permalink(110); ?>">Title
             <?php } else { ?>                  <?php } ?>      Any ideas? Thanks a lot in advance! **EDIT:** This code, as suggested below, does the trick (I simply added the missing values from the original `wp_list_pages`):                       <?php if(!is_user_logged_in())     {     $args = array(     'exclude' => '100,110,145',     'sort column' => 'ID',     'title_li' => ''      );     }     else     {     $args = array(     'exclude' => '100,145',     'sort column' => 'ID',     'title_li' => ''      );     }          wp_list_pages( $args );     ?>


title: how to remove mandatory required fields in buddypress registration

text: i have installed buddypress 1.5.1, wp 3.2.1. the registration field shows 5 mandatory fields to be filled, i need to limit this to 3, my site needs username, email, password( just like in tumblr ), how to remove these mandatory registration fields in buddypress registration. Is their any snippet/plugin to accomplish that


title: Add more rows on media picker

text: I'm trying to add more rows in the media picker modal window. Is there any clean way to achieve doing this ? Thanks !


title: How to check via conditional tags for a single plugin page?

text: I am developing a plugin. To embed the stylesheet I used `wp_enqueue_style()`. I want the CSS file to be only implemented at the plugin's page. I have already seen solutions with conditional tags, but neither `is_page()` nor `is_admin()` are fitting my request. I am able to implement the stylesheet only in the backend, but it is possible to implement it only on the plugin's page?


title: Is there a limit to the number of items that can be added using the Appearance Menus Screen?

text: I can add up to 17 items to my Menu. As soon as I add one more item by clicking the checkbox for the page that I want to add in the Pages box in the left hand column and save the menu, the item that is last in the list drops off. The Appearance Menus Screen page in the Wordpress codex makes no mention of this limit. I am using a child theme of the Thematic theme; but I have had this problem before with other themes too. If there is a limit, is there anything that I can do to override this?


title: Call to require('../../../wp-blog-header.php') results in 404 error?

text: I've got a button in theme options that calls a file called color.php, (the contents of which are below). On certain installations of the theme, the script is generating a 404 error and failing unless I take out everything above the //do something line. Any suggestions on what might be causing it?               <?php     require('../../../wp-blog-header.php');          if (!is_user_logged_in()){         die("You Must Be Logged In to Access This");     }     if( ! current_user_can('edit_files')) {         die("Oops sorry you are not authorized to do this");     }      //do something      ?>


title: How to query blogs posts of WordPress sub domain?

text: I am using WordPress 3.2.1 multi-user. I need to show posts from a specific sub domain in my home page, for example: http://mysite.com/sub-blog. I need to show posts from sub-blog in my home page. Is their any special code to query from a specific blog?


title: Best way to have an per-user customized private section

text: A common requirement for business sites is to have a client login which allow visitors to access private content for them (ie: downloads, screenshots, documents). I did it in the past and although it worked, I think is a bit messy. Now I need the same functionality in a new site, and want to know if anyone did it and want to share a nice way to achieve this. My method was something like:   1. Create a custom post type for the private content   2. Create a custom taxonomy for Clients   3. Hook `user_register` and add a Client (taxonomy) every time a new user is created   4. Hook `template_redirect` and check if it's a single of my custom post type. If it is, check if the logged_in user is in the custom taxonomy for that post. If it is, cool. If not, `header('HTTP/1.1 401 Unauthorized');exit;` Any comments?


title: Is there a way to create a template that does not have the site styling associated with it?

text: I recently completed a WP site for a client and they would like to be able have some static pages added to the site that do not have the header, footer and navigation on it. These pages would then be brought in to various other sites using an iFrame. Being fairly new to WP, I am not exactly sure how to make this happen, but I am thinking that if I create a page template that does not include header.php and footer.php, I may be going in the right direction. Is this correct? What recommendations are there for doing something like this? Thanks.


title: Setting post thumbnail sizes in template file and functions.php

text: For my post I have a box for the post image and the size of the box is 214 x 73. I want the image to fit the width of the box and have it cropped at 73px height. This is what I have so far in my functions.php file               <?php add_theme_support( 'post-thumbnails'); set_post_thumbnail_size();                if ( function_exists( 'add_image_size' ) ) {          add_image_size( 'post-thumb', 214, 73 );         }?>      and this is what I have in my content.php file: `<?php the_post_thumbnail('post-thumb'); ?>` What am I doing right/wrong and what do I need to fix to make it work? Also is it possible to make the image centered horizontally when it crops it so that you see the middle of the image? You can check out my theme here: http://benlevywebdesign.com/wordpress/ to see the post thumbnail box


title: Adding more information to a Content Product Category

text:
The template **content_product_cat** is responsible for showing the product categories images and its name. I want to display more information below the name of a category e.g a Category called 'Books', I want to show 'Find all health related book here' below that category and vice versa
"Books"

Find all health related book here
      How can i do that? There is only option for 'Short Description' for products,which can be displayed via                 `echo apply_filters( 'woocommerce_short_description', $post->post_excerpt );`      but i want to show the text for each category. There is no place to enter a description under WordPress admin for woocommerce plugin.