• Resolved John

    (@dsl225)


    Hello,

    Is there a way to have custom excerpts obey the excerpt length?
    For a site, I need to use custom excerpts sometimes in order to edit some text from the beginning of the page but I see that, in such cases, the excerpt length I have setup is not respected. Is there a way to correct this?

    Thanks!

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

    (@wpkube)

    Hi @dsl225

    On the settings page ( WP admin > Settings > Excerpt) there’s an option called “No Custom Excerpts”. Check the checkbox. Let me know if that works as you need it.

    Thread Starter John

    (@dsl225)

    Do you mean this option? It is currently checked.

    https://pasteboard.co/4N60KKcG4pkR.jpg

    Plugin Author WPKube

    (@wpkube)

    3 options above that one.

    “No custom excerpts”

    But that won’t help, it’ll disregard the custom excerpt and generate one from the content.

    There’s no option for it at the moment but we could add it to the list for the next update. Currently recovering from an injury so I’m not at 100% but I think it could be released sometime next week, would that work out for you?

    Thread Starter John

    (@dsl225)

    Many thanks for your feedback and sorry to hear you have been injured.

    Yes, I’ve seen the other option but, as you say, it’s for something else. No problem for next week as far I’m concerned but wishing you first and foremost a prompt recovery!

    BTW, I would appreciate it if you can clarify the other option for which I sent you the screenshot before. “Filter”. What does that mean exactly in fact? What is that for? Should I use both of those the_excerpt() and the_content(), none or just one of them?

    Plugin Author WPKube

    (@wpkube)

    Thanks John

    Short answer, keep them both active

    For the excerpts output some themes use the_content() and some use the_excerpt()

    The option allows you to allow or disallow our plugin to filter (modify) the output of those functions.

    It doesn’t change how our plugin generates the excerpt, it just changes whether the plugin should do it or not.

    Both the_content() and the_excerpt() functions are used by themes.

    the_excerpt() specifically outputs the excerpt of the post (either the manually applied one or it creates it from the post content)

    the_content() works a bit differently, on the singular page for the post it displays the full content, but on a page which lists posts (like homepage) it displays either the full content or an excerpt, depending on the settings. The tag <!--more--> is used inside of content to determine the cut-off for the excerpt.

    That’s not directly related to the plugin, it’s just the different ways WordPress can handle excerpts and it depends on the theme which approach is used.

    If you have the checkbox for the_content() disabled and the plugin is altering the excerpt then it means the theme uses the_excerpt() function to output the excerpt.

    Thread Starter John

    (@dsl225)

    Got it, with thanks.
    And yes, this how I’ve setup the plugin so far but without really understanding the reasons.

    Plugin Author WPKube

    (@wpkube)

    You’re welcome.

    Just released the update, version 4.4.0

    Make sure both those checkboxes are checked.

    Thread Starter John

    (@dsl225)

    Excellent, many thanks for this update.
    Works great!
    I only noticed that when you check the first box the second remains greyed until you save changes and then you can also check the second one and save changes again. Not important but just in case you didn’t notice.

    Plugin Author WPKube

    (@wpkube)

    You’re welcome @dsl225

    That’s most likely a cache issue, your browser still using the old JavaScript file. If you do a hard refresh CTRL + F5 a few times does it get sorted out?

    Thread Starter John

    (@dsl225)

    I tried but no change. Let’s see if it persists after a couple of weeks and if other people have the same issue.

    Tested with Chrome and FF.

    Plugin Author WPKube

    (@wpkube)

    Oh, you’re right.

    Silly mistake, I didn’t update the minified JS file with the changes. I have SCRIPT_DEBUG turned on so it’s loading the unminified file for me.

    Will sort that out in the next update.

    Thanks for pointing it out.

    Thread Starter John

    (@dsl225)

    No problem, you are welcome!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Excerpt length when using custom excerpts’ is closed to new replies.