How can we help?

If you are looking for support for our Poka theme, this is the place!

Home Forums PokaCasino support latest news shortcode

This topic contains 6 replies, has 2 voices, and was last updated by  Yael Harari 1 month, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1044

    Yael Harari
    Participant

    Hi! When adding the latest news shortcode, can i edit the post excerpt? or change the characters limitation in the excerpt? Thanks

    #1047

    admin
    Keymaster

    Hi Yael!

    You can override the latest_news shortcode in your child theme by copying the function latest_news() from the file sc-various.php and paste it to your functions.php of your child theme.
    After that you can change the number of words for the excerpt to the line

    '.wp_trim_words(get_the_content(),30).'

    Maybe a good idea would be to add a filter to the next version of poka for easier change of the number of words. 🙂

    • This reply was modified 1 month, 1 week ago by  admin.
    #1049

    Yael Harari
    Participant

    Hi,
    Thanks! Is there a way to edit the excerpt? It turned out that when adding shortcode to a news item (post) – you can see the shortcode in the excerpt 🙁
    Thanks

    #1050

    admin
    Keymaster

    Hi!

    What exactly do you mean by “edit the excerpt”? Every post has it’s own excerpt field that can be used in addition to a trimmed version of the content.

    Describe what exactly do you want to achieve and I’m sure we’ll find a way! 🙂

    #1051

    Yael Harari
    Participant
    This reply has been marked as private.
    #1052

    admin
    Keymaster

    Hi Yael!

    If you want to use the excerpt field inside post edit (If you can’t see it go to screen options and select “Excerpt”) then you have to change the following line in latest_news shortcode from:

    '.wp_trim_words(get_the_content(),30).'

    to:

    '.get_the_excerpt().'

    #1053

    Yael Harari
    Participant

    Worked perfectlt, thanks for your help!

    • This reply was modified 1 month, 1 week ago by  Yael Harari.
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.