WordPress.org

Ready to get started?Download WordPress

Forums

Special Recent Posts
[resolved] Custom Excerpt Display (19 posts)

  1. riomurphy
    Member
    Posted 2 years ago #

    The prior version allowed me to use the shortcode and display recent posts with thumbnails and custom excerpts. (See http://masterful-marketing.com/ home page bottom).

    When I upgraded, no matter what I tried, it didn't pull the excerpt. When I use it as a widget, not as big a deal because I normally don't use excerpts but on the pages using the shortcode, I want to use the excerpt I write so it makes sense.

    I used:

    post_content_length_mode='fullexcerpt'
    post_content_mode='titleexcerpt'

    in the shortcode (along with other options which worked like thumbnail height and width and date).

    Did I miss something?

    Thanks

    http://wordpress.org/extend/plugins/special-recent-posts/

  2. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

    Ok can you please paste here the full shortcode? Version 1.9.5 has a new set of shortcode options but it still mantain a backward compatibility with theold shortcodes options.

  3. riomurphy
    Member
    Posted 2 years ago #

    Hi Luca,

    Sure. Here's the original that when the plugin updated didn't show the excerpt:

    [srp srp_number_post_option='3' srp_widget_title_hide_option='yes' srp_thumbnail_option='yes' srp_wdg_title_length_mode='fulltitle' srp_wdg_excerpt_length_mode='fullexcerpt']

    So I redid it with the new options as follows:

    [srp post_limit='3' widget_title_hide='yes' display_thumbnail='yes' thumbnail_width='150' thumbnail_height='150' post_content_type='excerpt' post_content_length_mode='fullexcerpt' post_title_length_mode='fulltitle' post_content_mode='titleexcerpt' string_break='More »' date_format='F j, Y']

    Everything seems to be working except the excerpt.

    thanks for your quick response!

  4. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

    Ok i think i got it:
    version 1.9.5 has introduced a new option which lets you choose whether or not to display post content or post excerpt in the output list.
    By default this value is set to "post content". Thus, in your case, you need to add an extra parameter to your shortcode, like this:

    'post_content_type' = 'excerpt'

    Let me know if this works :)

  5. riomurphy
    Member
    Posted 2 years ago #

    Hi Luca,

    I included that option in the updated version - it's in the 2nd line if you look in the last post from me. It still didn't work.

    Do I need to put '' around the option itself or just the value?

  6. BaronHigbee
    Member
    Posted 2 years ago #

    Having the same problem, and as far as I can tell it's due to post_content_length_mode='fullexcerpt'. All of the others options for post_content_length_mode work fine but 'fullexcerpt' is outputting nothing; i.e. no custom excerpts.

  7. BaronHigbee
    Member
    Posted 2 years ago #

    Additionally -

    In the Widget version under "POSTS OPTIONS > Select Post Content Type", there is an option for "Post Excerpt" however under "POSTS OPTIONS > Cut Post Content After" there is no option for "Full Excerpt".

    Hope those things help narrow down the bugs! I love this plugin, and tho I'll have to rework everything I've integrated, the added options are awesome :D

  8. BaronHigbee
    Member
    Posted 2 years ago #

    More info after additional testing -

    WIDGET >
    Using "Post Excerpt" and "Use the full content" DOES give out the entire excerpt BUT it ignores any special characters or HTML, so the customization is gone.

    SHORTCODE >
    I took a stab at using 'fullcontent' instead of 'fullexcerpt' for the content length mode and was able to at least reproduce the way the widget behaves, however still no special characters or HTML.

    So -

    post_content_length_mode='fullexcerpt'
    > DOES NOT WORK; i.e. displays nothing

    post_content_length_mode='fullcontent'
    > WORKS BUT IGNORES ALL SPECIAL FORMATTING

  9. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

    Ok my fault :)
    there is an error on the documentation.

    The correct value is post_content_length_mode is 'fullcontent' and not 'fullexcerpt' anymore.

    so the working shortcode should be
    [srp post_content_type='excerpt' post_content_length_mode='fullcontent']

    with all the other options you like. Please guys let me know this issue is resolved. I'll provide to modify the documentation soon.
    Sorry about this.

  10. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

    In the excerpt visualization there can't be html characters.

  11. BaronHigbee
    Member
    Posted 2 years ago #

    Sure there can :) I use it in other functions I've written. SRP let me pass them all the way through the last version, but no longer.

    My guess would be you changed the syntax ' $post->post_excerpt ' to ' the_excerpt() '. That function cleans out the HTML, but the variable does not.

    I can always mod it if you won't be adding that back in, but it was a really nice part of the SRP functionality imo. Can you point me in the new direction of that bit of code, or do I have to dig? ;)

  12. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

    The thing i don't understand, and you will excuse me for that, is what the hell you're trying to achieve. Do you want html tags in the excerpt or not? :)

  13. BaronHigbee
    Member
    Posted 2 years ago #

    Ah sry for the confusion...

    Yes, I want functional HTML tags in my excerpts.

  14. riomurphy
    Member
    Posted 2 years ago #

    Thanks Luca, my stuff works now! Phew!!!

    As for functional HTML tags, I personally don't use them much on my site but a few of my clients do. I also noted that my excerpts in the archives and main index do keep the formatting if it is there.

    But I can upgrade now!

    Cheers

  15. Luca Grandicelli
    Member
    Plugin Author

    Posted 2 years ago #

  16. riomurphy
    Member
    Posted 1 year ago #

    Luca,

    Not sure what you want. I use the shortcode on my home page of my site. However, if you look at my home page (www.masterful-marketing.com) you will see the excerpts. The only one that has an html tag is the recent one (http://masterful-marketing.com/relationship-marketing/) where I put around the first sentence. If you look at the blog main index page, you will see the italics. They don't show on the home page.

    If you want something else, let me know.

    thanks,

  17. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    @riomorphy Thanx. So basically the same shortcode displays html tags on the blog homepage, but not on the main homepage?

  18. riomurphy
    Member
    Posted 1 year ago #

    Hi Luca,

    No I'm sorry - I didn't mean to imply that I used the plugin for my blog homepage - just that the excerpt shows the html tags if they are inserted and I don't use any excerpt plugins.

    My main index page uses: <?php the_excerpt(); ?> which shows the html if present. The plugin shortcode does not.

    I do have a few clients that use some html (bold, italic) in the excerpt that would be good to show.

    But I can upgrade my sites now that I know how to recreate the short code.

    Thanks!

  19. Luca Grandicelli
    Member
    Plugin Author

    Posted 1 year ago #

    Ok closing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic