WordPress.org

Ready to get started?Download WordPress

Forums

Hueman
Post info removal (3 posts)

  1. Jack_Tequila
    Member
    Posted 4 months ago #

    Is it possible to remove post info (author, date, category) from posts, but only from explicit categories - basically, I want to remove post info from all pages and categories but front page. Any chance for that?

    Thank you in advance!

  2. Jack_Tequila
    Member
    Posted 3 months ago #

    Ok, I have found it: go to content.php and remove following code:

    <p class="post-category"><?php the_category(' / '); ?></p>

    Now, is it possible to remove date from all categories, but one?

  3. Alexander Agnarson
    Member
    Theme Author

    Posted 3 months ago #

    You can probably add something like this around the code you only want to show for a specific category:

    <?php if ( has_category('sport') ): ?>
    My stuff I want to show here
    <?php endif; ?>

    http://codex.wordpress.org/Function_Reference/has_category

    Edit: Corrected from is_category to has_category

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.