Sidebar Categories change arrow when subcategories are shown on click

I added these lines: $(this).removeClass(‘ic-arrdn’).addClass(‘ic-arrup’); $(this).removeClass(‘ic-arrdn’).addClass(‘ic-arrup’); and achieved the result. $(document).ready(function () { $(“aside ul li:has(ul)”).addClass(“ic-arrdn”); var e = $(“aside > ul > li.current-cat, aside > ul > li.current-cat-parent”); if (e.length == 1) { } $(“aside > ul > li > ul.children”).each(function () { $(this).find(“li”) $(this).parent().toggle(function () { $(this).find(“ul”).slideDown(); $(this).removeClass(‘ic-arrdn’).addClass(‘ic-arrup’); }, function () { $(this).find(“ul”).slideUp(); … Read more

exclude parents from the_terms

use get_the_terms instead and exclude any terms where parent value is 0, which means it is a top-level term. $terms = get_the_terms( $post->ID, ‘portfolio-type’ ); if ( !empty( $terms ) ) { $output = array(); foreach ( $terms as $term ){ if( 0 != $term->parent ) $output[] = ‘<a href=”‘ . get_term_link( $term ) .'”>’ … Read more

(WordPress) How to get custom taxonomy parent name?

Using two nested foreach you prevent n+1 db queries, where n is the number of child terms: <?php $_cats = array(); $args = array( ‘orderby’ => ‘id’, ‘order’ => ‘ASC’, ‘taxonomy’ => ‘album’ ); $categories = get_categories($args); if ( ! empty($categories) ) { foreach( $categories as $category ) { if ( $category->parent != 0 ) … Read more

display certain category on custom template page

You should not use category parameter to query custom taxonomy instead you should use tax_query parameter or directly custom taxonomy name as shown in the following query. query_posts( array( ‘post_type’ => ‘ublalfieportfolio’, ‘ublalfieportfolio-categories’ => ‘parketten’, ‘posts_per_page’ => -1) ); Refer this page to know how to use custom taxonomy parameter in custom query.

Twenty Eleven Theme [duplicate]

Add <?php get_sidebar(); ?> to single.php in the same place as the other files, i.e. right before <?php get_footer(); ?> You also need to go to style.css, and remove the margins for .singular and .singular #content, .left-sidebar.singular #content. In version 1.5 of this theme css only has, .singular #content, .left-sidebar.singular #content Plus you need to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)