• Resolved demonboy

    (@demonboy)


    I love this theme, it’s exactly what I’m looking for with the emphasis on text, not images. Simple and uncluttered.

    I’m creating a child theme and using category.php as the ‘contents’ page for each issue of a magazine. All I want to display for each post is the title and the author. However if the post type is ‘image’, it displays the word ‘image’ above the title and gets rid of the author’s name. I’ve managed to get it to display the author’s name but I can’t for the life of me work out how to get rid of the link ‘image’ above it.

    Any pointers gratefully received.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Glad you like Isola!

    You can remove the post format type on category pages by adding this to your child theme’s stylesheet:

    .category .entry-format {
      display: none;
    }

    Let me know how it goes!

    Thread Starter demonboy

    (@demonboy)

    Hi Kathryn,

    Yep, I love this theme. It’s easy to work with and just what we need for a magazine, text-based website.

    The solution you suggest is what I would normally do as a quick work-around but I wondered if there was any code I could comment out in the php files?

    No hurry, I can implement your solution for the time being.

    Thank you,

    Jamie

    Hi Jamie – sure, you can remove it completely in your child theme.

    Make a copy of content.php and place it in your child theme, or open the one in your child theme if you’d previously added it there.

    Look for this on line 15 (your line number may be different if you’ve already made changes to this file):

    <?php if ( $format && in_array( $format, $formats[0] ) ): ?>

    Change that line to this:

    <?php if ( ( ! is_category() ) && ( $format && in_array( $format, $formats[0] ) ) ): ?>

    This prevents the post format from being displayed on category pages.

    Let me know how it goes.

    Thread Starter demonboy

    (@demonboy)

    Perfect. Thanks for your time, Kathryn. Appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove post type on category page’ is closed to new replies.