Product Title change the category title - by danghaitrieu91

This topic has 8 replies, 3 voices, and was last updated 7 years, 10 months ago ago by Robert Hall

  • Avatar: danghaitrieu91
    danghaitrieu91
    Participant
    May 26, 2016 at 04:28

    Hello,
    My website, Product title change to category title for all product!
    Please view the Private Content.

    Thanks

    Please, contact administrator
    for this information.
    7 Answers
    Avatar: stan
    Stan Russell
    Participant
    May 26, 2016 at 07:31

    Hello danghaitrieu91,

    we are sorry but your request is unclear for us. Please describe it with more details. Thank you for understanding.

    Regards,
    Stan Russell.

    Avatar: danghaitrieu91
    danghaitrieu91
    Participant
    May 26, 2016 at 08:08

    Hello Stan Russell,

    When I update from version 1.9.2 to 3.0, I encountered a problem as follows:

    The <h1 class = “title”> the product has changed from the product name to display the name of the Category!

    Example:
    v1.9.2: http://image.prntscr.com/image/62c5697dfd1c42f2b43e4cbdc7ea4139.png
    v3.0: http://image.prntscr.com/image/b2709e5ffbf9489e8012e1f170a3b3b0.png

    Thanks

    Avatar: Robert Hall
    Robert Hall
    Support staff
    May 26, 2016 at 08:48

    Hello,

    Please provide us with wp-admin and FTP credentials in Private Content.

    Regards,
    Robert Hall

    Avatar: danghaitrieu91
    danghaitrieu91
    Participant
    May 26, 2016 at 09:01

    Hello Robert Hall,

    I think it is not necessary! All versions of the Legenda v3.x 1 errors were the same!
    Even in your Demo version: https://www.8theme.com/demo/legenda/shop/chateau-milan-2006/

    (http://image.prntscr.com/image/43ac545757ac4c7cb769e7e1b480e400.png)

    If you go back to version v1.9.2, will display the word “SHOP”: Château Milan 2006

    How will it show Product Title instead “SHOP”?

    Thanks

    Avatar: Robert Hall
    Robert Hall
    Support staff
    May 26, 2016 at 09:42

    Yes, the code was changed in new theme files.

    To change it you need edit \wp-content\themes\legenda\framework\theme-functions.php file on line 4761

    Find this code <h1 class="title"><span><?php woocommerce_page_title(); ?></span></h1>
    and replace to the following
    <h1 class="title"><span><?php echo get_the_title($postspage_id); ?></span></h1>

    Regards,
    Robert Hall

    Avatar: danghaitrieu91
    danghaitrieu91
    Participant
    May 27, 2016 at 05:05

    Hello Robert Hall,

    It’s a very good way! It makes Product titile displays correct.
    However, it caused a serious error for Category Title. It uses the top Product title for Category title

    How in the Product Page – It will display Product title,
    And Category Page (eg “SHOP”) – It will display Category title ?

    http://image.prntscr.com/image/1d4a20cf4c9e4e449eec145c22a928ec.png

    http://image.prntscr.com/image/59938d266fd44e1699d8373022b2ea11.png

    Thanks

    Avatar: Robert Hall
    Robert Hall
    Support staff
    May 27, 2016 at 07:44

    Hello,

    Ok, please try to replace the code above to

    <?php if ( is_single() ) : ?>
        <h1 class="title"><span><?php echo get_the_title($postspage_id); ?></span></h1>
      <?php else : ?>                    
        <h1 class="title"><span><?php woocommerce_page_title(); ?></span></h1>
    <?php endif; ?>

    It should be like at screenshot: https://gyazo.com/06941e9987ffcd8cd1485d20f38ec1e6

    Regards,
    Robert Hall

  • Viewing 8 results - 1 through 8 (of 8 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.