Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #599632

    geekgoddess
    Participant

    Hi, I’ve done a search of other forum posts regarding the “get_the_excerpt” WP function, but they all seemed to deal with the “recent posts” shortcode you created.

    I’m not using that. Instead I’ve created a masonry post grid and am wanting to list the excerpt as part of the post in the grid. If I use “get_the_excerpt” on a post created in the regular WP editor, I get the excerpt fine. However, if I use it on a post created in Cornerstone, nothing shows at all. I changed it to “get_the_content” just to see what it would show, and for the posts created outside of Cornerstone it shows the entire post text (of course), but for the posts created in Cornerstone, it shows all the markup that appears if you go out of Cornerstone and go back to text.

    I’ve tried to look through the x theme core files to see what the difference is when I list the posts regularly (not in my custom coding), but you’re using “get_the_excerpt” also. I’m guessing there is something I have to pull in from Cornerstone or somewhere where you are parsing out the text elsewhere.

    Can you please tell me what I have to include so I can get the excerpt when the post was created in Cornerstone? This doesn’t just affect my own script. There is another VC plugin we’re currently using that creates a masonry grid and the excerpts come up empty for that plugin also. (My impetus in writing my own script was because we want to get rid of anywhere we’re using VC).

    #599823

    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    HTML and shortcodes are going to stripped out by wordpress when generating excerpt as plain text. Since you’re using cornerstone, your content are wrapped with shortcode thus the generated content is empty.

    With that, wordpress provided a feature where you can add your plain excerpt manually. You can do that by editing your post, then go to Screen Options on he very top of your post, then enable Excerpt. Then scroll down until you find excerpt section where you can input texts manually.

    Thanks.

    #600546

    geekgoddess
    Participant

    Thanks for that — but how is it the excerpt is displayed properly when I go to the regular posts home page? I didn’t create an excerpt for the post I did in Cornerstone, yet the excerpt is displayed there properly. How are you doing that?

    #600699

    Rad
    Moderator

    Hi there,

    I’m not sure about your question, are you referring to blog home page? Would you mind providing the url?

    Please note that all excerpt or full content are in control by wordpress. X theme only uses the final generated content by wordpress. Unless it’s a custom query which need alteration of content.

    Thanks.