Grow your CSS skills. Land your dream job.

Diferent content for diferents categories but in single.php

  • Rai
    # February 13, 2012 at 3:49 pm

    i need to set a form to put special content to display just for the post that are in a specific category. My not finish idea is:


    < ? if (have_posts()) : while (have_posts()) : the_post(); ?>
    < ?php
    if ( is_category( 'profesores' ) ) { ?>
    Show the special information just for post in the category.
    < ? } else { ?>
    Show the other posts normal information.
    < ? }
    ?>
    < ? endwhile; endif;?>

    Rai
    # February 13, 2012 at 3:59 pm

    I find it on the codex http://codex.wordpress.org/The_Loop#Style_Posts_From_Some_Category_Differently

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".