Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category

Well, I do not know if this is quite OK, but is returning the expected results … so at the moment this it is enough for me. function my_custom_get_terms( $my_tax, $my_category, $show_all = true ){ global $wpdb; global $pagename; $query = “SELECT Count(wp_posts.ID) AS my_term_count, wp_term_taxonomy.term_taxonomy_id, wp_term_taxonomy.taxonomy, wp_terms.name, wp_terms.term_id, wp_terms.slug AS term_slug, wp_terms.term_group, wp_terms_1.slug FROM … Read more

Enclosing Shortcode not working in a Template

The shortcode wraps something in header tags. For the shortcode to work you need to provide that something. Your code above works fine, you just need to set $content=”My header text”; prior to echoing the shortcode in your template. currently you are not wrapping anything in the header tags. But you shouldn’t need to use … Read more

Trouble in creating a custom template on twentyeleven theme

you need to correct the automatically added body_class .singular to get the layout; for instance use this in functions.php of your child theme (which you should have created to work from): add_filter(‘body_class’, ‘pagetemplate_adjust_body_class’, 20, 2); function pagetemplate_adjust_body_class($wp_classes, $extra_classes) { if( is_page_template(‘new-sidebar-page-template-file-name.php’) ) : // Filter the body classes foreach($wp_classes as $key => $value) { if … Read more