Category : categories

As the title says: I need to hide some products, only make them visible and available to wholesaler accounts. It is important that the products are not accessible or visible to other users or guest, and even more important that Search Engines will/cant index these products, until they are moved to a "released products" category. ..

Read more

I created a custom field in the category creation/edition page using this code: // Product Cat Create Page function product_cat_new_field_create_page() { ?> <div class="form-field"> <label for="product_cat_singular"><?php _e(‘Singular Name’, ‘wh’); ?></label> <input type="text" name="product_cat_singular" id="product_cat_singular"> </div> <?php } // Product Cat Edit Page function product_cat_new_field_edit_page($term) { // Getting term ID $term_id = $term->term_id; // Retrieve the ..

Read more

The function get_categories() display the category´s name on the nav. function get_categories(){ $query = query("SELECT * FROM categories "); $result = query("SELECT * FROM products WHERE product_category_id =" . escape_string($_GET[‘id’]) . " "); $count_cat = $result->num_rows; while($row = fetch_array($query)) { $cat_links = <<<DELIMITER <li class="list-group-item"> <a href="category.php?id={$row[‘cat_id’]}">{$row[‘cat_title’]} </a> <span class="">{$count_cat} </span></li> DELIMITER; echo $cat_links; } ..

Read more

I have the below code on the archive.php page(I haven’t changed anything). <?php /** * The template for displaying archive pages * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package customPostDemo */ get_header(); ?> <main id="primary" class="site-main"> <?php if ( have_posts() ) : ?> <header class="page-header"> <?php the_archive_title( ‘<h1 class="page-title">’, ‘</h1>’ ); the_archive_description( ‘<div class="archive-description">’, ‘</div>’ ); ..

Read more