emediastudios Posted February 11, 2013 Share Posted February 11, 2013 Hi everyone, I would like to edit a file so that it only shows a image iif it is the home page on wordpress. <?php /* WARNING: This file is part of the core Genesis framework. DO NOT edit this file under any circumstances. Please do all modifications in the form of a child theme. */ /** * Handles the footer structure. * * This file is a core Genesis file and should not be edited. * * @category Genesis * @package Templates * @author StudioPress * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.studiopress.com/themes/genesis */ genesis_structural_wrap( 'inner', '</div><!-- end .wrap -->' ); echo '</div><div class="quote-table"><img src="http://clients2.weblink.com.au/clients/oceaniacapital/quotes_img.asp" alt="Quote Table" style="border: solid 1px #ddd;" /></div>'; do_action( 'genesis_before_footer' ); do_action( 'genesis_footer' ); do_action( 'genesis_after_footer' ); ?> </div><!-- end #wrap --> <?php wp_footer(); // we need this for plugins do_action( 'genesis_after' ); ?> This is what I only want to show on the home page. echo '</div><div class="quote-table"><img src="http://clients2.weblink.com.au/clients/oceaniacapital/quotes_img.asp" alt="Quote Table" style="border: solid 1px #ddd;" /></div>'; Link to comment https://forums.phpfreaks.com/topic/274324-show-only-if-index/ Share on other sites More sharing options...
scootstah Posted February 13, 2013 Share Posted February 13, 2013 You can use is_home() to check if the current page is the index. Link to comment https://forums.phpfreaks.com/topic/274324-show-only-if-index/#findComment-1412135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.