• Resolved murga_elqh

    (@murga_elqh)


    Hello all,

    I have been browsing the support forums in regards to this issue I am having and none seem to work for me.

    I have edited the content-single.php file to remove the code:

    <?php if( has_post_thumbnail() ) :

    echo the_post_thumbnail( ‘full’, array(‘class’ => ‘aligncenter’) ); ?>

    As has been suggested in other posts but when I do that I receive an error in my post:

    Parse error: syntax error, unexpected T_ENDIF in /home/murgae5/public_html/wpress/wp-content/themes/water-lily/content-single.php on line 15

    The code for the content-single.php is:

    <?php
    /**
    * @package water lily
    */
    ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    <?php if( has_post_thumbnail() ) :

    echo the_post_thumbnail( ‘full’, array(‘class’ => ‘aligncenter’) ); ?>

    <?php endif; ?>

    <div class=”entry-content”>
    <h1 class=”entry-title”><?php the_title(); ?></h1>
    <div class=”entry-meta”>
    <?php water_lily_posted_on(); ?>
    </div><!– .entry-meta –>

    <?php the_content(); ?>
    <?php
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘water-lily’ ),
    ‘after’ => ‘</div>’,
    ) );
    ?>

    <footer class=”entry-meta below”>
    <?php
    /* translators: used between list items, there is a space after the comma */
    $category_list = get_the_category_list( __( ‘, ‘, ‘water-lily’ ) );

    /* translators: used between list items, there is a space after the comma */
    $tag_list = get_the_tag_list( ”, __( ‘, ‘, ‘water-lily’ ) );

    if ( ! water_lily_categorized_blog() ) {
    // This blog only has 1 category so we just need to worry about tags in the meta text
    if ( ” != $tag_list ) {
    $meta_text = __( ‘Tags: %2$s.’, ‘water-lily’ );
    } else {
    $meta_text = ”;
    }

    } else {
    // But this blog has loads of categories so we should probably display them here
    if ( ” != $tag_list ) {
    $meta_text = __( ‘Posted in: %1$s. Tags: %2$s.’, ‘water-lily’ );
    } else {
    $meta_text = __( ‘Posted in: %1$s.’, ‘water-lily’ );
    }

    } // end check for categories on this blog

    printf(
    $meta_text,
    $category_list,
    $tag_list
    );
    ?>

    <?php edit_post_link( __( ‘Edit’, ‘water-lily’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
    </footer><!– .entry-meta –>

    </div><!– .entry-content –>

    </article><!– #post-## –>

    Any help would be appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
  • In addition to removing the above two lines that you previously did, remove the next line as well.

    Here’s the code fragment you should remove:

    <?php if( has_post_thumbnail() ) :
    echo the_post_thumbnail( 'full', array('class' => 'aligncenter') ); ?>
    <?php endif; ?>

    It was giving an error since you did not remove last line which is endif.

    Thread Starter murga_elqh

    (@murga_elqh)

    Too easy!

    Thx heaps Ishan!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove featured image from post’ is closed to new replies.