Support » Theme: Appointment » Custom post extract

  • Resolved g-mcfadyen

    (@g-mcfadyen)


    I am trying to add post excerpts, of a specific category, to a static page. However, using the call the_excerpt results in the extract wrapped in the homepage slider CSS. Is it possible to create an excerpt function for a child theme, that doesn’t include the homepage slider CSS?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, g-mcfadyen

    Thanks for contacting us!

    To do this, follow the given below steps:

    1. Create a child theme, ignore if already existing.
    2. Open functions.php file, and add this code at the end.
    3. Create an index-news.php file, open and add this code: https://pastebin.com/raw/Sk0sHzqG
    4. Create an index-slider.php file, open and add this code: https://pastebin.com/raw/wXyvG1Xw
    5. Save and activate it.

    Let me know for any confusion!

    Thanks
    Rishabh

    Excellent, thanks, that did the trick – because I need the same function on different static pages for different categories, I saved index-news as index-catIDX, and defined $cat as the category ID, so that for another static page I can create index-catIDZ and display different posts.

    Rishabh

    (@rishi911)

    Hi,

    Glad to help you!

    If you like our Theme & Support, rate us HERE.

    Thanks
    Rishabh

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.