• Resolved paddyinthesun

    (@easylifespain)


    Hi,
    I’m using twentyten theme and want to set a static post as a welcome message, however, i do not want to display the meta data for the static post.
    How can i do this? I still want to display the meta data for other posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Make the welcome post sticky and then use the is_sticky() and is_home() conditionals to create an if/else loop around the meta data code in the 3rd Loop of loop.php. eg:

    <?php if( !is_sticky() || !is_home() ) :?>
    <div class="entry-utility">
    [...]
    </div><!-- .entry-utility -->
    <?php endif;?>

    But be warned that your customisations will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    Thread Starter paddyinthesun

    (@easylifespain)

    Hi esmi,
    I’m using a child theme. Do you mean to insert the above if/else loop within the <?php while ( have_posts() ) : the_post(); ?>

    Not fully sure where in the loop the code goes.

    Thanks

    Thread Starter paddyinthesun

    (@easylifespain)

    Excellent, i worked it out esmi, thanks a lot. I think i will start reading more about the loop.

    No problem. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove meta data from static post’ is closed to new replies.