WordPress.org

Ready to get started?Download WordPress

Forums

Portfolio Press
[resolved] is_front_page not recognized (2 posts)

  1. jedifunk
    Member
    Posted 2 years ago #

    I'm using the full width portfolio template for my homepage, and have it working just fine. I have created a page called Home, and selected this as the front page in Settings > Reading as normal.

    I'm now trying to add a page title to my individual category pages, which also works fine. However, this also adds a page title to the homepage which I do not want.

    I'm trying to use the is_front_page conditional tag to filter out the page title on the homepage, but the theme is not recognizing is_front_page.

    Here's my code:

    <?php if( is_front_page() ) { ?>
    		<header id="page-header">
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    		</header>
    	<?php } ?>

    This has been placed in the content-portfolio.php file, just before the loop.

    You can view the site at igloo.bryceflory.com

    Again, the theme is not recognizing that I have selected Home as my front page. Thoughts?

    http://wordpress.org/extend/themes/portfolio-press/

  2. jedifunk
    Member
    Posted 2 years ago #

    Nevermind, I figured it out.

    I was adding my title to the wrong file. I have created a custom archive-portfolio.php file and added the title there, and used single_cat_title to display the category title (instead of the_title). This works just as one would expect.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic