Limit content in excerpts to tag

Support Area Forums Elite Limit content in excerpts to tag

Viewing 7 posts - 1 through 7 (of 7 total)
URL to the page in question:
  • Author
    Posts
  • #17111
    Avatar photoJazz Lover
    Participant

    Bill, is it possible somehow to have an option limiting excerpt length not by standard character count but till <!–more–> tag in article text? As for me I manually carefully create the excerpt to make pleased teaser for visitors, and it showed in blog page just fine.

    #17112
    Avatar photoJazz Lover
    Participant

    It also be great to save formatting – ul, li, etc, ’cause sometimes there are dialogs in the beginning of the post

    #17117
    Bill Robbins
    Moderator

    You can do that. If you’ll choose the option to display the full content instead of the excerpt, it will preserve your formatting and display everything before the more tag is added. The default option is for the excerpt to be shown, but you can change that in the “Content” tab in the Theme Options page.

    For the featured post widget, it has it’s own option to choose between the content or the excerpt there.

    If you have any trouble, let me know,
    Bill

    #17122
    Avatar photoJazz Lover
    Participant

    Sorry for being unclear in descriptions. For Blog page it works fine, just as you wrote above. It show content till <!–more–> tag only. I’m happy with it.

    If I choose to show Full Content in Featured Post Widget it really show ALL content, ignoring <!–more–> tag in article text. That’s the thing I’d like to see the way it displayed on the Blog page. Practically I do not see difference between Show Excerpt and Show Content Limit options, only characters count. But every post has it’s own characters count from the beginning till <!–more–> tag. May be it possible to include such option to future release?

    #17126
    Bill Robbins
    Moderator

    Thank you for letting me know about that. WordPress has trouble with static front pages and the more tag. There’s a bit of code built into the widget that used to take care of that for us. Evidently it needs some adjustment for our new versions of WordPress. You’re welcome to go on and make the update yourself or wait for the official theme update. Here’s what you’ll want to do:

    1. Go to the Appearance section in your WordPress control panel and select Edit.
    2. From the list of files on your right, choose widget-posts.php
    3. Replace everything there with this:

      Make sure to copy the code from the support site and not via email
    4. Save your changes.

    Thanks,
    Bill

    #17128
    Avatar photoJazz Lover
    Participant

    Thanks Bill, it works just fine! You are awesome!

    For anyone who wants to use it: click “view raw” before copy!!! Otherwise you will miss some lines of code! And than you only should change options in widget to “Show Content”. Voila!
    P.S. As a bonus you don’t need to add miniatures to the posts to show images from it!

    #17130
    Bill Robbins
    Moderator

    So glad that worked for you. If you need anything else, just let me know.

    Thanks,
    Bill

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Limit content in excerpts to tag’ is closed to new replies.