• I have a featured category.

    I want the features styles for the h1 permalink that i use to show up for the single.php entry title for just the features category. i tried to create a single-features.php but i am not sure how to get the features category to redirect to it because it doesnt seem to do it.

    If tried looking for answers and nothing works. any clues?

    If i change the entry class to my features class it does change the look, but it changes it for every category single post. i just need it for the one particular featured category.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Something like:

    <?php
    if( in_category('n') ) $class = 'featured';
    else $class = '';?>
    <div <?php post_class($class);?>id="post-<?php the_ID();?>">

    in single.php – where n is the id of your featured category – should do the trick.

    You should then be able to use .featured h1 in your stylesheet.

    Thread Starter stoner529

    (@stoner529)

    does that go up at the top or down by that particular area? i have changed $class = featured to the term features since that is the actual class used. believe it or not i couldnt use the permalink feature or featured as the id. it kept giving me errors. so the title is featured but the actual permalink is features go figure. my first go round didnt work on this so i will keep at it.

    does that go up at the top or down by that particular area?

    That really depends upon the structure of your theme’s single.php template file but I’d imagine that it would be added near the top of that template file.

    Thread Starter stoner529

    (@stoner529)

    i have gotten that to work now. My next thing will be to get the content to look the same. cant be to hard.

    Thread Starter stoner529

    (@stoner529)

    iv’e gotten that to work. now i am having problems getting the content background to change color like i have it in the category.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘h1 heading for single.php’ is closed to new replies.