Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] Having trouble with the BLOG addon

Home Forums Support Having trouble with the BLOG addon

  • This topic has 5 replies, 2 voices, and was last updated 3 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #434214
    Cindy

    Hi again, I’m stumped with this one, I’ve been using a plugin called Ultimate Posts Widget to display certain custom posts throughout my site – in some cases I need to have a longer excerpt and in others a shorter one, and with this plugin I’m able to set them on a case by case basis.

    When I turn on the Blog addon in GP, GP’s custom excerpt length takes over what I have set individually in the widgets (and displays an extra ‘read more’ link unless I turn one of them off). If I turn off the Blog addon, then I have to turn off the featured image on every single page, and I lose any formatting I’ve set on my archive pages, so then I’d have to create new archive pages.

    I’m thinking the best (easiest for me lol) way to deal with this is to keep the Blog addon enabled, and somehow disable the excerpt length that GP is setting – at least for a couple of my custom post types that I need to set individually. Or any query that’s coming from the Ultimate Posts Widget plugin. Is there any possible way to do that? Or if you have any ideas that would help, thanks!

    GP Premium 1.5.5
    #434329
    Tom
    Lead Developer
    Lead Developer

    Hi Cindy,

    Technically, that plugin should remove any filters like the excerpt length and read more link for its specific page. That’s how WP Show Posts works.

    You can disable these yourself globally with a little PHP:

    add_action( 'after_setup_theme', 'tu_remove_blog_filters' );
    function tu_remove_blog_filters() {
        remove_filter( 'excerpt_length', 'generate_excerpt_length', 15 );
        remove_filter( 'excerpt_more', 'generate_blog_excerpt_more', 15 );
        remove_filter( 'the_content_more_link', 'generate_blog_content_more', 15 );
    }
    #434946
    Cindy

    Oh that’s your plugin, I actually installed the free version and I like the way it works. I looked at the pro version video but couldn’t see if it had customizable templates? If that’s an option I’ll buy it! 🙂

    Thanks for the code in the meantime, I actually tried something similar but it didn’t work, maybe I didn’t do a high enough priority number.

    #435127
    Tom
    Lead Developer
    Lead Developer

    No templates currently, but one day!

    No problem at all – let me know if you need more help 🙂

    #435203
    Cindy

    Thanks again! And please let me know if you ever do templates on that plugin. 🙂

    #435295
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.