• I use categories to make the thumbnail size change from ‘thumbnail’ to ‘large’ size in the main loop. When category is 35 the thumbnail automatically change to ‘large’.
    However I cant make this to work for the first post in the loop.
    And I cant figure out whats wrong in the code:
    Thanks
    Erik

    http://pastebin.com/w6EydHzH

Viewing 2 replies - 1 through 2 (of 2 total)
  • When category is 35 the thumbnail automatically change to ‘large’.

    how is that coded?

    this code is probably missing in your pastebin code.

    or are you using a category template for category 35?

    Thread Starter erikhgm

    (@erikhgm)

    I actually got this to work now with this new code
    http://pastebin.com/gpSrs2Hu

    It basically just changes the this part of the code if the post is in category 35 which is where I put the posts that I want to have a large thumbnail.

    from:
    <?php the_post_thumbnail(‘thumbnail’); ?>

    to:
    <?php the_post_thumbnail(‘large’); ?>

    I am thinking though there must be a better way to do this with less code. This way generates lots of extra code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude category from first post on homepage’ is closed to new replies.