Show pop up message for specific categoryies

1) Open your templates/content-product_cat.php file. 2) Locate the following piece of code: <li <?php wc_product_cat_class(); ?>> <?php do_action( ‘woocommerce_before_subcategory’, $category ); ?> <a href=”https://wordpress.stackexchange.com/questions/204313/<?php echo get_term_link( $category->slug,”product_cat’ ); ?>”> 3) Replace the line <a href=”https://wordpress.stackexchange.com/questions/204313/<?php echo get_term_link( $category->slug,”product_cat’ ); ?>”> for the following piece of code: <?php if ($category->name == “adults1” || $category->name == “adults2”) … Read more

Testimonials/Reviews for Products

The most frequent approach would be to create a new “review” or “testimonial” Custom Post Type (“CPT”) with a plugin or in your theme‘s functions.php file (or a new child theme‘s functons.php file, if your current theme is not custom-built), and then alter your product page template to use a secondary loop to display your … Read more

How to add a menu page for options in wordpress for user that has the role of vendor?

The third argument to add_menu_page() is $capability. add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); That governs who can see the page. You’ve registered yours as “administrator”, which is a user role. Presumably your vendors are not of that role. To fix this, you will need to change that argument to a capability (preferably … Read more

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