ThemeShaper Forums » Thematic

[closed]

Display function on specific pages

(3 posts)
  • Started 3 years ago by rayk
  • Latest reply from rayk
  • This topic is not resolved
  1. Hi, I'm trying to get the following function to only display on my Blog page, but having issues finding how to do it.

    // add filtering content option
    
    function content_filter() {
        if( is_front_page() || is_single() ) {
            add_filter();
        }?>
    
        <div id="content_filter">
    <li><a href="" title="Title">Title</a>
    </li>
        </div>
    
    <?php }
    add_action('thematic_abovecontainer','content_filter');
    Posted 3 years ago #
  2. dhales
    Member

    Hey Rayk,

    This is what this function is supposed to look like (not sure what you were doing with that add_filter(); line). Also, I might want to look at the conditional tags you are used in your if statement. This resource was helpful to me regarding those conditional tags, http://codex.wordpress.org/Conditional_Tags

    // add filtering content option

    function content_filter() {
        if( is_front_page() || is_single() ) { ?>
    
        <div id="content_filter">
    <li><a href="" title="Title">Title</a>
    </li>
        </div>
    
    <?php }
    }
    add_action('thematic_abovecontainer','content_filter');
    Posted 3 years ago #
  3. Thanks so much! That works perfectly like I wanted :D!

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.