• Resolved solisiter

    (@solisiter)


    Dear all,

    I would need your help for a small problem/question with Pinboard theme and a quote post.

    If I’m using quote format, then it displays only the quote but not the author name (outside the quote).
    I think I have to change something in the function.php, but i don’t know what (see below). Can anyone help me ?

    Thank you soooo much in advance and juicy new year 2014 !

    Solweig

    if ( ! function_exists( 'pinboard_first_blockquote' ) ) :
    function pinboard_first_blockquote() {
    	$document = new DOMDocument();
    	$content = apply_filters( 'the_content', get_the_content( '', true ) );
    	if( '' != $content ) {
    		libxml_use_internal_errors( true );
    		$document->loadHTML( $content );
    		libxml_clear_errors();
    		$blockquotes = $document->getElementsByTagName( 'blockquote' );
    		for( $i = 0; $i < $blockquotes->length; $i++ ) {
    			$blockquote = $blockquotes->item($i);
    			$document = new DOMDocument();
    			$document->appendChild( $document->importNode( $blockquote, true ) );
    			echo $document->saveHTML();
    		}
    	}
    	if( pinboard_is_teaser() && has_post_format( 'quote' ) ) {
    		echo '<p><a href="' . get_permalink() . '" rel="bookmark">→ ' . get_the_time( get_option( 'date_format' ) ) . '</a></p>';
    	}
    }
    endif;

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Pinboard] Full post – Quote format’ is closed to new replies.