Tutorial Shares
  • Home
  • Tutorials
  • Categories
  • My Favorites
  • Terms of Use
  • WordPress
    • Theme Customizations
    • Security
    • Admin Dashboard
  • Magento
  • Code Snippets
  • Servers
  • CSS
  • Dev Tools
  • Hosting
    • Servers
    • Nginx
    • Ubuntu
    • Linux
  • Design
  • PHP

Display different logo on homepage in Magento

Oct 9, 2024 by Christine Cardoso in Magento Loading 227

It is recommended by SEOmoz that the homepage logo be only a h1 tag on the homepage, and h3 on all subsequent internal site pages. In your header.phtml, the default magento template uses getIsHomePage() which allows us to replace

1
<h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img width="377px" src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>

with

1
2
3
4
5
<?php if ($this->getIsHomePage()):?>
    <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img width="377px"  src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
<?php else:?>
    <h3 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img width="377px"  src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h3>
<?php endif; ?>

Share this:

  • Email

Reccomended Resources

  • Premium Wordpress Themes
  • Super Fast Hosting
  • Domain Name Discounts
  • Wordpress Development Company

Recent Posts

  • Redirect WordPress Dashboard Access for Non-Admins
  • On Scroll Animations on Multiple Divs
  • Rename WordPress Default Post Type
  • WordPress Command Line
  • Ubuntu Usermod Options

Categories

  • Admin Dashboard
  • Bootstrap
  • Categories
  • Code Compressors
  • Code Snippets
  • CSS
  • CSS3
  • Custom Fields
  • Custom Page Templates
  • Custom Queries
  • Design
  • Development Tools
  • Google Maps API
  • HTML
  • Image Optimizers
  • Javascript
  • Jquery
  • Learn to Code
  • Linux
  • Mac OSX
  • Magento
  • Modals
  • MySQL
  • Nginx
  • Open Source
  • PHP
  • Project Management
  • Ruby
  • Ruby on Rails
  • Security
  • SEO
  • Servers
  • Taxonomies
  • Theme Customizations
  • Twitter
  • Ubuntu
  • Uncategorized
  • Wordpress
  • Wordpress Plugins

Tags

301 Redirects admin meta fields archive.php background image Categories Category Archives custom category meta fields Customize WP custom metaboxes Custom Metaboxes and Fields for WordPress custom meta fields Custom Page Template Custom Post Type Archives Custom Post Types custom taxonomy meta fields date hash url li load Magento logo Metafields Nginx page editor Page Templates Pagination parallax Password Protect Permalinks post query arguments Posts 2 Posts Roots Theme server admin sort posts by meta field sysadmin The Events Calendar Plugin Theme Customizations Twitter Bootstrap typography usermod Wordpress Wordpress hacks Wordpress plugins WP Admin Dashboard wp editor WP Favorite Posts

© 2015 Tutorial Shares

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.