Add Read More Link under Product Title on Product Page

This topic has 12 replies, 3 voices, and was last updated 9 years, 7 months ago ago by Eva Kemp

  • Avatar: Jimbo
    Jimbo
    Participant
    April 10, 2015 at 17:57

    hi there,

    How can I add a read more link or the short description (post_excerpt) under products titles on products shop page?

    Is this in the content-product.php file or can be added via functions?

    Many thanks

    11 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    April 12, 2015 at 09:01

    Hello,

    You can enable product excerpt using this code in custom.css:

    .products-grid .product-title {
        position: static !important;
    }
    .products-grid .product-excerpt {
        display: block !important;
    }

    Regards,
    Eva Kemp.

    Avatar: Jimbo
    Jimbo
    Participant
    April 12, 2015 at 18:38

    Thanks Eva,

    How would I limit the excerpt length? I would like to say have 10 words and then a read more link.

    Thank you very much

    Avatar: Jimbo
    Jimbo
    Participant
    April 13, 2015 at 14:37

    Is there any way just to have read more link for the excerpt?

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 13, 2015 at 15:34

    You may try to add following code in to the content-product.php after this line<?php echo do_shortcode(get_the_excerpt()); ?>:

    <a style="color:white;" href="<?php the_permalink(); ?>"> <div class="button medium">Read more</div></a>

    With best regards
    Brian Johnson

    Avatar: Jimbo
    Jimbo
    Participant
    April 13, 2015 at 16:22

    Brian,

    thanks, so would I use Eva’s code as well yes.

    How about if I just wanted read more as just a text link?

    thank you guys!

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 13, 2015 at 16:28

    You are welcome!

    Please clarify your requset with more details. If i understand you well please add this code instead of previous:
    <a style="color:black" href="<?php the_permalink(); ?>"> Read more</a>

    With best regards
    Brian Johnson

    Avatar: Jimbo
    Jimbo
    Participant
    April 13, 2015 at 17:48

    Rather than have full (short description) of product on products page (excerpt)

    Just have read more link under the title, so it would be like this:

    Product image
    Product title
    Read more (link)
    Price

    Thanks

    Avatar: Jimbo
    Jimbo
    Participant
    April 13, 2015 at 18:58

    I tried adding the codes and no read more link appears, just the short product description (excerpt) ?

    Avatar: Eva
    Eva Kemp
    Support staff
    April 14, 2015 at 10:17

    Hello,

    Please take our apologies but Products page is configured by Woocommerce and you’d better contact them concerning your query. Also you can refer to this article:
    http://codex.wordpress.org/Excerpt

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Jimbo
    Jimbo
    Participant
    April 14, 2015 at 14:17

    Ok I will read that, but is that the same for woocommerce product short description?

    Avatar: Eva
    Eva Kemp
    Support staff
    April 14, 2015 at 14:23

    Hello,

    Yes, it should work for woocommerce product excerpt as well.

    Regards,
    Eva Kemp.

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

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

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