WordPress.org

Forums

P2
Title length (2 posts)

  1. chiappa
    Member
    Posted 2 years ago #

    Thank you for the template. When I post something, the post titles are generated from usually the first 40 characters of the text.

    example: "This is an example post and I wanted to say th..."

    How can I extend the post titles to 140 characters long?

    Thank you,
    Chiappa

    http://wordpress.org/extend/themes/p2/

  2. chiappa
    Member
    Posted 2 years ago #

    found it from functions.php:

    function p2_title_from_content( $content ) {
    	$title = p2_excerpted_title( $content, 8 ); // limit title to 8 full words
    
            // Try to detect image or video only posts, and set post title accordingly
            if ( empty( $title ) ) {
                   	if ( preg_match("/<object|<embed/", $content ) )
                           	$title = __( 'Video Post', 'p2' );
                   	elseif ( preg_match( "/<img/", $content ) )
                           	$title = __( 'Image Post', 'p2' );
            }
    
            return $title;
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags