Product subtitle - by jobo9967 - on WordPress WooCommerce support

This topic has 9 replies, 3 voices, and was last updated 7 years, 6 months ago ago by Olga Barlow

  • Avatar: jobo9967
    jobo9967
    Participant
    October 6, 2016 at 11:16

    I have installed plugin for product subtitle

    It’s called WooCommerce Product Subtitle (https://wordpress.org/plugins/wc-product-subtitle/)

    It’s adding the subtitle but with your theme I’m not able to place in the exact spot.
    No matter if I select to add the subtitle above or below the title it will show up on the right.

    I’m trying to achieve something like on the screenshot
    Would you point me to the right direction?

    https://www.dropbox.com/s/cz594jzv0pzhtmg/Screen%20Shot%202016-10-06%20at%2011.02.35.jpg?dl=0

    Thanks

    8 Answers
    Avatar: jobo9967
    jobo9967
    Participant
    October 6, 2016 at 11:26
    Avatar: 8theme
    8theme
    Support staff
    October 6, 2016 at 13:23

    Hello,

    Our product page structure is a bit different from standard WooCommerce that this plugin is developed for. So you probably need to add a code for the subtitle manually to the file xstore/woocommerce/global/breadcrumb.php

    Regards

    Avatar: jobo9967
    jobo9967
    Participant
    October 8, 2016 at 19:28

    Great. Thanks for that
    I’ve added the subtitle within the product pages.
    The problem now is that shop page is showing the 1st product subtitle?
    Any idea?

    Thanks for your help

    Avatar: 8theme
    8theme
    Support staff
    October 10, 2016 at 09:08

    Hi,

    You need to wrap your code that displays this subtitle in a PHP IF_ELSE statement like this:

    <?php if( is_singular('product') ) {
    echo $subtitle; // function that shows the subtitle
    } ?>

    Regards

    Avatar: jobo9967
    jobo9967
    Participant
    October 10, 2016 at 09:47

    If I make it

    <?php if( is_singular('product') ) {
    echo $subtitle; // function that shows the subtitle
    } ?>
       <h2 class="product-subtitle">
       <?php echo do_shortcode(' [wc-ps tag="p"]'); ?>	
       </h2>	
    <?php endif; ?>

    it breaks the shop

    Avatar: 8theme
    8theme
    Support staff
    October 10, 2016 at 10:01

    Make it this way

    <?php if( is_singular('product') ): ?>
       <h2 class="product-subtitle">
       <?php echo do_shortcode(' [wc-ps tag="p"]'); ?>	
       </h2>	
    <?php endif; ?>
    Avatar: jobo9967
    jobo9967
    Participant
    October 10, 2016 at 12:48

    Great
    Thanks a mill

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    October 10, 2016 at 13:01

    You are welcome!

    Regards

  • Viewing 9 results - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.