• Resolved Marvin Borisch

    (@marvin-borisch)


    First of all, thank you for the nice plugin. It is indeed very helpfull and a nice, lightweight alternative to the official plugin.

    I was wondering how to call the Brand name in the archive-product.php. I couldn’t find a solution in the support forum.

    My current markup looks like this

    <header class="col-md-12 archive-header clear">
    	<?php if(is_product_category()) : ?>
    	    <h1 class="archive-title"><?php single_cat_title('', false); ?></h1>
    		<div class="description expandable">
    <?php echo category_description(); ?></div>
    		<?php  else: ?>
    	    <h1 class="archive-title">Product overview</h1>
    	<?php endif; ?>
    </header>

    It would be nice if you could tell me what I am missing or if I am just being stupid ??

    Thank you in advance,
    Marv

    • This topic was modified 7 years, 1 month ago by Marvin Borisch. Reason: typo
    • This topic was modified 7 years, 1 month ago by Marvin Borisch. Reason: typo
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi Marvin.

    You can try something like this:

    
    if( is_tax( 'pwb-brand' ) ){
      //current page is a brand archive page
      $queried_object = get_queried_object();
      echo '<h1> Brand name: ' . $queried_object->name . '</h1>';
    }
    

    ??

    Thread Starter Marvin Borisch

    (@marvin-borisch)

    Perfect,

    thank you very much, this was really helpful and worked without any problem.
    You rock,

    thanks for the plugin <3
    Marv

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Brand Name in archive-product.php’ is closed to new replies.