Not display an image of category of custom post

First of all $category->$term_id is wrong use $category->term_id I don’t think $category->$term_id will give you the desired result For this you must have create some meta for the image in the backend. term_image_id = get_term_meta( $category->term_id, ‘your-term-id’, true ); Here the term id is $category->term_id and the term value is your-term-id Can you please check … Read more

How to add a template – so that i can choose a different menu for some pages

You can add a new template with a different header. <?php /* Template Name: CustomPageT1 */ ?> <?php //different header for different menu get_header(‘header_name’); ?> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <?php // Start the loop. while ( have_posts() ) : the_post(); // Include the page content template. get_template_part( ‘template-parts/content’, ‘page’ ); // If … Read more

Parent category as WOOCommerce Categories widget title

Try this it works for me. Place this code in your theme functions.php file. function dynamic_product_category_widget($title, $widet_instance, $widget_id) { if ( $widget_id !== ‘woocommerce_product_categories’ ) return $title; if ( is_product_category() ) { $cat_title = single_cat_title(‘<p class=”widget-title footer-widget”>’, ‘</p>’); return $cat_title; } elseif ( is_product() ) { $cat = get_the_terms( $product->ID, ‘product_cat’ ); foreach ($cat as … Read more

Create survey that redirects to sidebar menu customized to answers

The wordpress plugin archive offers a lot of options for this kind of topic. You should read the explanations and documentation of the plugin. Here are the plugins I would recommend to you; https://wordpress.org/plugins/formidable/ https://wordpress.org/plugins/quiz-master-next/ https://wordpress.org/plugins/wp-polls/ https://wordpress.org/plugins/social-polls-by-opinionstage/ https://wordpress.org/plugins/yop-poll/