• Skip to primary navigation
  • Skip to main content
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to put slider shortcode only in home page in WordPress

June 8, 2013 by Sharad Chhetri 2 Comments

How to put slider shortcode only in home page in WordPress

My personal blog is running in wordpress CMS. Today I want to put header on home page only. For this first I installed the WP slider plugin and set the all slides which I need. I got the slide shortcode which can be easily use in page and post.
In this scenario we will use the shortcode in Home page means we will implement the Header Slide only in home page.

Note: I am using the Tiga theme

Given below are steps which I have done

Step 1: Login into your wordpress CMS with admin account id

Step 2: click on Editor tab of theme.

Appearance >> Editor

Step 3: At right hand sidebar ,click on header.php file .

Step 4: And paste the below code ,just above where the header tag is closing


        

        

        

Below is the reference of header.php file which I edited

<?php tiga_header(); ?>
        
	<?php if ( is_home() ):?>

        <?php echo do_shortcode('[slider id="1888" name="myheaderslide"]'); ?>

        <?php endif; ?>
      

	</header><!-- #masthead .site-header -->

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. WordPress host IP changed not able to open wp-admin and site page looks scattered
  2. How to create a search box inside page in WordPress
  3. How to page scroll up/down in Linux terminal
  4. how to set maintenance page for all except to your network
  5. Search Keyword In Man Page Like We Search In vi / vim Editor
  6. Convert website page to pdf and image
  7. how to remove history from Dash Home in Ubuntu
  8. Setup htpasswd on WordPress wp-admin running on nginx
  9. WordPress error “Unable to create new image”
  10. How to remove date from WordPress Post URL

Filed Under: Linux, Tips And Tricks Tagged With: wordpress

Reader Interactions

Comments

  1. Rajendra Reddy says

    December 26, 2013 at 2:41 pm

    Thank you so much for share this post, You have made my work Very easy

    Reply
    • sharad chhetri says

      December 26, 2013 at 2:59 pm

      Your Welcome

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy