Add active class to foundation 6 tabs while looping categories

Sure, you can use a counter. Just move your while loop a little higher. Something along these lines: <ul class=”tabs” data-tabs id=”example-tabs”> <?php // counter for ul.tabs $i=0; $bulletin_types = get_object_taxonomies( ‘bulletinboard’ ); foreach( $bulletin_types as $bulletin_type ) : $terms = get_terms( $bulletin_type ); foreach( $terms as $term ) : // increment each one $i++; … Read more

View tag description on page

Your $tag_id variable is not defined before use. Try a test with a fixed value in there: <p class=”klientWlasciciel”>WLASCICIEL: <?php echo ‘Tag Description: ‘ . tag_description( ‘1’ ); ?> </p> … or test the default behavior which should be the current queried tag: <p class=”klientWlasciciel”>WLASCICIEL: <?php echo ‘Tag Description: ‘ . tag_description(); ?> </p> https://codex.wordpress.org/Function_Reference/tag_description

Custom post Query and WordPress Post Query Clash

Your code: $the_query = new WP_Query( array( ‘posts_per_page’ =>’2′, ‘paged’ => $paged )); Replace With this: global $wp_query; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args = array_merge( $wp_query->query, array( ‘posts_per_page’ =>’2′,’paged’ => $paged ) ); query_posts( $args ); NOTE: This code is not tested so first backup your page.

Is “the loop” a template tag?

The Template tag is just a name chosen for a variety of function. It doesn’t really matter what you call them, and they are functions. However, the while( ) loop itself is a simple PHP feature. It uses the have_posts method of the WP_Query() class to detect whether there is any posts to display or … Read more

Customizer settings using “for” loop

You are missing _ in add_control paramater: settings. The settings parameter should be home_features_boxes_icon_’ . $i Full code here: for ( $i = 1; $i < 7; $i++ ) : $wp_customize->add_setting( ‘home_features_boxes_icon_’ . $i, array( ‘default’ => ”, ‘type’ => ‘theme_mod’, ‘capability’ => ‘edit_theme_options’, ‘sanitize_callback’ => ‘esc_html’, ) ); $wp_customize->add_control( ‘home_features_boxes_icon_’ . $i . ‘_c’, … Read more