• Resolved steffenk10

    (@steffenk10)


    AE doesn’t appear to work within the theme PenNews at our website. Is there any fix for this? Thanks so much.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi,

    That specific page is a single post page. Excerpts are shown in listings, single post pages show full content.

    For example the category archives (https://worldfamilyeducation.com/category/international-schools/). But they are not applied on the archives at the moment, is the plugin enabled?

    It’s not a free theme so we’re unable to test it out ourselves, but I can contact the author of the theme and ask if they are willing to send over a copy for testing purposes.

    Thread Starter steffenk10

    (@steffenk10)

    Thank you so much for the reply! This is the page where I want the excerpt to show up: https://worldfamilyeducation.com/category/resource-ratings/reading/

    Yes, the plugin is enabled.

    I have found another forum with others having a similar issue with the PenNews theme and AE.

    Plugin Author WPKube

    (@wpkube)

    Hi,

    I sent them a message asking for a testing copy of the theme. As soon as they send it over I’ll test it out and let you know what’s the situation.

    Plugin Author WPKube

    (@wpkube)

    Hi,

    The theme has an excerpt length limiter of their own, which by default is set to 25 words. So if you set Advanced Excerpt to a larger amount it will remain at 25 since that’s all the content it’s getting.

    Go to WP admin > Appearance > Customize > Archive,Category,Blog…

    In there you will see the option called “Post Content Limit (words)”. Set that to a higher number. You can put it at 200, it doesn’t matter much as long as it’s more than the limit you have in Advanced Excerpt.

    Thread Starter steffenk10

    (@steffenk10)

    Thanks – I’ve made that change. Doesn’t seem to have an effect.

    Plugin Author WPKube

    (@wpkube)

    Hi,

    What happens if you disable the plugin and change the values (try different lower values) in that theme option. Does it have an effect or does it always show the same excerpt length?

    Thread Starter steffenk10

    (@steffenk10)

    I disabled the plugin and changed the value to 10 and it did effect the length.

    Plugin Author WPKube

    (@wpkube)

    I’ll replicate the same settings as you have and hopefully get the issue.

    What are the values in Advanced Excerpt (excerpt length and other options that you’ve changed from default values). If easier you can send over a screenshot of the settings page.

    And also, what is the value you had in the theme options for the excerpt length.

    Thread Starter steffenk10

    (@steffenk10)

    The excerpt length in the theme is 150 words.

    Here’s a screenshot of the AE settings:
    https://tinyurl.com/yy7q4wxv

    Thanks.

    Plugin Author WPKube

    (@wpkube)

    Hi,

    Do you have custom excerpts defined on the posts or is it automatically generated from the main content?

    If you have custom excerpts and they aren’t large enough then there’s nothing for the plugin to limit. The excerpt is shorter than the limit.

    The plugin does allow you to make it use the content instead of the excerpt, even when a custom excerpt is defined.

    Go to the settings and you’ll see an option called “No Custom Excerpt (Generate excerpts even if a post has a custom excerpt attached.)”, check that checkbox and save the changes.

    Thread Starter steffenk10

    (@steffenk10)

    The post I’ve set up has a custom excerpt because we want to include a star rating that has to be added with shortcode. We are not so concerned about the word limits, etc., we just want the shortcode to work. If I change the setting to remove the custom excerpt then we’ll lose the star rating we really want to be included.

    Plugin Author WPKube

    (@wpkube)

    Hi @steffenk10

    Oh. The issue isn’t the length, it’s that the shortcodes aren’t processed?

    That’s a limitation to the excerpt set by the theme itself. They used the WordPress function called get_the_excerpt() on which WordPress does not process shortcodes.

    It’s something you need to contact the theme author about, it’s a pretty simple change to their code. In inc/excerpt.php on line 75 is:

    echo wp_kses_post( $output );

    That needs to be:

    echo do_shortcode( wp_kses_post( $output ) );

    Thread Starter steffenk10

    (@steffenk10)

    Great! Thanks for this info – I have changed the code there. The shortcode is no longer showing as text, but it’s still not working the way it’s supposed to. There is supposed to be a star rating in the excerpt, but now nothing shows up. Is there anything else I can try to get it to work?

    I really appreciate your patience in working through this problem.

    Plugin Author WPKube

    (@wpkube)

    You’re welcome.

    Since you are changing the code yourself then you can actually go with a better approach that suits your needs.

    Instead of:

    if ( $echo ) {
    	echo wp_kses_post( $output );
    }

    Add this:

    $output = get_the_excerpt();
    if ( $echo ) {
    	echo do_shortcode( $output );
    }

    That way we’re getting rid of the theme’s custom excerpt length generation and other alterations it does and letting the plugin handle it.

    After that just head over to the plugin options and make sure “Strip Shortcodes” is disabled and “Strip Tags” is set to not remove any tags.

    Thread Starter steffenk10

    (@steffenk10)

    It works!!! Thank you so much for all of your wonderful help! I really appreciate it.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Plugin not working with theme’ is closed to new replies.