is_tax() conditional tag not working

I found the solution to this, the is_tax(); method needs two arguments – the taxonomy and the term itself, so it should have been: is_tax(‘news_categories’, ‘web’) Just as an extra point the is_archive(‘sites’) should also have been is_post_type_archive(‘sites’)

How to replace home link anchor text with image

Your question is much more like a CSS question. The anchor a by default is display as inline. So it doesn’t have height and width unless text, image etc inside with finite dimension. To make it work, just add display:block; to the css so it expands to match the parent container. li.trail-begin { display: inline-block; … Read more

WordPress change wp_nav_menu walker with a custom one

In general you’d add child substitutions for the relevant templates if possible, as Tom mentions in the comments. Alternately, you can use a wp_nav_menu_args filter hook to swap in your own arguments prior to WordPress retrieving and rendering the menu: add_filter( ‘wp_get_nav_menu_args’, ‘wpse406010_primary_nav_menu_args’ ); function wpse406010_primary_nav_menu_args( $args ) { if( $args[ ‘theme_location’ ] !== ‘primary’ … Read more

Faceted Navigation in WordPress

When using multiple taxonomies (even more than only the built-in Category and Tag taxonomies), many people use [the Taxonomy Drill-Down plugin][1]. It offers a nice drill-down widget which user can use to navigate your site. The plugin used to be called “Query Multiple Taxonomies” because it offered support for multiple taxonomies in queries, but that … Read more

only show children of a nav menu

Here you have the solution <ul> <?php $children = wp_list_pages(‘title_li=&child_of=”.$post->ID.”&echo=0’); $subpages = ($post->post_parent) ? wp_list_pages(‘title_li=&child_of=”.$post->post_parent.”&echo=0’) : wp_list_pages(‘title_li=&child_of=”.$post->ID.”&echo=0’) ; if ($children) { ?> <li><?php echo $children; ?></li> <?php } else { ?> <?php echo $subpages; ?> <?php } ?> <?php wp_reset_query() ?> </ul> I used it to make a menu where the case was something like: … Read more

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