Use template for posts with a particular category grandparent

Let me update your code 🙂 You don’t need to select grandparent category for your post. First we need to get grandparent category name. Here is the function; function get_grandparents_category_salgur( $id) { $parent = get_term( $id, ‘category’ ); if ( is_wp_error( $parent ) ) return $parent; if ( $parent->parent && ( $parent->parent != $parent->term_id ) … Read more

How do I provide a “show all posts” link in a paginated term archive?

This method will set it up so that if you add /all to the end of your taxonomy archives, it will show all posts. First, when registering the taxonomy, make sure you set the ep_mask to EP_CATEGORIES. This means we can add a custom endpoint to it. function wpse_277843_register_taxonomy() { register_taxonomy( ‘game_go_series’, ‘game_go’, array( ‘rewrite’ … Read more

Woocommerce custom taxonomies page

After digging all over the place, it really was as simple as adding theme support. Go figure, just add the following: //Adding theme support function mytheme_add_woocommerce_support() { add_theme_support( ‘woocommerce’ ); add_theme_support( ‘wc-product-gallery-zoom’ ); //Only if want woocommerce built in add_theme_support( ‘wc-product-gallery-lightbox’ );//Only if want woocommerce built in add_theme_support( ‘wc-product-gallery-slider’ );//Only if want woocommerce built in … Read more

Any tag pagination page (except the 1st page) loads index.php template instead of tag.php

Overall CODE issues: Your CODE is so wrong in so many ways that I shouldn’t even attempt to address them here. I suggest you study Official WordPress Theme Handbook properly before doing these sort of customizations. For the sake of the context, I’m ignoring other issues within your CODE and touching only the issues below: … Read more

How to change menu icon which is overriden (i.e. by WooCommerce) [closed]

WooCommerce styles the icon via this CSS file: woocommerce/assets/css/menu.css, and here’s the corresponding code (pretty-printed or actually, I copied it from woocommerce/assets/css/menu.scss): #adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before { font-family: ‘WooCommerce’ !important; content: ‘\e03d’; } So you can change the font-family and the content (and other) properties to suit your custom icon. Below is an example of … Read more