Replace "Our Products" With Category Name


We would like to replace "Our Products" with the Category Name, I see where "Our Products" is defined in my_productlist.php

Is there a piece of code we can use instead of
<?php framemarket_grid_mp_list_products();?>

Any help would be appreciated,


  • DavidM
    • DEV MAN’s Mascot

    Hi dfathers,

    The 'Our products' string is located in a couple files but the one you're looking for would be mp_category.php, where on line 8 you'll see this:
    <h1 class="post-title"><?php _e( 'Our products', TEMPLATE_DOMAIN ) ?></h1>

    And I believe replacing that with the following should give you your product categories:

    <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
    <h1 class="post-title"><?php echo $term->name; ?></h1>

    How would that work for you?


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.