title: Custom Search, MySql Query Gone Wrong?

text: I'm having a bit of a brain fart on this one. I'm working on some code that resembles a custom search form. The custom search form, is a mixture of checkboxes as well as some drop downs. All of the fields which are being searched for are also custom fields. The custom fields were entered through a custom write panel. Some of the fields are single values others are serialized fields. The current code works, but i'm not sure if should be taking another approach, i'm not looking for anyone to write code for me. I'm just looking for some ideas on how this could be better.               $city = $_REQUEST['sCity'];     $activity = $_REQUEST['sActivity'][0];     $riverSegment = $_REQUEST['sRiverSegment'];     $topicOfInterest = $_REQUEST['sTopicOfInterest'][0];          $querystr = "     SELECT DISTINCT wp_posts.* FROM wp_posts, wp_postmeta     WHERE (      wp_posts.ID = wp_postmeta.post_id      AND wp_postmeta.meta_key = 'city'      AND wp_postmeta.meta_value = '$city'     ) OR (      wp_posts.ID = wp_postmeta.post_id      AND wp_postmeta.meta_key = 'riverSegment'      AND wp_postmeta.meta_value = '$riverSegment'     ) OR (      wp_posts.ID = wp_postmeta.post_id      AND wp_postmeta.meta_key = 'topicOfInterest'      AND wp_postmeta.meta_value LIKE '%$topicOfInterest%'     ) OR (      wp_posts.ID = wp_postmeta.post_id      AND wp_postmeta.meta_key = 'activity'      AND wp_postmeta.meta_value LIKE '%$activity%'     ) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'sites'     ORDER BY wp_posts.post_date DESC";      I feel like the above sample is flawed because if the first condition finds a match it will ignore the rest of the conditions. **Side Note:** If i'm working with $wpdb->get_results(); should i still be escaping the user input to keep it clean?


title: how to setup content on a static frontpage with css and xhtml

text: I'm currently working on a website that has a static frontpage and couple of pages that is going to contain portfolio and things alike on the other pages. The thing I want to do is to hardcode content on the frontpage in css and xhtml. Is this possible and where do I do this? I thought it should be done in **index.php** in between:               "<?php get_header(); ?>" and "<?php get_footer(); ?>"      calling the content with if and else statement on: is_front_page()


title: WP_Query Pagination

text:
I am having problems with `pagination` on `category` page that lists posts only within a certain category. Here is my code: What happens is the `Next` link takes to `/page/2` but the content stays the same.               <?php         $id = get_cat_id($current_category);         $my_query = new WP_Query('cat='. $id .'&showposts=2');         while ($my_query->have_posts()) : $my_query->the_post();     ?>         <?php the_content( __( 'Continue reading →', 'themename' ) ); ?>          <?php endif; ?>     <?php endwhile; ?>          <?php if (  $my_query->max_num_pages > 1 ) : ?>
<?php previous_posts_link( __( ' Previous ', 'themename' ) ); ?>

<?php next_posts_link( __( 'Next ', 'themename' ) ); ?>
              <?php endif; ?>


title: Get the ID of the direct parent page

text: I've seen plenty of tutorials on how to get the ID of the upper-most parent, but I can't seem to find anything on how to get the ID from the direct parent. Eg;               - Big John       - Little John         - Baby John      How, if I'm on the Baby John page, can I get the ID of Little John and not of Big John?


title: Duplicate sidebar with duplicate post plugin

text: I'm using http://wordpress.org/plugins/duplicate-post/ and http://wordpress.org/plugins/per-page-widgets/ . The duplicate-post plugin doesn't copy all the settings from the page-widgets plugin. I try to do this with a hook for the duplicate post plugin.                 var_dump($sidebars_widgets);            ...       'i123_widgets_homepage-promoted-items_974' =>          array           0 => string 'categories-3' (length=12)           1 => string 'archives-5' (length=10)       ...      I need a copy of the sidebar with the same settings but new ID's like:               'i123_widgets_homepage-promoted-items_975' =>          array           0 => string 'categories-4' (length=12)           1 => string 'archives-6' (length=10)      The code I now have is this:               function copy_widgets($new_post_id, $old_post_object){              global $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets;              foreach($sidebars_widgets as $key => $value) {             if (preg_match('/^i123_widgets_(.+)_([0-9]{1,})$/', $key, $matches)) {                      $sidebarType = $matches[1];                 $oldPostID = $matches[2];                      if($oldPostID == $old_post_object->ID){                          $old_sidebar_id = 'i123_widgets_' . $sidebarType . '_' . $old_post_object->ID;                     if ($sidebar = $sidebars_widgets[$old_sidebar_id]) {                         $sidebars_widgets['i123_widgets_' . $sidebarType . '_' . $new_post_id] = $sidebar;                     }                      }                  }         }              if (!isset( $sidebars_widgets['array_version']))             $sidebars_widgets['array_version'] = 3;         update_option('sidebars_widgets', $sidebars_widgets);              /*              TODO copy settings from widget                   'i123_widgets_homepage-promoted-items_975' =>                  array                   0 => string 'categories-3' (length=12)                   1 => string 'archives-5' (length=10)         */          }          add_action('dp_duplicate_post', 'copy_widgets', $priority, 2);


title: External link not showing on post but showing on comment

text: Why is this? For example, if I input this in a post: `<a href="http://i2.wearecdn.net/images/2012/11/47/article/vans/so6099412/vans- authentic-schuhe-bright-green-black-1755-zoom-0.jpg">This image here</a>` It outputs a part of the link, instead of making "This image here" a link. So it will look like this: `http://i2.wearecdn.net/images/2012/11/47/article/vans/so6099412/vans- authentic-schuhe-bright-green-black-1755-zoom-0.jpg">This here` If I output the same in the **comment** beneath the same post, it shows it correctly. Is there a workaround for this problem? If yes, can someone help me out please? I would love that.


title: Customize Search to only search current custom post type

text: I have 3 custom post types and want the search widget to only search the custom post type it's currently on. ie. If viewing cpt_1 (single or archive) and someone uses the search widget in the sidebar it should only return results of cpt_1. Similarly viewing cpt_2 and searching should only return cpt_2 results. I tried this:               <?php     // functions.php      function search_cpt1( $query ) {         if ( $query->is_search ) {             $query->set( 'post_type', array( 'cpt1' ) );         }         return $query;     }             function search_cpt2( $query ) {         if ( $query->is_search ) {             $query->set( 'post_type', array( 'cpt2' ) );         }         return $query;     }             if ( 'cpt1' == get_post_type() ) {         add_filter( 'pre_get_posts', 'search_cpt1' );     }          if ( 'cpt2' == get_post_type() ) {         add_filter( 'pre_get_posts', 'search_cpt2' );     }          ?>      I've also tried this way without success:               <?php     function jc_search_cpts( $query ) {         if (('cpt1' == get_post_type()) && ( $query->is_search )) {                 $query->set( 'post_type', array( 'cpt1' ));         }         if (('cpt2' == get_post_type()) && ( $query->is_search )) {                 $query->set( 'post_type', array( 'cpt2' ));         }         return $query;     }     add_filter( 'pre_get_posts', 'jc_search_cpts' );


title: WP_Query ordered by custom field that is a date string?

text: Each of my posts have a single custom field that is a string of a date (not the date of the post). Instead of my theme's current query, which orders by published date, I want to order by this custom field date. How can I change this query (the theme's query) to instead use my custom field (a string representation of a date)?               $timeline_query = new WP_Query(array(          'post_type' => 'post',          'orderby' => 'date',          'order' => 'DESC',          'posts_per_page' => -1      ));


title: Very slow query

text: This query works, but it takes upwards of 20 seconds to run on a Quad Core dedicated server... How can I optimize this?               $slides=get_posts(         array('post_type' => 'any', 'numberposts' => 5, 'orderby' => 'date', 'order' => 'desc', "tax_query" =>             array(                     "relation" => "OR",                      array(                         "field" => "id",                         "terms" => array(36),                         "taxonomy" => "category",                         "operator" => "IN"                     ),                     array(                         "field" => "id",                         "terms" => array(36),                         "taxonomy" => "music-categories",                         "operator" => "IN"                     ),                     array(                         "field" => "id",                         "terms" => array(36),                         "taxonomy" => "video-categories",                         "operator" => "IN"                     ),                     array(                         "field" => "id",                         "terms" => array(36),                         "taxonomy" => "mixtape-categories",                         "operator" => "IN"                 )                 )             )     );


title: Error on Rss Feed for my blog

text: I searched on this website but didnt get any proper solution for my problem. I got this website : http://www.droidacid.com/feed/ I am not able to get the Rss feed or xml file of my website. Actually I need to develop an Android application for my website and need my xml link for the same. Hope to receive some answers soon or link to a similar problem(I searched but did not get similar problem). Thanks


title: WP_User_Query Custom Field meta_query with Date clause

text: I have a custom meta field 'bhaa_runner_dateofrenewal' which records the date that a User on my system last renewed their membership, the field format is YYYY-MM-DD. I'm trying to write a custom query which will query and order the list of returned users by year. I came across this custom-field-multiple-clauses post which outlines how the 'date()' function can be used in the value field               $args = array(         'posts_per_page' => 100,         'post_type' => 'create_events',         'meta_query' => array(                 'relation' => 'AND',                 array(                     'key' => 'startDate',                     'value' => date('Y-m-d'),                     'compare' => '>='                 ),                 array(                     'key' => 'endDate',                     'value' => date('Y-m-d'),                     'compare' => '<='                 ),         'orderby'  => 'meta_value',          'meta_key' => 'startDate',         'order' => 'DESC'         )     );     $custom_query = new WP_Query( $args );      My custom query looks like this at the moment but it is using a String LIKE comparison of the 'bhaa_runner_dateofrenewal' field value.               $usersByCompanyArgs = new WP_User_Query(         array(             'fields' => 'all_with_meta',             'orderby' => 'bhaa_runner_dateofrenewal',             'order' => 'DESC',             'meta_query' => array(                 array(                     'key' => 'bhaa_runner_company',                     'value' => $this->houseid,                     'compare' => '='),                 array(                     'key' => 'bhaa_runner_dateofrenewal',                     'value' => '2014',                     'compare' => 'LIKE')             )         )     );      Does anybody know how i might update the clause to that i can treat the field as a real date, and use the custom MYSQL YEAR() function here?


title: Easy Digital Download Sub category

text:
I'm curretnly developing my web store using the Easy digital downalod plugin. Now my problem is that i'd like to show only the list of a subcategory and i can't seem to find a way to do so. I ran across a this snippet from sumobi:               <?php     /**      * Output a list of EDD's terms (with links) from the 'download_category' taxonomy     */     function sumobi_list_edd_terms() {          $taxonomy = 'download_category'; // EDD's taxonomy for categories         $terms = get_terms( $taxonomy ); // get the terms from EDD's download_category      taxonomy     ?>
     <?php foreach ( $terms as $term ) : ?>
            <a href="<?php echo esc_attr( get_term_link( $term, $taxonomy ) ); ?>" title="<? php echo $term->name; ?>"><?php echo $term->name; ?>
     <?php endforeach; ?>
      Here's the link: http://sumobi.com/list-categories-with-links-in-easy-digital- downloads/ His code displays the category. Is there a way i can change it to make it display the subcategory of my category id=6?


title: Some posts 404, htaccess wipes itself

text: So posts on my WordPress have started to `404`, I have tried refreshing the permalinks. Have also disabled all plugins and changed theme. Categories section in the admin panel is also showing empty (but multiple pages), when I try to use the paging it gets me to reauth. `.htaccess` file wipes itself if I change permission to `777` and refresh permalinks and I just can't figure out why. I have a local install of the same DB and plugins etc that works fine. Weird thing is the local version doesn't have a `.htaccess` file (its not hidden, I can paste one in and see it, which breaks the site). ANSWER: Wordpress seemed to think the /tmp/ folder was full (even though monitoring suggested otherwise). Thats cleared now and all working again.


title: Add_action not updating user_meta when trashing multiple checked posts

text: I have a point system to my wordpress theme. I've recently added a function that removes one point from the member if I remove their post. However, when I check and remove multiple posts in the "wp-admin/edit.php" it doesnt remove the point.                   function deletePointFromUser($post_id) {     $post = get_post($post_ID);     $authorid = $post->post_author;     $currentQPointNumber = get_user_meta($authorid, 'points', true);          // Delete 1 to the current Point Score          update_user_meta($authorid, 'points', $currentQPointNumber-1);       }     add_action('wp_trash_post', 'deletePointFromUser');      Doesnt seem to work when selecting more than one post. Any ideas? Thanks!


title: Sort Posts By Custom Field Date?

text: I have the following code displaying posts from a custom post type. However, I need them displayed in date order from information put in a custom field, can this be done? I try this code :-               $course = new WP_Query(          array (              'posts_per_page' => '10' ,              'post_type' => 'course',             'orderby' => 'meta_value_num',             'meta_key' => 'course_date',             'order' => 'DESC'         )      );      But it shows me data like this :-               30-12-2014     28-9-2014     26-10-2014     19-12-2014      It must be like :-               30-12-2014     19-12-2014     26-10-2014     28-9-2014      What can I do?!


title: A plugin, which allows editing certain template regions

text: > **Possible Duplicate:**   >  What methods to use to create small, editable pieces of text for static > pages? I'm looking for a plugin, which would allow editing of certain predefined template regions. For example: I define that footer text is editable and administrator is able to edit just that, without touching code in template editor.


title: TN3 Plugin Not Working Under IIS / WebMatrix

text: Has anybody been able to get the TN3 Plugin running under Windows IIS? I'm also having trouble viewing anytype of logs to see whats happening. It installs/activates successfully. It also successfully uploads images but it doesn't show the images in the image selector view. Error Screen Shot: https://s3.amazonaws.com/satisfaction- production/s3_images/705730/Capture.PNG?1330552614 Issue tracker I made: https://getsatisfaction.com/tn3gallery/topics/tn3_gallery_not_working_under_windows_iis_webmatrix Plugin Site: http://www.tn3gallery.com/ Thanks


title: Overiding functions.php with child-theme

text: I've been searching for a proper solution to override functions and hooks in my parent theme's functions.php. My parent theme has:                   define('TS_INC', TEMPLATEPATH .'/inc');         require_once( TS_INC .'/file1.php');         require_once( TS_INC .'/file2.php');      I want to have in my child theme an /inc folder with file2.php changed according to my needs. This means that I want every call to file1.php to reach the parent theme /inc folder and calls to file2.php to go to my child/inc folder. Thanks in advance.


title: How to show wordpress "post published date" based on IP address

text: I am wondering how can my website have the post published date to visitors based on their geographic location, my site mostly based on Indian audience but if someone seeing from UK or US see some of the blog then it looks like someone is created with future date, please help.


title: Can't connect to my Wordpress website using Windows 8 app?

text: Im trying to connect to my Wordpress site (self hosted) through the Windows 8 app. First, after giving the Wordpress.com account details, it show my site and ask me to Authorize. after authorizing, it say "Can't connect to the service". I have used several security plugins in wordpress like the Better WP Security. But they block the old method of connecting. I think Jetpack have added a new way. Is there anything wrong with my PC?


title: Can't get pagination to work with this WP_Query loop

text: I know pagination isn't as straight forward with WP_Query as it is with other loop types but normally I don't have a problem with it. I'm editing a site for a client and this is their current loop;               <?php         $temp_post = $post;         $args = array(             'ignore_sticky_posts' => 1,             'posts_per_page' => 5,             'post_type' => 'project'                     );         $projects = new WP_Query( $args );         while ($projects->have_posts()) : $projects->the_post();     ?>              <!-- loop content -->          <?php         endwhile;         kriesi_pagination();         $post = $temp_post;     ?>      I tried my usual method of using `$wp_query` instead of `$portfolio` but that didn't work. Anyone have any ideas?


title: Comma separator problem of custom taxonomy

text: I want to add a new custom taxonomy name as "1 bedroom,2 bathrooms,4 kithenrooms" . ![enter image description here](http://i.stack.imgur.com/6hh4h.png) It's working well from "add new category panel" but not work on "Add new post" type panel. One name is breakdown into 3 names


title: wordpress nested loop

text:
I am building nested loop query.I have meta box that capture post id (sorter and repeater).so far my code               while ( have_posts() ) : the_post();         ?>     <div id="<?php echo $post->post_name; ?>">
<?php the_title(); ?>
         <?php         the_content();                   $urls = get_post_meta( get_the_ID(), 'mymeta_url_group', false );              foreach ( $urls as $url ) {             //echo $url["mymeta_url"];             foreach ( $url['mymeta_slider'] as $u ) {                 //echo "$u
 "; shows post id like 67 68 56 etc                      $my_query = new WP_Query( array( 'post_type' => 'slider', 'p' => "'.$u  .'" ) );                 if ( $my_query->have_posts() ) {                     while ( $my_query->have_posts() ) {                         $my_query->the_post();                         the_title();                     }                 }                 wp_reset_postdata();             }      but my output result got duplicated.that is post type slider has 3 posts query shows 6 posts duplicating twice.


title: Forms with multiple element types using custom post types

text: I am building a forms component and am looking for the following functionality. Each form would have multiple questions and multiple question types ( like text boxes, radio buttons, selection drop downs). How do we implement this with custom post types? This is what I did - Created a custom post type with custom fields. How do I edit custom fields? Ideally, I would like a drop-down with various question types and after selecting the question type, a new instance of that element is created to which data can be added. Can all of this be done with meta data or am I looking at it the wrong way??


title: Add posts select checkboxes field using Advanced Custom Fields

text: I have two custom post types called hotels and rooms. Users can register to my web site and they can add their hotels and rooms from their wp backend. so my problem is when they are adding hotels they need to select their hotel rooms. I'm using Advanced custom fields and it has field type called post object. but that field displaying posts in select menu. I need to do it with checkboxes.So it'll be so easy to user. I really appritiate if someone can help me. Thanks


title: How to include backend buttons css on frontend?

text: I want to include backend buttons css on frontend in a plugin? This is how its inluded in backend:               http://localhost/wp-admin/load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,buttons,wp-auth-check&ver=3.6.1      How to include it in the frontend?


title: Taxonomy archive page not displaying multiple results

text: I'd like to have a filter-widget which givs me an advanced search for my custom post types. I tried several plugins: "Query Multiple Taxonomies", "Search & Filter", "Taxonomy Picker" and the premium plugin "Taxonomy Filter Widget". Every one of this works on a similar basis but everywhere i have the same problem: – I created two Custom Post Types: Books, Records – Each has some custom Taxonomies: Books > Design, Architecture, Sports Records > Vinyl, CD, Tape – I have one article assigned to „Design“ and one assigned to „Vinyl“. If i filter only one of the mentioned Taxonomies, it gives me the right article. But if i try to combine multiple Taxonomies it gives me no results! For example: Filter „Design" = 1 article found Filter „Vinyl“ = 1 article found Filter „Design“ + „Vinyl“ = no articles found In other words: http://www.mysite.com/?tfw=2&books=design = works! http://www.mysite.com/?tfw=2&books=design&records=vinyl = does not work! This gives me headaches for hours now… I tried to flush the permalinks, i tried to use another theme… with no luck! I guess this might be not a plugin- issue but a gernerl wordpress problem. Any idead how to find the bug?


title: AJAX - Returning Two JSON Objects with One PHP Function

text: How would I go about returning two JSON objects with one AJAX call and PHP function? Any help is much appreciated! Here's the PHP function:               function get_ldap_attr() {         header("Content-type: application/json");         $lan = $_POST['lan'];         $dn = get_site_option ( "ldapServerOU" );         $usr = get_site_option ( "ldapServerCN" );         $pw = get_site_option ( "ldapServerPass" );         $addr = get_site_option ( "ldapServerAddr" );         $ad = ldap_connect ( $addr )             or die ( "Connection error." );         ldap_set_option ( $ad, LDAP_OPT_PROTOCOL_VERSION, 3 );         ldap_set_option ( $ad, LDAP_OPT_REFERRALS, 0 );         $bind = ldap_bind ( $ad, $usr, $pw );         if ( $bind ) {             $SearchFor ="cn=".$lan;                 $result = ldap_search ( $ad,$dn,$SearchFor );                 $entry = ldap_first_entry ( $ad, $result );                 if ( $entry != false )  {                     $info = ldap_get_attributes ( $ad, $entry );                 }                            $comm  = stripos ( $info['manager'][0], ',' );                     // find position of first comma in CN=Mxxxxxx,OU=Users,OU=MCR,DC=mfad,DC=mfroot,DC=org  (directReports field)                 $eq = stripos ( $info['manager'][0], '=' );                     // find position of first =                 $s_lanid = substr ( $info['manager'][0], $eq+1, ( ( $comm-1 ) - ( $eq ) ) );                     //get substring between = and comma... for lanid happiness..                 $sup = getLDAPInfo ( $s_lanid, $bind, $ad, $dn );                      // get supervisor's info...         }              echo json_encode($sup);         die();       }      And the jQuery:               jQuery(function() {         jQuery('#empLanId').on('blur', function() {             var lan = jQuery('#empLanId').val();             var ajaxurl = '<?php echo admin_url("admin-ajax.php", null); ?>';             var data = { action: "get_ldap", lan: lan};             jQuery.ajax({                 type: 'POST',                 url: ajaxurl,                 data: data,                 dataType: 'json',                 success: function(response) {                     jQuery('#empSupLanId').val(response.lanid);                     jQuery('#empSupName').val(response.fullname);                     jQuery('#empSupNumber').val(response.phone);                 }             });         });     });


title: Query only the posts with a post format of "audio"

text:
I'm trying to query only the posts that have a post format of `audio`. I'm pretty sure I'm doing this wrong. Can I get a little help?                   <?php get_header();?>

                      <?php                     $i=1;                     $temp = $wp_query;                     $wp_query = null;                     $wp_query = new WP_Query();                     $wp_query -> query('post-format-audio'.'&paged='.$paged)                 ?>                      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                                                                           <article id="post-<?php the_ID(); ?>">                                                          <time datetime="<?php the_time('c'); ?>"><?php the_time('F j, Y'); ?></time>                             <?php                                 $myvalue = get_field( "buzzsprout_shortcode" );                                  echo do_shortcode("$myvalue");                             ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="View emails and comment on this episode.">View emails and comment on this episode

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

              <?php get_sidebar(); ?>              <?php get_footer(); ?>


title: Post Query Glitch Causing First Post to be Out of Order

text: My problem is that there is a stubborn post at the top of the set of returned posts that somehow isn't sorted with the rest of them. Despite upgrading to 3.9, this issue still persists. For instance, here are the post dates (I'm sorting by date):   1. May 9 2014 (incorrect)   2. May 31 2014 (correctly sorted)   3. April 4, 2014 (correctly sorted)   4. March 8, 2014 (correctly sorted)   5. February 28, 2014 (correctly sorted) Here's the code I'm using on the post template, but it's not clear that anything I'm doing here is out of the ordinary. I've been troubleshooting it and trying all sorts of strange hacks and things, but to no avail.                           $args = array (                      'category_name' => 'show',                     'posts_per_page' => -1,                     'order' => 'desc',                     'orderby' => 'date'                                          );                 query_posts($args);      Any ideas? I've already tried setting up artificial post dates to try and nudge things into place, but the first May 9 post still comes up before the May 31 post - not reasonable or expected behaviour by any means. Thanks in advance!


title: Collect Data from NEXT item while in loop

text: I am trying to get the value of a custom field. The trick? I'm in the loop, currently printing out 2 of 5 for this example. I would like to get some info from 3 of 5 (or even 1 of 5) while printing out info on 2 of 5. I hope that makes sense. Any help would be great!


title: Rewrite rule for custom taxonomy

text: I'm pretty new to wordpress and I'm trying to create a recipes blog. I've created a custom taxonomy for ingredients:               register_taxonomy(          'ingredient',          'post',          array( 'label' => 'Ingredient',                 'hierarchical' => true              ),          array( 'rewrite' => array (                                 'slug'=>'recipes-with'                             )         );      Everythings works and my urls are like `www.mysite.com/recipes-with/onion` but I'd like my urls to be like `www.mysite.com/recipes-with-onion` I've tried to look into `add_rewrite_rule()`, but I can't seem to make it work. Any help would be greatly appreciated! EDIT: Here's how I resolved the issue with toni_lehtimaki help, too. 1) I removed the `rewrite` array in the args argument of register_taxonomy so it became:               register_taxonomy( 'ingredient', 'post', array('label'=>'Ingredient', 'hierarchical'=>true));      2) Then I added some rewrite rules               add_rewrite_rule('^recipes-with-(.*)/page/([0-9]+)?$','index.php?ingredient=$matches[1]&paged=$matches[2]','top');     add_rewrite_rule('^recipes-with-(.*)/?','index.php?ingredient=$matches[1]','top');      3) The last thing I needed to do was adding a filter               add_filter( 'term_link', 'change_ingredients_permalinks', 10, 2 );          function change_ingredients_permalinks( $permalink, $term ) {         if ($term->taxonomy == 'ingredient') $permalink = str_replace('ingredient/', 'recipes-with-', $permalink);         return $permalink;     }      4) Flush rewrite rules (you only need to go to settings->permalink and click save)


title: How to display only introtext?

text: For development of my custom template, I need to show only a intro text of some posts. Can you help me how to achieve that? More informations: As we all know, single WP post is defined as:               This is post's introducion text     <!--more-->     Main post content, blah blah blah      All I need is somehow to display > This is post's introducion text ... on frontend.


title: Create new wordpress theme with no need update

text: I want to make a customize site for my client. I want to use wordpress and I no have basic in wordpress develop, so I plan to override some code on twenty thirteen. Some question in my head about my planning:   1. Can I override some code on Twenty Thirteen, and use different name folder and stylesheet? Is right of law?   2. If I rename n create customize TT theme, how about the update of theme? Because I want to one time develop and no support or update for theme, is the theme secure? Any suggest to me please?


title: How can I include a file related to blog URL? Nothing seems to work

text: When I was building my website locally using WAMP, I was just using simple               include '/extras/file.php';      Of course, that would start at the root folder, and look in the extras folder. However, now I'm putting the website on a webserver, and have put it in a subdomain (to not interfere with the current live site). So I tried to change the include tags to a few different variations:               include (home_url().'/extras/file.php');     include home_url().'/extras/file.php'; - (without parent brackets)      And also the two variations above, but using bloginfo(url), get_bloginfo(url) etc but still nothing seems to actually output anything. Could it possible be becuase of the subdomain? If I alter the include statement, I can sometimes echo the home url as text, but that's not what I want. Am I doing it right? or is there something obviously wrong?


title: Wrap posts p tags in div

text: I am trying to set up blog posts so that when an image is added it is wrapped in one div set to float right and when text is added it is wrapped in another div set to float left. So that all images added to posts in the blog will always have images right and text left. have tried using jQuery to wrap all p tags in a div like so `jQuery('p').wrap("<div class='post-txt'></div>");` But I cant work out which PHP file to add this to, so nothing appears to be happening. Any help to point me to the correct PHP file within wordpress or any other options would be very much appreciated. All the best Harry


title: WordPress Login Doesn't Require Password for Subscriber

text: I'm having an issue with subscribers. WordPress is not validating a subscribers password. Anyone can login to a subscriber's account so long as they know the user name. Does anyone have an idea of why this would be happening?


title: ISOTOPE - Missing/Invalid Arguement Get Terms

text:
I am trying to use the isotope plugin for sorting on my taxonomy page and even though I don't know much about how to set it up, I tried using some advice found on here. > Wordpress and isotope filtering I did so by taking this code               function isotope_categories() {                  $categories = get_categories();                  $html = '
';             $html .= '
All items
';                  foreach ($categories as $category) {                      $html .= "
category_nicename}'>{$category->cat_name}
";                }                  $html .= '
';                  echo $html;         }      and tried altering it so that it would work with get_terms (custom taxonomy). The code I ended up with is -               function isotope_categories() {                  $categories = get_terms();                  $html = '
';             $html .= '
All items
';                  foreach ($terms as $term) {                      $html .= "
name}'>{$term->name}
";                }                  $html .= '
';                  echo $html;         }      However when I use `<?php isotope_categories() ?>` in my taxonomy page I receive the following errors - > Warning: Missing argument 1 for get_terms(), called in html/wp- > content/themes/lawcademy_theme/functions.php on line 1667 and defined in > html/wp-includes/taxonomy.php on line 1165 > > Warning: Invalid argument supplied for foreach() in html/wp- > content/themes/lawcademy_theme/functions.php on line 1672 How can I fix the code so that I don't get these errors?? Any help is appreciated. Thanks.


title: Unable to call a Function

text: I have my blog here- http://tinyurl.com/kzuv6w3 Actually Just because of this issue its been 1 year since then my blog is not Uploaded. As soon as I update wordpress It fails to call the Function. Error occurs in two files- structure.php post.php Fatal error: Call to undefined function getpostviews() in /home/content/28/6903228/html/trafficspinners/main/blog/wp- content/themes/genesis/lib/structure/post.php on line 245 I have now restored the Blog. I believe the is some function which is defined in wordpress which is lost after upgrade, I am unable to locate the function. Nor mally in which folder is function.php?


title: How to use tinyMCE for user "biographical info"?

text: I would like to provide our WP users (authors) with a tinyMCE editor instead of standard `textarea` for their "Biographical Info" on the **Profile** page. I have spent a lot of time searching online for plugins and references for how to accomplish this without a satisfying solution. Any tips would be appreciated.


title: Can I set a default featured image for a category?

text: I'm setting up a site with a theme that takes advantage of the "featured image" feature of WordPress. Since my end users are not the most tech saavy in the world, I'd like to set things up so that the categories would have a default "featured image" assigned to the post. In the event of multiple categories assigned to a post, then it would simply take the first one. Is there an existing plugin or a way to code this?


title: attachment url rewrite

text: i want to change the address of the file attachment link to wordpress [example: http://www.sitename.com/category/sub-category/article.html **/attachment/** image etc.]. i did research on the subject a few days, but could not get any results.. looking at the structure of the connection! after " **.html** ", " **/** " mark does not look very nice to come. also the " **attachment** " as the fixing of that section, for WordPress users of different languages are missing a very large. i mean; _rewrite.php_ file links to the author for the "author" from the base. this too, edit with the help of a simple function;               global $wp_rewrite;     $wp_rewrite->author_base = ' **example** ';     $wp_rewrite->flush_rules(); i can not for this " **attachment** " :/ i tried so hard but i could not deal with this problem... anyway, i wanted to ask you! i'm not a coder ( _i'm a graphic designer_ ). i want to do, so maybe things can make the limits of logic (: _image.php_ file as it is sufficient to open a url more sense to me ... **this link;** http://www.sitename.com/category/sub-category/article.html **/attachment/** image **whether such;** http://www.sitename.com/category/sub-category/article.html **?file=** image i do not know would not open the _image.php_ file in the form of " **?file=image** ". so i can carry out your suggestions. thank you in advance. regards, **Metin METE**


title: How exactly does Bad Behavior plugin work?

text: Can someone explain to me please how exactly Bad Behavior works? On their official site, **they say** that it uses HTTP headers, IP, and meta fingerprinting - but I would like some specifics on its mechanisms, not a simple description. To be more precise - how does it profile malicious activity (what kind of activity triggers "falls outside the bounds of a normal human browsing the web"), what does it look for in HTTP headers and metadata? Anyone? thanks! =) PS for mods - please could you add 'bad-behavior' tag? thanks


title: how do i find out why links point to my old domain

text: i migrated a wordpress site from one domain to another. I still have images and links that seem to be pointing to my old domain name. where can i get a list of all places in wordpress that hardcode or has the domain name in it. the only place i saw was in the database in the **wp_posts** table in the **guid** column. where else should i be looking?


title: captcha not working in my custom plugin

text: I am trying to create a contact form with captcha, but captcha not working. I created captcha image by this in another file and stored value in session:               //I already have start session and the beginning of file     header('Content-Type: image/jpeg');// defining the image type to be shown in browser widow     imagejpeg($image);//showing the image     imagedestroy($image);//destroying the image instance     $_SESSION['image_code'] = $code;      and on the form side I am comparing it by:               if(empty($_SESSION['image_code'] ) ||           strcasecmp($_SESSION['image_code'], $_POST['posted_captcha']) != 0)         {         //Note: the captcha code is compared case insensitively.         //to overcome this i can use         // strcmp()             $errors .= "\n The captcha code does not match!";         }      may be my plugin not getting session value for image. I tried to add session start at wp-config.php, wp-load.php and plugins file but the captcha stayed same. Help would be appreciate thanks :)


title: Stopping flexslider from sliding to just changing pictures

text: I'm using zeeflex theme and flexslider slides images from right to left, but I'd like them to just change images the regular way. That's the demo http://www.woothemes.com/flexslider/ Maybe this is where the action is slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=t?a.pagingCount-1:a.last;return g?!0:t&&a.currentItem===a.count- This is the main slider file jQuery(document).ready(function($) {               /* Add flexslider to #frontpage-slider div */      $("#frontpage-slider").flexslider({         animation: themezeeSliderParams.animation,         slideshowSpeed: themezeeSliderParams.speed,         namespace: "zeeflex-",         selector: ".zeeslides > li",         smoothHeight: false     });      Any advice appreciated! All I could achieve is to stop the slider from changing images, but I just need it to change slides... Cheers Tina


title: term/tag not being saved for custom post type

text:
I have been using a chunk of code as a plugin that was suggested in the answer to this question. Please check the code provided below instead of the one in the question, as I may have modified it a bit. The plugin works fine for the normal post type but has an issue when used with custom-post-type. My custom post type is called "research". To be explicit, the code is **not able to save the tag** /term assigned with checkboxes, when used in the single-template of custom post type "research". However it does save the tags assigned with checkboxes, when used in the single-template of the normal-post-type. I would really appreciate the correction in the code please. **FRONTEND TAGGING PLUGIN CODE** :               add_action('init', 'frontend_term_assignment');     add_action('frontend_term_assignment_form', 'frontend_term_assignment_form');               function frontend_term_assignment() {       if (         ! isset($_POST['term_assignment_post_id']) ||         ! intval($_POST['term_assignment_post_id']) ||         ! current_user_can('manage_options', $_POST['term_assignment_post_id']) ||         ! isset( $_POST['term_assignment_nonce'] ) ||         ! wp_verify_nonce($_POST['term_assignment_nonce'], 'frontend_term_assignment')       ) return;       $post = get_post( $_POST['term_assignment_post_id'] );       $taxonomy = null;       if ( $post->post_type == 'post' ) {         $taxonomy = 'post_tag';       } elseif ( $post->post_type == 'research' )  {         $taxonomy = 'research_sections';       }       if ( empty($taxonomy) || ! isset($_POST[$taxonomy]) ) return;       $terms = $_POST[$taxonomy];       wp_set_post_terms( $post->ID, $terms, $taxonomy, false);     }          function frontend_term_assignment_form() {       $post = get_queried_object();       if ( empty($post) || ! isset($post->ID) || ! current_user_can('manage_options', $post->ID) )       $taxonomy = null;       if ( $post->post_type == 'post' ) {         $taxonomy = 'post_tag';       } elseif ( $post->post_type == 'research' )  {         $taxonomy = 'research_sections';       }       if ( empty($taxonomy) ) return;       $tax_obj = get_taxonomy($taxonomy);       $args = array('orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false );       $terms = get_terms($taxonomy, $args);       $post_terms = (array)wp_get_post_terms( $post->ID, $taxonomy, array("fields" => "ids") );       if ( ! empty($terms) ) {         echo '<form method="post" id="frontend_term_assignment_form">';         echo '<input type="hidden" value="' . wp_create_nonce('frontend_term_assignment') . '" name="term_assignment_nonce">';         echo '<input type="hidden" value="' . $post->ID . '" name="term_assignment_post_id">';         echo '

';         foreach ($terms as $term ) {           $checked = in_array($term->term_id, $post_terms) ? checked(1, 1, 0) : '';           printf('
<input type="checkbox" value="%s" name="%s[]"%s> ' . $term->name . '
', $term->slug, $taxonomy, $checked);         }         echo '
<input type="submit" id="tag-sub" value="' . esc_attr( sprintf(__('Save %s'), $tax_obj->label) ) . '" />';         echo '
</form>';       }     }      ADDED NOTES : Below given is a the code that is used in the single.php templates which displays the form. Tags if assigned from the wp-backend works fine and is saved fine, the trouble is just saving tags in the frontend.               <?php do_action('frontend_term_assignment_form'); ?>


title: How to get multiple Taxonomies not All Taxonomies?

text: I am building a movie site, here is the codes to get the taxonomies               function display_post_taxonomies( $content ) {              if( is_single() ) {                  $args = array( 'public' => true, '_builtin' => false );                  $output = 'objects';                  $operator = 'and';                  $taxonomies = get_taxonomies( $args, $output, $operator );                  if( $taxonomies ) {                      $content .= '';                      foreach( $taxonomies as $taxonomy ) {                          $args = array(                                     'orderby'               => 'name',                                     'echo'                  => false,                                     'taxonomy'              => $taxonomy->name,                                     'title_li'              => '' . __( $taxonomy->labels->name, 'your-themes-text-domain' ) . '',                                     'show_option_none'      => __( 'No ' . $taxonomy->labels->name, 'your-themes-text-domain' )                                 );                          $content .= '          ' . wp_list_categories( $args ) . '     ';                      }                      $content .= '';                  }              }              return $content;          }      The first `$args` is generic to display all not built in taxonomies, but I want to exclude couple of taxonomies but I couldn't If I want to show just one taxonomy I'll use this code               $args = array( 'name' => 'actors');      So I've tried the following codes but it didn't work               $args = array(       'name' => array( 'actors', 'directors', 'musicians' )     );      How can I do it? Thanks in advance.


title: How to add checkbox with multiple values in table?

text: Right now i changed from `options` table to my own table so things are getting difficult i have a checkbox its name is `selection` in table, so here is what i tried               <input type="checkbox" name="selection" value="1"<?php checked("1",$item['selection']);?> />     <input type="checkbox" name="selection" value="2"<?php checked("2",$item['selection']);?> />     <input type="checkbox" name="selection" value="3"<?php checked("3",$item['selection']);?> />      This is not saving any value , Then i tried as array in below               <input type="checkbox" name="selection[]" value="1"<?php checked("1",$item['selection']);?> />     <input type="checkbox" name="selection[]" value="2"<?php checked("2",$item['selection']);?> />     <input type="checkbox" name="selection[]" value="3"<?php checked("3",$item['selection']);?> />      It is throwing warning `Warning: mysql_real_escape_string() expects parameter 1 to be string, array given` How to store multiple values with the same name in checkbox when using my table ? Any help help would be greatful.


title: Let Posts be stored in another table

text: I am trying to develop a plugin that creates a new table in the Wordpress database and I want to store there some kind of posts I create. I am trying to understand how to "clone" the Wordpress Posts/Add New/Categories/Tags and store the posts not in wp_posts, but in another table (eg.: wp_special_posts). At the moment I have the function that creates the table at the plugin activation, I created the page that grabs the information from the DB and display them using _WP_List_Table_ , but I do not have an idea on how, and if it is possible, to clone those sections. And help? Hint? **UPDATE** I want to create a product section with its own table, called _wp_product_instore_ , and I also want to use the standard _post-new.php_ interface, but put the posts in the _wp_product_instore_ table instead of _wp_posts_.


title: Out of memory error reporting

text: When users upload very large photos and memory is tight, it seems like Wordpress runs out of memory - fails to resize the uploaded photos and does not create the necessary metadata (`_wp_attachment_metadata` entry in `wp_postmet`a is not created). The worst part is that the user is never notified. At most I get an "HTTP error" message. Is is possible to somehow add an error message that will warn the user and remove the inconsistent file/database entries? How come this is not standard WP behavior?


title: Error when editing meta fields from all post view

text: Got a bit of an issue with my meta tags. I'm using the all in one seo plugin which has the rather useful feature of editing the title and description straight from 'all posts's page. The problem is there are apostrophes in all my fields, which seems to throw the error 'Uncaught SyntaxError: Unexpected token ILLEGAL' each time the edit button is pressed and doesn't let me edit within the page. If I remove the apostrophes by going into the whole post the field becomes editable from 'all posts' view again. Is there a way to strip out all the apostrophes from title and description or a way to not throw that error when i click the little pencil next to the field?


title: How to style only part of the category names?

text: My categories are all two words, such as: Name X Name Y Name Z How can I style the X, Y, Z as bold and leave the Name as normal? I can do so in the menu, simply by adding `<b>` tags around the X, Y and Z. But of course, this doesn't work in the Edit Category name field. The category is output on the single post pages with: `<?php $the_cat = get_the_category(); $category_link = get_category_link( $the_cat[0]->cat_ID ); foreach((get_the_category()) as $category) { echo 'slug.'" href="'.$category_link.'">'.$category->cat_name.'' ; } ?>` Am I missing something really obvious here?! Thanks in advance, I'm going round in circles here! :)


title: Including a meta box on a plugin page

text: I want to include the 'Comments' meta box (the one usually seen on the post creation page) on my plugin's admin page. Is there a way to do that? I am aware of how you can use add_meta_box() to add a custom one, but I want to simply add the comments meta box of a specific post on a particular admin page. Any ideas?


title: Given the ID of a product in woocommerce, how can I get its URL?

text: Say I have the ID of a product in wooCommerce; can I generate its URL somehow? (example /shop/fresh-apples)


title: How to change Calendar military time to eastern standard?

text: Below is an image of a calendar entry. The time is in military time and there are also a pair of rogue parenthesis after the time display. ![enter image description here](http://i.stack.imgur.com/sSiKF.png) I want to know how to convert this to eastern standard time and remove the parenthesis. I went into the Plug ins Javascript file and I understand how to remove the time altogether but that's not what I want. The WordPress instance already has it's General time set to eastern standard with a non military format.


title: Network shared post error You do not have permission to upload files to site + 500 internal server error

text: I am using Network Shared Post plugin in my wordpress 3.6 website to use users images themselves. But when a user try to use other people files, it shows an error message > "You do not have permission to upload files to site: ..." and i can see google chrome browser console > wp-content/plugins/network-shared-media/media- > upload.php?type=image&tab=library&post_id=0&blog_id=1 500 (Internal Server > Error) What can I do to solve this issue ?


title: Switching off shipping in WP-eCommerce

text: My client needs to work out the shipping only after someone has made a "purchase" on his site so by default, this option needs to be switched off and yet, when I switch shipping off, I still get shipping options coming up everywhere. I could hide this with CSS but if the option to switch off shipping is there, I would like to be able to use it. Is there something else I need to perhaps switch off/set? Thanks


title: Elegantly using JavaScript on widget admin forms

text: I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've enqueued 'jquery-ui-accordion' using the 'admin_enqueue_scripts' action:               function add_my_deps() {         wp_enqueue_script('jquery-ui-accordion');     }         add_action( 'admin_enqueue_scripts', 'add_my_deps' );      ...And my JavaScript looks something like this:               (function($){         $('.more-options-expansible').accordion();     })(jQuery)      **Now what?** If I enqueue that via the "add_my_deps" action above, it only works if I reload the page (I.e., when placing the widget, the JavaScript is instantiated before the element is created; if the widget is saved, its JavaScript is enqueued as normal and it instantiates as normal.). If I place that in a `<script>` tag at the end of my HTML output in my widget's `form()` method, I get the following exception: `Uncaught TypeError: Object [object Object] has no method 'accordion'`. This is because it seems to be instantiating the accordion via the inline `<script>` before the jQuery UI Accordion library is loaded. Is there something obvious I'm missing? I'm using a simple jQuery instantiation for this example, but it seems like I'd have even worse issues if I tried to do anything using AJAX (Namely, how would I select the appropriate element to place the response in? Is this something I need to start using Backbone.js to accomplish?). Any help?


title: Where's did this div element come from?

text: This div element is causing a big gap on my wordpress page, specifically on the single post page. It's nowhere in the themes, I can't seem to find where this div element is coming from. Have you encountered this before (the highlighted element)? ![alt text](http://i.stack.imgur.com/0meHU.png) **PS** : Happens on chrome only. **UPDATE:** Still having this problem even with the stable chrome. Help anybody? **UPDATE2** : I think its the syntax highlighter plugin. And I also found out all other wordpress blogs (that I've checked) have this div. And the code's height in the post adds to the height of the div.


title: how many visitor open this post?

text: i want to create, how many visitor open this post it display in homepage below of summary like this .how i can do it? my site.my css code                    /***** Structure and Layout *****/     body { font: 62.5% Arial, "Helvetica Neue", Helvetica, sans-serif; color: #666; }     #angles { position: relative; width: 100%; }     .inner-wrapper { position: relative; width: 960px; margin: 0 auto; }     #column-container { position: relative; width: 960px; background: #fff url(images/backgrounds/bg-sidebar.gif) repeat-y top right; padding: 20px 0 0; }     #column-container-left { position: relative; width: 960px; background: #fff url(images/backgrounds/bg-sidebar.gif) repeat-y top left; padding: 20px 0; }     #column-container-wide { position: relative; width: 960px; background: #fff; padding: 20px 0; }     #left-column, #right-column { position: relative; width: 640px; }     #right-sidebar, #left-sidebar { position: relative; width: 320px; }     #right-sidebar, #right-column { float: right; }     #left-column, #left-sidebar { float: left; }     .video-sidebar { position: relative; width: 300px; margin: 0 10px 20px; padding: 0 0 20px; border-bottom: 1px solid #d9d9d9; }          /***** Float Classes and Clear Float Fix *****/     .clear { display: inline-block; }     .clear:after { display: block; visibility: hidden; clear: both; height: 0; content: "."; }     /* Hide from IE Mac \*/ .clear { display: block; } /* End hide from IE Mac */     .alignleft { float: left; }     .alignright { float: right; }          /***** Main Nav Bar *****/     #mainnav-bar { position: relative; width: 960px; margin: 0 auto; background: #fcfcfc url(images/backgrounds/bg-main-nav.jpg) repeat-x bottom left; border: 1px solid #d9d9d9; z-index: 98; }          /***** Main Navigation *****/     #mainnav-bar ul { position: relative; float: left }     #mainnav-bar li { float: left; background: url(images/backgrounds/pipe-mainnav.gif) repeat-y top right; line-height: 40px; position: relative; }     #mainnav-bar li:hover { visibility: inherit; }     #mainnav-bar li a, #mainnav-bar li a:visited { display: block; color: #464646; font-size: 1.3em; font-weight: bold; padding: 0 15px; text-decoration: none; position: relative; }     #mainnav-bar li a:hover, #mainnav-bar li a:active { color: #fff; background: #464646 url(images/backgrounds/bg-main-nav-hover.png) repeat-x top left; }          /***** Main Navigation Dropdown Menu *****/     #mainnav-bar ul ul { position: absolute; top: -999em; width: 20em; background: #e6e6e6; border-left: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; background-image: none; margin: 0; }     #mainnav-bar ul ul li { clear: left; width: 100%; border-top: 1px solid #d9d9d9; padding: 0; background-image: none !important; line-height: 3em; }     #mainnav-bar ul ul li:first-child { border: none; }     #mainnav-bar ul ul li a, #mainnav-bar ul ul li a:visited { font-size: 1.1em !important; color: #323232; background-image: none !important; }     #mainnav-bar ul ul li a:hover, #mainnav-bar ul ul li a:active { background: #1b1b1b; color: #fff !important; }          /***** Show Main Navigation Dropdown Menu *****/     #mainnav-bar ul li:hover ul, #mainnav-bar ul li.sfHover ul { top: 4.1em; left: 0; z-index: 99; }          /***** Hide Main Navigation Flyout Navigation Level 1 - 3 *****/     #mainnav-bar ul ul li:hover ul, #mainnav-bar ul ul li.sfHover ul,     #mainnav-bar ul ul ul li:hover ul, #mainnav-bar ul ul ul li.sfHover ul,     #mainnav-bar ul ul ul ul li:hover ul, #mainnav-bar ul ul ul ul li.sfHover ul { top: -999em; }          /***** Show Main Navigation Flyout Navigation Level 1 - 3 *****/     #mainnav-bar ul ul li:hover ul, #mainnav-bar ul ul li.sfHover ul,     #mainnav-bar ul ul ul li:hover ul, #mainnav-bar ul ul ul li.sfHover ul,     #mainnav-bar ul ul ul ul li:hover ul, #mainnav-bar ul ul ul ul li.sfHover ul { top: 0; left: 20em; }          /***** Main Navigation Current Menu Item Highlighting *****/     #mainnav-bar ul li:hover, #mainnav-bar ul li.sfHover:hover { background: url(images/backgrounds/pipe-mainnav.gif) repeat-y top right; }     #mainnav-bar ul ul li:hover, #mainnav-bar ul ul li.sfHover:hover { background: #d5d5d5; background-image: none; }          /***** Home Page Magazine Content *****/     .headlines { position: relative; width: 640px; background: url(images/backgrounds/bg-home-columns.gif) no-repeat center top; padding: 15px 0 0; margin: 0 0 20px; }     .home-column { position: relative; width: 300px; float: left; padding: 0 10px; }     .home-column h2 a, .home-column h2 a:visited { font-size: 1.1em; text-transform: uppercase; text-decoration: none; padding: 0 8px 0 0; }     .home-column ul { margin: 10px 0 0; }     .home-column li { padding: 10px 0; border-top: 1px solid #e7e7e7; width: 300px; overflow: hidden; }     .home-column .home-thumb li { overflow: hidden; width: 300px; }     .thumb-text { position: relative; width: 220px; float: right; }     .home-column h3 a, .home-column h3 a:visited { font-size: 1.2em; font-weight: normal; color: #464646; text-decoration: none; line-height: 1.5; }     .home-column p { color: #a5a5a5; font: 1.2em/1.5 'VollkornItalic', serif; margin: 1px 0 0; }     .home-column .sidebar-archive-thumb p, .home-column .lead-thumb p { margin: 0; }     .home-column p a, .home-column p a:visited { text-decoration: none; }     .home-column p a:hover, .home-column p a:active { text-decoration: underline; }     .home-headlines h3 a, .home-headlines h3 a:visited { background: url(images/backgrounds/list-arrow.png) no-repeat 0 0.3em; display: block; padding: 0 0 0 15px; }     .home-headlines p { margin: 1px 0 0 15px; }     .lead-thumb { position: relative; }     .lead-thumb a, .lead-thumb a:visited { display: block; width: 290px; height: 125px; border: 5px solid #f1f1f1; margin: 0 0 10px; -webkit-transition: border .2s linear; transition: border .2s linear; }     .lead-thumb a:hover, .lead-thumb a:active { -webkit-transition: border .2s linear; transition: border .2s linear; }          /***** Home Page Blog Content *****/     .home-blog { position: relative; width: 600px; margin: 0 10px; border-top: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; border-left: 1px solid #d9d9d9; padding: 10px 9px;  }     .home-blog-thumb { position: relative; width: 130px; height: 130px; float: left; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 4px; }     .home-blog-thumb:hover { border-color: #bbb; }     .home-blog-thumb .play-button { position: absolute; top: 30px; left: 30px; }     .home-blog-text { position: relative; width: 440px; float: right; }     .home-blog-text h3 a, .home-blog-text h3 a:visited { color: #464646; font-size: 1.8em; line-height: 1.2em; text-decoration: none; letter-spacing: -.02em; }     .home-blog-text p { font-size: 1.2em; line-height: 1.6em; margin: 10px 0 0; }     .home-blog-text p a, .home-blog-text p a:visited { text-decoration: none; }     .home-blog-text p a:hover, .home-blog-text p a:active { text-decoration: underline; }     .home-blog-cat { position: relative; width: 620px; height: 35px; margin: 0 10px 20px; background: url(images/backgrounds/bg-home-cat.jpg) no-repeat 0 0; }     .home-blog-cat p { line-height: 35px; font-size: 1.1em; background: url(images/backgrounds/bg-cat-links.jpg) no-repeat top right; padding: 0 15px 0 10px; color: #fff; display: inline-block; }     .home-blog-cat p a, .home-blog-cat p a:visited { color: #fff; text-decoration: none; }     .home-blog-cat p a:hover, .home-blog-cat p a:active { text-decoration: underline; }          /***** Breadcrumbs *****/     #breadcrumbs { position: relative; width: 620px; margin: 0 10px 20px; }     #breadcrumbs p { font-size: 1.1em; line-height: 1.4em; }     #breadcrumbs p a, #breadcrumbs p a:visited { font-weight: normal; text-decoration: none; }     #breadcrumbs p a:hover, #breadcrumbs p a:active { text-decoration: underline; }     #breadcrumbs p span.current-crumb { font-weight: bold; }          /***** Page Titles *****/     #page-title, #page-title-wide { position: relative; margin: 0 10px 20px; background: url(images/backgrounds/divider.png) no-repeat bottom center; padding: 0 0 20px; }     #page-title { width: 620px; }     #page-title-wide { width: 940px; }     #page-title h1, #page-title-wide h1 { color: #222; font: 3em/1.2 'VollkornRegular', serif; letter-spacing: -.03em; }          /***** Post Header *****/     #post-header { position: relative; width: 618px; margin: 0 10px 20px; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 10px 0 0; overflow: hidden; }     #post-header-wide { position: relative; width: 618px; margin: 0 10px 20px; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 10px 0 0; }     .post-title { position: relative; width: 618px; }     .header-gravatar { position: relative; width: 80px; height: 60px; float: left; background: url(images/backgrounds/bg-header-avatar.gif) no-repeat right 10px; margin: 0 0 0 9px; z-index: 2; }     .header-gravatar img { display: block; border: 5px solid #fff; }     .header-title { position: relative; background: #fff; border: 1px solid #d9d9d9; padding: 10px; }     #post-header .header-title { width: 498px; float: left; margin: 0 0 0 -1px; }     #post-header-wide .header-title { width: 576px; margin: 0 0 0 9px; }     .header-title h1 { color: #222; font: 2.5em/1.2 'VollkornRegular', serif; letter-spacing: -.03em; }     #post-data { position: relative; width: 618px; margin: 10px 0 0; }     #post-data-wide { position: relative; width: 525; margin: 0 10px 0 0; float: left; }     #post-comments { position: relative; width: 75px; margin: 0 0 0 10px; float: right; }          /***** Post Data *****/     #post-data p { font-size: 1.1em; line-height: 1.4em; color: #222; background: url(images/backgrounds/bg-post-header.gif) repeat-x left top; padding: 10px; }     #post-data p a, #post-data p a:visited { text-decoration: none; }     #post-data p a:hover, #post-data p a:active { text-decoration: underline; }          /***** Share Post Actions *****/     .share-actions { position: relative; width: 140px; margin: 0 0 0 10px; }     .share-actions li { border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; border-left: 1px solid #d9d9d9; padding: 15px 20px; text-align: center; }     .share-button, .share-button:visited { display: inline-block; line-height: 2em; text-align: center; background: #e5e5e5 url(images/backgrounds/bg-button.png) repeat-x 0 0; padding: 0 10px; border: 1px solid #d9d9d9; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; color: #464646; font-weight: bold; font-size: 1.1em; text-decoration: none; }     .share-button:hover, .share-button:active { border-color: #b9b9b9; }     .post-left-column .widget-head { margin: 0 10px; line-height: 30px; text-align: center; }     .post-left-column p { margin: 0 10px 20px; text-align: center; }          /***** Post Lead Image *****/     #lead-image { position: relative; width: 610px; height: 320px; margin: 0 10px 20px; padding: 5px; background: url(images/backgrounds/bg-postthumb.gif); }     #lead-image img { display: block; }                    /***** Post Meta *****/     .published { position: relative; width: 620px; margin: 0 10px 20px; background: url(images/backgrounds/bg-published.gif) repeat-x 0 0; text-align: center; }     .published p { background: #fff url(images/backgrounds/bg-published-decoration.gif) no-repeat center bottom; display: inline-block; color: #222; font: 1.2em 'VollkornItalic', serif; padding: 0 10px 20px; }     .published p a, .published p a:visited { text-decoration: none; }     .published p a:hover, .published p a:active { text-decoration: underline; }          /***** Post YouTube Video Player *****/     #video-player { position: relative; width: 620px; margin: 0 10px 20px; }     .yt-player { width: 615px; height: 370px; }          /***** Post Entry *****/     .post-columns { position: relative; width: 640px; }     .post-460 { position: relative; width: 460px; margin: 0 10px; float: right; }     .post-620, .periodic-password-post { position: relative; width: 620px; margin: 0 10px; }     .post-940 { width: 940px; margin: 0 10px; }     .post-left-column { position: relative; width: 160px; float: left; margin: 0 0 20px; }     .post-entry { position: relative; }     .post-entry h1, .post-entry h2, .post-entry h3, .post-entry h4, .post-entry h5, .post-entry h6 { margin: 0 0 10px; color: #222; line-height: 1.7; }     .post-entry h1 { font-size: 2.1em; }     .post-entry h2 { font-size: 1.9em; }     .post-entry h3 { font-size: 1.7em; }     .post-entry h4 { font-size: 1.5em; }     .post-entry h5 { font-size: 1.3em; }     .post-entry h6 { font-size: 1.2em; }     .post-entry p { font-size: 1.3em; line-height: 1.7em; margin: 0 0 30px; }     .post-entry blockquote { margin: 0 40px; border-left: 3px solid #464646; padding: 0 0 0 20px; font: 120% 'VollkornItalic', serif; color: #222; }     .post-entry blockquote p { line-height: 1.5em; }     .post-entry ul, .post-entry ol { margin: 0 40px 30px; font-size: 1.3em; line-height: 1.7em; }     .post-entry ul { list-style: disc; }     .post-entry ul ul { margin: 0 0 0 30px; font-size: inherit; list-style: circle; }     .post-entry ul ol { margin: 0 0 0 30px; font-size: inherit; }     .post-entry ul ul li { background: none; padding: 0; }     .post-entry ol { list-style: decimal; }     .post-entry dl { font-size: 1.3em; line-height: 1.7em; }     .post-entry dt { color: #222; font-weight: bold; }     .post-entry dd { margin: 0 0 30px; }     .post-entry code { font: 90% Monaco, Courier, monospace; background: #f1f1f1; padding: 2px; border-bottom: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; }     .post-entry p a, .post-entry li a,     .post-entry p a:visited, .post-entry li a:visited { text-decoration: none; }     .post-entry p a:hover, .post-entry li a:hover,     .post-entry p a:active, .post-entry li a:active { text-decoration: underline; }     .post-entry table { width: 90%; border-left: 1px solid #d9d9d9; margin: 0 auto 20px; }     .post-entry table caption { line-height: 3em; font-size: 1.2em; font-weight: bold; color: #464646; }     .post-entry table thead, .post-entry table tfoot { background: #f1f1f1; }     .post-entry table th, .post-entry table td { padding: 10px 15px; text-align: left; border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; font-size: 1.2em; color: #464646; }     .post-entry tfoot td { text-align: center; }     .post-entry table th { border-top: 1px solid #d9d9d9; font-weight: bold; }     .post-entry table td a, .post-entry table td a:visited { font-weight: bold; text-decoration: none; }     .post-entry table td a:hover, .post-entry table td a:active { text-decoration: underline; }     .post-entry pre { font-size: 1.4em; background: url(images/backgrounds/bg-pre.gif) top left; line-height: 2.3em; width: 600px; overflow: auto; overflow-y: hidden; border: 1px solid #d9d9d9; margin: 0 0 20px; }     .post-entry pre code { background: none; border: none; font-size: inherit; margin: 0 20px; padding: 18px 0; }     .post-entry address { font-style: normal; font-size: 1.3em; line-height: 1.5em; margin: 0 0 20px; }     .post-entry strong { color: #464646; }          /***** Post Entry Password Form ****/     .post-entry form label { font-weight: bold; }     .post-entry form input[type='password'] { width: 280px; padding: 7px 10px; border: 5px solid #f1f1f1; color: #d9d9d9; margin: 5px 0 0; }     .post-entry form input[type='password']:focus { color: #797979; }     .post-entry form input[type='submit'] { width: 140px; height: 40px; margin: 0 0 20px; background: url(images/backgrounds/periodic-sprite-03.png) no-repeat 0 -340px; font-weight: bold; font-family: Arial, "Helvetia Neue", Helvetica, sans-serif; text-transform: uppercase; color: #797979; margin: 10px 0 0; }     .post-entry form input[type='submit']:hover { background-position: 0 -430px; cursor: pointer; }          /***** Shortcodes *****/     .post-entry blockquote.pullquote { margin: 0 20px; padding: 0; width: 35%; border: none; color: #464646; }     .post-entry blockquote.pullquote p { margin: 0; }     .post-entry blockquote.pullright { padding: 5px 0 5px 20px; border-left: 3px solid #464646; }     .post-entry blockquote.pullleft { padding: 5px 20px 5px 0; border-right: 3px solid #464646; text-align: right; }     .checklist { position: relative; }     .checklist ul { list-style: none; }     .checklist li { background: url(images/backgrounds/check.png) no-repeat left .4em; padding: 0 0 0 20px; }     .arrowlist { position: relative; }     .arrowlist ul { list-style: none; }     .arrowlist li { background: url(images/backgrounds/list-arrow.png) no-repeat 0 .4em; padding: 0 0 0 15px; }     .arrowlist li li { background: none; padding: 0; }     .note { position: relative; width: 75%; margin: 0 auto 30px; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 10px 20px 14px; }     .note p { margin: 0; font: 1.4em/1.6em 'VollkornItalic', serif; }     .two_column { position: relative; width: 47%; margin: 0 20px 0 0; float: left; }     .two_column_last { position: relative; width: 47%; margin: 0; float: left; }     .three_column { position: relative; width: 31%; margin: 0 20px 0 0; float: left; }     .three_column_last { position: relative; width: 31%; margin: 0; float: left; }     .four_column { position: relative; width: 23%; margin: 0 20px 0 0; float: left; }     .four_column_last { position: relative; width: 23%; margin: 0; float: left; }     .button, .button:visited { display: inline-block; line-height: 2.5em; text-align: center; background: #e5e5e5 url(images/backgrounds/bg-button.png) repeat-x 0 0; padding: 0 25px; border: 5px solid #d9d9d9; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; margin: 0 0 20px; color: #464646; font-weight: bold; font-size: 1.2em; text-decoration: none; }     .button:hover, .button:active { background-color: #fcfcfc; background-position: 0 -40px; border-color: #b9b9b9; }          /***** Post Images *****/     img.alignleft { margin: 0 20px 10px 0; }     img.alignright { margin: 0 0 10px 20px; }     img.aligncenter { margin: 0 auto; }          /***** Post Images with Captions *****/     .wp-caption { background: #f3f3f3; border: 1px solid #d9d9d9; padding: 4px 0; }     .wp-caption img { display: block; margin: 0 auto; }     .wp-caption .wp-caption-text { text-align: center; margin: 5px 0 3px; line-height: 1; font: 1.2em/1.3 'VollkornItalic', serif; color: #464646; }     div.alignleft { margin: 0 20px 10px 0; }     div.alignright { margin: 0 0 10px 20px; }     div.aligncenter { margin: 0 auto 20px; }          /***** Post Image Galleries *****/     .gallery { margin: 0 0 20px !important; }     .gallery-item img { border: 1px solid #d9d9d9 !important; background: #f1f1f1; padding: 4px; }     .post-entry dd.gallery-caption { margin: 0 0 15px; padding: 0 20px; }     .post-entry dd.wp-caption-text { font-family: 'VollkornItalic', serif; color: #464646; line-height: 1.2em; }          /***** Post Share *****/     #post-share { position: relative; width: 620px; margin: 0 10px 20px; }     #post-share li { line-height: 0; float: left; margin: 0 30px 0 0; }          /***** Author Box *****/     .post-gravatar { position: relative; width: 60px; height: 60px; margin: 0 10px 0 0; float: left; }     .post-gravatar img { display: block; width: 50px; height: 50px; border: 1px solid #d9d9d9; background: #fcfcfc; padding: 4px; }     #author-box, #archived-author-box { position: relative; width: 598px; margin: 0 10px 20px; background: #f1f1f1; border: 1px solid #d9d9d9; padding: 10px; }     #author-box h3 { color: #222; font-size: 1.1em; margin: 0 0 10px; text-transform: uppercase; }     #author-text, #archived-author-text { position: relative; width: 528px; float: right; }     #author-text p { font-size: 1.2em; line-height: 1.6em; margin: 0 0 10px; }     #archived-author-text p { font-size: 1.2em; line-height: 1.6em; }     #author-text p a, #author-text p a:visited,     #archived-author-text p a, #archived-author-text p a:visited { text-decoration: none; }     #author-text p a:hover, #author-text p a:active,     #archived-author-text p a:hover, #archived-author-text p a:active { text-decoration: underline; }          /***** Post Archives *****/     #archived-posts { position: relative; width: 640px; }     #archived-posts .widget-head { margin: 0 11px 0 10px; border-bottom: none; }     #archived-posts ul { width: 618px; border-top: 1px solid #d9d9d9; border-left: 1px solid #d9d9d9; margin: 0 10px; }     #archived-posts li { line-height: 0; width: 308px; border-bottom: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; padding: 20px 0; float: left; }     #archived-posts li.no-articles { border: none; font: 1.4em/1.6em 'VollkornItalic', serif; background: #fff; width: 100%; margin: 0 0 0 -1px; }     .post-archive { position: relative; width: 300px; margin: 0 10px; padding: 20px 0; }     #archived-posts .post-archive { padding: 0; width: 280px; margin: 0 auto; }     #archived-posts .archive-thumb { width: 280px; }     #archived-posts .archive-thumb .hot-topic { left: 5px; bottom: 5px; }     .archive-thumb { position: relative; width: 300px; }     .archive-thumb a, .archive-thumb a:visited { display: block; width: 270px; height: 120px; border: 5px solid #f1f1f1; margin: 0 0 10px; -webkit-transition: border .2s linear; transition: border .2s linear; }     .archive-thumb a:hover, .archive-thumb a:active { -webkit-transition: border .2s linear; transition: border .2s linear; }     .video-archive-thumb .yt-thumb, .video-archive-thumb .attachment-thumbnail-archive { display: block; border: 5px solid #f1f1f1; margin: 0 0 10px; }     .archive-text, .callout-archive-text { position: relative; padding: 0 5px; }     #recent-articles .archive-text { width: 195px; margin: 0 5px 0 0; float: right; padding: 0; }     .archive-text h3 a, .archive-text h3 a:visited,     .archive-text h4 a, .archive-text h4 a:visited { color: #464646; text-decoration: none; font-size: 1.2em; line-height: 1.6em; -webkit-transition: color .2s linear; transition: color .2s linear; }     .archive-text h3 a:hover, .archive-text h3 a:active,     .archive-text h4 a:hover, .archive-text h4 a:active { -webkit-transition: color .2s linear; transition: color .2s linear; }     .archive-text p { margin: 10px 0 0; font-size: 1.2em; line-height: 1.6em; }     .archive-text .meta-data { font-size: 1.1em; line-height: 1.6em; }     .archive-text p a, .archive-text p a:visited { text-decoration: none; }     .archive-text p a:hover, .archive-text p a:active { text-decoration: underline; }     .play-archive { position: absolute; top: -110px; left: 110px; border: none !important; }     #archive-error { position: relative; width: 620px; margin: 0 10px 20px; border-top: 1px solid #d9d9d9; padding: 20px 0 0; }     #category-description { position: relative; width: 620px; margin: 0 10px 20px; }     #category-description p { font: 1.4em/1.6em 'VollkornItalic', serif; }          /***** Related Posts *****/     .rel-post { position: relative; width: 280px; margin: 0 auto; }     .rel-post-text { position: relative; width: 200px; float: right; }     .rel-post-text h4 a, .rel-post-text h4 a:visited { color: #464646; text-decoration: none; font-size: 1.1em; line-height: 1.3em; -webkit-transition: color .2s linear; transition: color .2s linear; font-weight: normal;  }     .rel-post-text h4 a:hover, .rel-post-text h4 a:active { -webkit-transition: color .2s linear; transition: color .2s linear; }     .rel-post-text p { margin: 5px 0 0; font-size: 1.1em; line-height: 1.3em; }     .rel-post-text p a, .rel-post-text p a:visited { text-decoration: none; }     .rel-post-text p a:hover, .rel-post-text p a:active { text-decoration: underline; }     .related { margin: 0 0 20px; }               /***** Contributors Page *****/     .contributors-list { position: relative; width: 620px; margin: 0 10px; }     .contributors-list li { overflow: hidden; padding: 10px; border: 1px solid #d9d9d9; margin: 0 0 20px; }     .contribute-avatar { position: relative; width: 85px; height: 85px; float: left; }     .contribute-text { position: relative; width: 493px; float: right; }     .contribute-avatar a, .contribute-avatar a:visited { display: block; width: 75px; height: 75px; border: 5px solid #f1f1f1; -webkit-transition: border .2s linear; transition: border .2s linear; }     .contribute-avatar a:hover, .contribute-avatar a:active { -webkit-transition: border .2s linear; transition: border .2s linear; }     .contribute-text h3 a, .contribute-text h3 a:visited { font-size: 1.4em; line-height: 1.5em; color: #464646; text-decoration: none; -webkit-transition: color .2s linear; transition: color .2s linear; }     .contribute-text h3 a:hover, .contribute-text h3 a:active { -webkit-transition: color .2s linear; transition: color .2s linear; }     .contribute-text p { font-size: 1.2em; line-height: 1.5em; margin: 10px 0 0; }     .contribute-text p a, .contribute-text p a:visited { text-decoration: none; }     .contribute-text p a:hover, .contribute-text p a:active { text-decoration: underline; }          /***** Form Elements *****/     .form-wrapper { position: relative; width: 620px; margin: 0 0 20px; }     .form-wrapper p { font-size: 1.2em; line-height: 1.5em; margin: 0 0 20px; }     .form-wrapper p a, .form-wrapper p a:visited { text-decoration: none; }     .form-wrapper p a:hover, .form-wrapper p a:active { text-decoration: underline; }     .form-wrapper p code { font: 90% Monaco, Courier, monospace; }     .form-field-wrapper { position: relative; display: block; margin: 0 0 20px; }     .form-wrapper label, .wpcf7 label { display: block; font-size: 1.1em; line-height: 1; font-weight: bold; text-transform: uppercase; margin: 0 0 5px; }     .form-wrapper label em, .wpcf7 label em { font-style: normal; }     .text-input { width: 280px; padding: 7px 10px; border: 5px solid #f1f1f1; font: 1.35em/1 "Helvetica Neue", Helvetica, Arial, sans-serif; color: #d9d9d9; }     .text-input:focus { color: #797979; }     .textarea-input { width: 520px; height: 250px; border: 5px solid #f1f1f1; font: 1.35em/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif; color: #d9d9d9; padding: 7px 10px; overflow: auto; }     .textarea-input:focus { color: #797979; }     .form-submit { width: 140px; height: 40px; margin: 0 0 20px; background: url(images/backgrounds/periodic-sprite-03.png) no-repeat 0 -340px; font: bold 1.1em/1 "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: uppercase; color: #797979; margin: 0 0 0 410px; }     .wpcf7 .form-submit { font-size: inherit; }     .form-submit:hover { background-position: 0 -430px; cursor: pointer; }          /***** Misc *****/     .right-arrow { padding: 0 9px 0 0; }     .scroll-top { display: block; width: 40px; height: 40px; text-indent: -9999px; background: url(images/backgrounds/periodic-sprite-03.png) no-repeat 0 -520px; }     .scroll-top:hover { background-position: 0 -610px; }     .rss { background: url(images/backgrounds/periodic-sprite.png) no-repeat 0 -658px; padding: 1px 0 2px 21px; }     .last { margin: 0 !important; }     .play-button { display: block; width: 70px; height: 70px; text-indent: -9999px; background: url(images/backgrounds/periodic-sprite-03.png) no-repeat 0 0; }     .play-button:hover { background-position: 0 -120px; }     .error-message { font-size: 1.2em; }     .divider { border-bottom: 1px solid #d9d9d9; }     .meta-info { font: 1.1em/1 'VollkornItalic', serif; display: block; color: #a5a5a5; margin: 5px 0 0 15px; }          /***** Post & Page Pagination *****/     .post-pager { border-top: 1px solid #d9d9d9; font-family: 'VollkornItalic', serif; color: #222; padding: 10px 0 0; font-size: 1.4em !important; }     .post-pager span { margin: 0 5px 0 0; }     .post-pager a { margin: 0 5px; }


title: Remove WordPress default registration client side validation?

text:
Is there a way to remove/disable WordPress default registration client side validation? I dislike the pop alert and would like to add my own client side validation visual to users. Please assist me and thank you. **Update**               (function($) {          window.onload = function() {         var form = document.getElementById('s2member-pro-paypal-registration-form');         form.onsubmit = function() {             cValidate();         }     }          function cValidate() {         var valid = true;         var content = document.getElementById('form-errors');         var msg = "Please correct the following errors:
";              var elements = [             document.getElementById('s2member-pro-paypal-registration-first-name'),             document.getElementById('s2member-pro-paypal-registration-last-name'),             document.getElementById('s2member-pro-paypal-registration-email'),             document.getElementById('s2member-pro-paypal-registration-username'),             document.getElementById('s2member-pro-paypal-registration-password1'),             document.getElementById('s2member-pro-paypal-registration-password2'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-salutation-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-job-title'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-functional-role'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-department-field'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-direct-phone'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-company-name'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-street-address'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-city-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-zcode-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-state-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-country-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-industry-id'),             document.getElementById('s2member-pro-paypal-registration-custom-reg-field-company-website'),             document.getElementById('recaptcha_response_field')         ];              if (elements[0].value == "") {             msg += "First name field is empty.
";             content.innerHTML = msg;         }         if (elements[1].value == "") {             msg += "Last name field is empty.
";             content.innerHTML = msg;         }         if (elements[2].value == "") {             msg += "Email field is empty.
";             content.innerHTML = msg;         }         if (elements[3].value == "") {             msg += "Username field is empty.
";             content.innerHTML = msg;         }         if (elements[4].value == "") {             msg += "Password name field is empty.
";             content.innerHTML = msg;         }         if (elements[5].value == "") {             msg += "Re-enter Password field field is empty.
";             content.innerHTML = msg;         }          }          })(jQuery);


title: Configure paragraph style without editing CSS

text: Is there a way to change the default text paragraph style in WP without changing CSS by hand? I.e. I need GUI for that. In particular, I want to configure padding height between paragraphs.


title: PHP 5.5, w3 Total Cache, and opcache

text: PHP5.5 has ZendOptimizer opcache built in and it seems to work pretty well and the benchmarks seem to give it a slight edge over APC in performance. Great. So APC seems to be on its way out. My question regards w3 total cache. W3TC has the option to do database and opcode caching using APC, and I had this working more or less fine with the APCu (APC user cache). Its compatibility with opcache wasn't perfect -- for example, you'd get some weird save issues if you didn't make some tweaks to cache invalidation and so forth. I'm wondering -- is it worth it at all to use APCu for user stored caches for opcache/dbcache? I turned it off and my CPU load seems a little lower and I'm wondering if I'm really accomplishing anything given that Zend opcache is already doing the heavy lifting (is it?). I prefer the more vanilla install (no APCu) as it's one less thing to worry about. But I wonder if I'm really losing any performance. Thoughts?


title: Display all images except those uploaded via OptionTree

text: I'm using the following to display all images in media library however, I'd like to exclude images uploaded via OptionTree as these are either banners or logos.               $args = array(             'post_type' => 'attachment',             'post_status' => 'published',             'posts_per_page' =>6,             'numberposts' => null,             'post_mime_type' =>'image',             'orderby' => 'rand',             'exclude'   => $my_meta_box,         );              $attachments = get_posts($args);              $post_count = count ($attachments);              if ($attachments) {         foreach ($attachments as $attachment) {         $img = wp_get_attachment_url($attachment->ID);         echo '<img class="footer-img" src="'.$img.'">';         }            }      Thanks!


title: Setting up SVN for teamwork on WordPress custom theme development

text: Amongst technical devs, it's pretty straightforward to get everyone running their own local dev server, get TortoiseSVN running, and then commit changes periodically to the repository. We can then update the version of the test site on the shared server from this repo and everyone is happy. Except the designers who are just scratching their heads. Since the designers do not have their own local development server, in order for them to preview their HTML, PHP and CSS changes to the theme, they have to upload those changes to the in-house development server, which they all share access to. Adobe's DreamWeaver provides simple file lock protection to avoid edit collisions, but that's where it ends. I would love a solution that allows them to use TortoiseSVN or DreamWeaver 6 (CS4)'s built in Subversion support. But I can't see how this would work. They would basically have to "commit" every single minute edit in order to preview it on the dev server, and this of course defeats the purpose of version control. Has anyone found a workaround for this? Is the only solution to set them all up with local webservers?


title: Custom query: how to get the sticky posts first?

text: I noticed that if I code a custom WP_Query, sticky posts don't show first in the list. So I was wandering how to achieve that. I've almost done it with 3 subsequent queries, but I guess there must be a more elegant solution for this. One thing I thinked involved at least 2 query:   * first build a simple function to reuse just to output html   * second make a query of only stiky posts, and output the html (according to a preset max items)   * third, is there's still room for new items according to max items, make a query excluding the sticky posts, and again, output html. So, it all would start like this (and then go on..):                           $max_items = 5;             $sticky_ids = get_option('sticky_posts');                  if(count($sticky_ids) != 0){                 //query degli sticky                 $sticky_soon_query = new WP_Query();                 $sticky_soon_query->query(array(                     'category_name' => 'coming-soon',                     'posts_per_page' => $max_items,                     'post__in' => $sticky_ids                 ));             }       Is there any more elegant solution?


title: Display metabox title for custom fields with values

text: I'm using multiple metabox panels in my write posts. IN my functions I'm registering multiple metaboxes:               $prefix = 'dbt_';          $meta_boxes = array();          $meta_boxes[] = array(         'id' => 'general_information',         'title' => 'General Information',         'pages' => array('post', 'page', 'link'), // multiple post types, accept custom post types         'context' => 'normal', // normal, advanced, side (optional)         'priority' => 'high', // high, low (optional)         'fields' => array(             array(                 'name' => 'Name',                 'id' => $prefix . 'name',                 'type' => 'text',                 'std' => 'default value here'             ),             array(                 'name' => 'Manufacturer',                 'id' => $prefix . 'manufacturer',                 'type' => 'text',                 'std' => ''             )          $meta_boxes[] = array(         'id' => 'measurements',         'title' => 'Measurements',         'pages' => array('post', 'page', 'link'), // multiple post types, accept custom post types         'context' => 'normal', // normal, advanced, side (optional)         'priority' => 'high', // high, low (optional)         'fields' => array(             array(                 'name' => 'Length',                 'id' => $prefix . 'length',                 'type' => 'text',                 'std' => ''             ),             array(                 'name' => 'Width',                 'id' => $prefix . 'width',                 'type' => 'text',                 'std' => ''             )          ..etc      In my theme I'm displaying the name and values of each field in each metabox group. The goal is to have fields grouped by metaboxes otherwise I would just use `get_post_custom($post_id)`. Code in single.php:               global $meta_boxes;          foreach ( $meta_boxes as $metabox ) {     echo $metabox['title'];       foreach ( $metabox['fields'] as $field ) {         $meta = get_post_meta($post->ID, $field['id'], true); //get post meta from each metabox         if(!isset($meta[0])) continue; //display only fields with values         echo $field['name'];         echo $meta ? $meta : $field['std']; //show value or default value       }     }      If for instance a metabox has no fields with values, the metabox title `$metabox['title']` still appears. How can I hide the metabox title if no values exists?


title: A better way to get stats

text: I'm not looking for an specific answer but more of a general direction. Recently I decided to make my own stats plugin. I know there are tons out there, but I wanted to make my own. I figured, how hard can it be? Just create a table, log the IP, and on every page refresh, store data in a table. The problem I'm having is that the stats seem to be too high. I've deployed my plugin on a test batch of sites with PR of ~ 1, and the plugin is showing thousands of visits, and I know there aren't that many uniques coming. Here's the entire plugin: https://gist.github.com/1469300 Here's my process visitor function.               /**       * Process visitor      *       * Checks whether used is "logged" or not,       * Adds the user to the unique table if not logged,      * adds a hit using the user_id if she is logged      *      */     function vsp_process_visitor() {          global $wpdb;          $visits_table = $wpdb->prefix . "vsp_visits";              if ( vsp_visitor_logged_in() ) {              vsp_update_count();          }              if ( !vsp_visitor_logged_in() ) {             vsp_new_record( $visits_table );          }     }      Here's the check to see if the session is set or not.               /**       * Checks user state      *       * Checks whether a user session is set      * Logged in if set      *      */     function vsp_visitor_logged_in() {          $logged_in = false;          if ( isset( $_SESSION[ 'vsp_user' ] ) ) {              $logged_in = true;          }         return $logged_in;      }      Here's the function that inserts data.               /**       * Creates new unique and hit      *       * Inserts data into the unique table and the       * hits table, if allowed.       *      */     function vsp_new_record( $table ) {          $ip = get_ip();          global $wpdb;          $hits_table = $wpdb->prefix . "vsp_hits";              /*              Insert data into the visitors table          */              $data = array ( 'ip' => $ip );              if ( valid_time($table) ) {                  $wpdb->insert ( $table, $data );              }             $userID = $wpdb->get_var( 'select `id` from ' . $table . ' where `ip` = "' . $ip . '" order by `id` desc limit 1;');             $_SESSION[ 'vsp_user' ] = $userID;                   /*              Insert data into the hits table         */                  $data = array( 'visit_id' => $userID );             if ( valid_time($hits_table) ) {                  $wpdb->insert ( $hits_table, $data );              }            }      The code is executed at a refresh. My question is, when a search robot visits my website, will it "trigger" a page refresh, and create a table in my stats database, skewing my results. ## App Logic A user comes to the site Question: Is the session set? If no, then create a session with user's IP, and add a hit and unique If yes, then add a hit with user's IP Am I missing something else?


title: Why does WordPress add 0 (zero) to an Ajax response?

text: Unless I end Ajax processing function by `exit()` or `die()`, the Ajax function receives desired and correct output but following by `0`. Any idea why is that happening? Is that meant to be like that or it could be fixed?               add_action('wp_ajax_get_homepage', 'get_homepage');     add_action('wp_ajax_nopriv_get_homepage', 'get_homepage');          function get_homepage(){         echo "get_homepage ->";         exit();     }      I've read at AJAX in Plugins, but why is that necessary?


title: Front-End Editor email notification issue

text: I'm trying to send a notification email when a user updates a page/post, either in the backend or by using the Front-End Editor. It works fine when updating in the backend but no data is emailed through when updating with the Front-End Editor. Anybody have any ideas on this please?               function __test_on_publish( $post )     {        global $post;     if( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || $post->post_status == 'auto-draft' )     return;          if ( !wp_is_post_revision( $post ) )  {         $post_title = get_the_title( $post );          $post_url = get_permalink( $post );          $aid = $post->post_author;         $user_email = get_the_author_meta('user_nicename', $aid);                $subject = 'A page has been updated';          $message = "A page has been updated on " . get_bloginfo( 'name' ). " by ".$user_email."\n\n";          $message .= $post_title. "\n\nView it: " . get_permalink( $post ) . "\n\nEdit it: " . get_edit_post_link( $post ). "\n\n";          //send email to admin               wp_mail( get_option( 'admin_email' ), $subject, $message );           }           }     add_action( 'pre_post_update', '__test_on_publish', 10, 3 );      **Edit:** I ended up adding some wp_mail functionality directly into the post.php file of Front-end Editor which seems to work well, (see below).                   function save( $data, $content ) {                /--- some original code omitted ---/              wp_update_post( (object) $postdata );              //// added ////         $post_title = get_the_title( $post_id );                 $post_tmp = get_post( $post_id );         $aid = $post_tmp->post_author;         $user_email = get_the_author_meta('user_nicename', $aid);                    $subject = 'A page has been updated by '.$user_email;          $message = "A page has been updated on " . get_bloginfo( 'name' ). " by ".$user_email."\n\n";          $message .= $post_title. "\n\nView it: " . get_permalink( $post_id ) . "\n\nEdit it: " . get_edit_post_link( $post_id ). "\n\n";          wp_mail( get_option( 'admin_email' ), $subject, $message );          }


title: search does not yield access restricted results

text: If the user is logged out and tries to search something, he is redirected to the login page. How is it possible to have the search always show all of the results (including the excerpts and the image), even if the user is logged out and the resulting pages/posts are restricted to members only? I tried using the plugin "WordPress Access Control", but that did not help.