This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Add shortcode to blog teaser page

  • Creator
    Topic
  • #1681
    mattvd
    Member

    Hi there. I have this sharing plugin that shows on all blog pages (once a user clicks on that blog to view it)

    However, I’d like the plugin to show up on the general blog page so a user doesn’t have to click into the blog to share it. You can see here http://ugly.thirstyagent.com/blog

    I’d like to display this shortcode
    [socialpop /]
    On every blog teaser that is displayed on the blog page.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #1688
    Jason Bobich
    Keymaster

    Hello,

    Currently you have your post list (your blog) setup to show excerpts. In WordPress, excerpts do not include your shortcodes. The theme gives you an option to choose whether you want to show full content or excerpts. It sounds likes that’s what you want to change.

    Appearance > Theme Options > Content > Primary Posts Display > Show full content or excerpts?

    #1754
    mattvd
    Member

    Thanks for the response. I’d still like to only show an excerpt from the blog, as showing the full blog page on the /blog page would be too much content. How can I show still just an excerpt with the shortcode included?

    thanks

    #1760
    Jason Bobich
    Keymaster

    When you’re displaying the “full content” option, this is fairly common in displaying a classic blogroll. The way WordPress is setup, is you’re supposed to use the tag within your post where ever you want it to be cut off over in the blogroll.

    http://codex.wordpress.org/Customizing_the_Read_More#Having_a_custom_text_for_each_post

    Alternatively, WordPress does not process shortcodes in the_excerpt function. This is nothing specific to the theme. So unless you want to add this functionality via customization, this is not going to be possible.

    I suppose you could do it theoretically from your Child theme’s functions.php like this:

    add_filter('the_excerpt', 'do_shortcode');
Viewing 3 replies - 1 through 3 (of 3 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.