• I know its possible to change the ending string of the excerpt using

    function my_wpp_excerpt_more($more){

    but is there a way to do this for the post title when limiting the length because it shows the default … and I can’t find a way to change that

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @shimsim,

    I guess you could try hooking into wpp_the_title, remove the ... string from the title (using rtrim() for example) and then append your own ending string to the title.

    Thread Starter shim.sim

    (@shimsim)

    ok thanks, i will try to read up on how to do that, was hoping it was something already built into the plugin :p
    thanks for the fast reply, and keep up the great work

    Plugin Author Hector Cabrera

    (@hcabrera)

    Well to be honest nobody has ever asked about this before so that’s why there’s no filter hook for it ??

    Not sure if my earlier comment will help though -I think that filter hook runs before the title gets truncated, not entirely sure as I haven’t checked the code to confirm- but do try it out and let me know how that goes.

    Thread Starter shim.sim

    (@shimsim)

    I guess it’s not common, but in my case the titles are long and as you can customise the post content except more, seems logical to want to customise the title too.

    I did have a quick try using rtrim, something like $title = rtrim($title,’.’); and a lot of other variations (because I’m new to coding), but it didn’t seem to have any effect, but probably my code is wrong haha

    Anyway, again for the reply and appreciate you taking the time to check if its something easy to implement ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post title_length excerpt return’ is closed to new replies.