Jump to content


Photo

Show only if index

wordpress

  • Please log in to reply
1 reply to this topic

#1 emediastudios

emediastudios

    Advanced Member

  • Members
  • PipPipPip
  • 418 posts
  • LocationAustralia

Posted 11 February 2013 - 01:42 AM

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.webl...quotes_img.asp" alt="Quote Table" style="border: solid 1px #ddd;" /></div>';

#2 scootstah

scootstah

    Advanced Member

  • Gurus
  • 2,889 posts
  • LocationUSA

Posted 12 February 2013 - 08:55 PM

You can use is_home() to check if the current page is the index.
while(!$succeed = try());




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com