WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
[resolved] echo substr(get_the_title(),0,30); causing errrors (3 posts)

  1. chocks
    Member
    Posted 4 years ago #

    Hi scribu, this plugin simply rocks!

    I'm having conflicts with this function:

    echo substr(get_the_title(),0,30);

    I can display the error here but I'm sure you'll be able to reproduce the error. Any ideas?

    Thanks,

    Chocks

  2. scribu
    Member
    Plugin Author

    Posted 4 years ago #

    You should replace it with something like this:

    echo apply_filters( 'the_title', substr( $post->post_title, 0, 30 ) );

  3. chocks
    Member
    Posted 4 years ago #

    I'll try that! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic