Additional Sidebar

Your function seems fine and it’s probably hooked on init : add_action(‘init’,’blankslate_widgets_init’) function blankslate_widgets_init() { //code } But in your theme you probably want to add some checking : <?php if (is_active_sidebar(‘left-sidebar’)) dynamic_sidebar(‘left-sidebar’); ?> I would use left-sidebar instead left_sidebar as sidebar ID perhaps.

Highlight main menu when on specific posts or pages

As noted in comments above, the OP’s code generates malformed CSS. Per request, here is corrected code. It should help solve part of the issue (or prevent other issues) but I doubt it solves all of it. function blog_link_genesis() { if( is_single() || in_category(‘investors’) || is_page( array(4, 30))) { $current=”#header #nav #menu-item-133 a”; ?> <style … Read more

If no input don’t display?

<?php $bath=get_post_meta($post->ID, ‘wtf_bath’, true); if(!empty($bath) ) { ?> <div class=”propslist”><span>Băi – </span> <span class=”propval”> <?php echo $bath; ?></span></div> <?php } ?> Do something like this for each div !.. only display div if the data to be displayed in div is not empty !

Can’t change excerpt length and more tag

excerpt_length filter does not work on manually added filter so you use wp_trim_excerpt function, you can develop code same as following to achieve it. <?php if( has_excerpt() ){ the_excerpt(); } else { wp_trim_excerpt(); } ?> excerpt_more does not work on WordPress version 2.8.x and Older for those versions you have to use following filter. <?php … Read more

I want to split this into two functions

You can separate it into two functions by using following code : <?php add_action(‘tmpl_detail_page_custom_fields_collection’,’custom_fields_colletion’); /* Name : custom_fields_colletion Desc : Return the custom fields collection for detail/single page */ function custom_fields_colletion() { global $wpdb,$post,$detail_post_type; $detail_post_type = $post->post_type; if(isset($_REQUEST[‘pid’]) && $_REQUEST[‘pid’]) { $cus_post_type = get_post_type($_REQUEST[‘pid’]); $PostTypeObject = get_post_type_object($cus_post_type); $PostTypeLabelName = $PostTypeObject->labels->name; $single_pos_id = $_REQUEST[‘pid’]; } else … Read more

Metabox Input Not saving

Look at this code: update_post_meta( $post_id, ‘owl_mb_content’, strip_tags( $_POST[‘owl_mb_content_one’] ) ); update_post_meta( $post_id, ‘owl_mb_title’, strip_tags( $_POST[‘owl_mb_title_one’] ) ); update_post_meta( $post_id, ‘owl_mb_content’, strip_tags( $_POST[‘owl_mb_content_two’] ) ); update_post_meta( $post_id, ‘owl_mb_title’, strip_tags( $_POST[‘owl_mb_title_two’] ) ); update_post_meta( $post_id, ‘owl_mb_content’, strip_tags( $_POST[‘owl_mb_content_three’] ) ); update_post_meta( $post_id, ‘owl_mb_title’, strip_tags( $_POST[‘owl_mb_title_three’] ) ); The second value is the key. Each update overwrites … Read more