Sticky/Fixed Header and Navigation for Debut Theme

SeanP
Shopify Staff
2 0 47

Caution

This is an advanced tutorial and is not supported by Shopify. It is specific to an unedited version of the Debut theme, released 7th of March. We cannot guarantee results for themes that have been modified with custom coding and/or apps.

We suggest hiring a Shopify Expert if you are not comfortable proceeding with the following tutorial, or wish to make any variations to this tutorial. We would also advise making a backup of your theme.

Having a sticky header means that the navigation, logo, and icons will follow the user while they scroll down the page. This is really useful if you want to ensure that your customers will have easy access to your navigation at all times! Let’s take a look at how to implement this for the Debut theme.

Note

We recommend having your header set as Logo Alignment: Left. This is the default setting for the Debut Theme but it can be changed. To do this, you would need to open the Theme Editor.
On the left-hand side, click on the Header section and, from here, you will be able to change the alignment.

12-00-q35ps-rsk5r

This is an important step, as the header will be shown on every portion of the page as you scroll. Setting the logo alignment to left will ensure the header takes up less space on the screen. We also can't ensure that the customization will work if this setting is not activated.

If you have an Announcement bar, and would like for it to not move with the rest of the header, please refer to option 2 of this guide.

 

OPTION 1 - STICKY HEADER

This will make the whole header sticky, including the announcement bar.


11-29-y1xka-8hyx2

  1. From your Shopify admin, go to Online Store > Themes.
  2. Locate your Debut theme and then click Actions > Edit code.
  3. In the Assets folder, open your theme.scss.liquid file.

    03-39-badae-sysyp
  4. Go to the very bottom of this file and paste the following code:

    #SearchDrawer {
      z-index:1001;
    }
    
    #shopify-section-header {
      position: fixed;
      z-index:1000;
      left:0;
      right:0;
      -webkit-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -moz-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -ms-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -o-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      background-color: {{ settings.color_body_bg }};
    }
    
    #PageContainer {
      padding-top: 80px;
    }
    
    @media screen and (max-width: 749px) {
    #PageContainer {
      padding-top: 70px;
    }
    }
    
  5. In the same Assets folder, click to open your theme.js file.
  6. Go to the very bottom of this file and paste the following code:

    function headerSize() {
      var $headerHeight = $('div#shopify-section-header').outerHeight();
      $('#PageContainer').css('padding-top', $headerHeight);
    }
    
    $(window).on("load", headerSize);
    $(window).on("resize", $.debounce(500, headerSize));
    
  7. Ensure that the code was copied exactly from this guide and pasted correctly, making sure no characters or symbols are missing.
  8. Save the file by using the button on the top right-hand side.
  9. Refresh your online store page and verify that the sticky header is working correctly!

And that's it! If you would prefer for the announcement bar to not scroll with the user, then you would need to follow the steps below.

 

OPTION 2 - STICKY HEADER WITHOUT THE ANNOUNCEMENT BAR

Note

In this section of the guide, we are assuming that you did not use the code above. If you have used it previously to make the whole header sticky, then you would need to revert your changes to make sure that you are working on an untouched theme.

  1. From your Shopify admin, go to Online Store > Themes.
  2. Locate your Debut theme and then click Actions > Edit code.
  3. In the folder, open your theme.scss.liquid file.

    03-39-badae-sysyp
  4. Go to the very bottom of this file and paste the following code:

    #SearchDrawer {
      z-index:1001;
    }
    
    .site-header {
      position: fixed;
      z-index:1000;
      left:0;
      right:0;
      -webkit-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -moz-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -ms-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      -o-box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
      box-shadow:0px 2px 4px 0px rgba(0,0,0,.1);
    }
    
    #PageContainer {
      padding-top: 80px;
    }
    
    @media screen and (max-width: 749px) {
    #PageContainer {
      padding-top: 70px;
    }
    }
    
  5. In the same Assets folder, click to open your theme.js file.
  6. Go to the very bottom of this file and paste the following code:

    function headerSize() {
      var $headerHeight = $('div#shopify-section-header').outerHeight();
      $('#PageContainer').css('padding-top', $headerHeight);
    }
    
    $(window).on("load", headerSize);
    $(window).on("resize", $.debounce(500, headerSize));
    
    $(window).scroll(function() {
      scroll = $(window).scrollTop();
      if (scroll >= 1) {
        $('.site-header').css('top', '0');
      } else {
        $('.site-header').css('top', 'initial');
      }
    });
    
  7. Ensure that the code was copied exactly from this guide and pasted correctly, making sure no characters or symbols are missing.
  8. Save the file by using the button on the top right-hand side.
  9. Refresh your online store page and verify that the sticky header is working correctly!

To learn more visit the Shopify Help Center or the Community Blog.

Replies 159 (159)
oscprofessional
Shopify Partner
15846 2371 3073

Hello @afsiragusa,

Please share your site url so that I will give you exact solution

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
afsiragusa
Tourist
5 0 2
@oscprofessional

spray-away-toilet-brush.myshopify.com

But it’s not live yet...that won’t give you access will it?
oscprofessional
Shopify Partner
15846 2371 3073

@afsiragusa,

Please share password

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
JazWander
Tourist
9 0 1

Hi, I have the same problem, 

I follow the OPTION 2 but my sticky header has a bouncing effect whenever I navigate on my page.
Can someone help me how to fix this?

THANK YOU SO MUCH!

 

 

atifgodil
Tourist
6 0 3

Same here. Would love to use Option 2 if there's a fix for it.

afsiragusa
Tourist
5 0 2
@Osc

How’s that work? U get full access to my account?
afsiragusa
Tourist
5 0 2
glabs
Visitor
1 0 2

Hi I am experiencing the same issue, except my header takes up a portion of my website and it does not return to normal. Part of my site is behind my header and I am unable to scroll up to the missing portion.

Little_Fox_Clot
Tourist
3 0 0

Hi I am experiencing the same issue, except my header takes up a portion of my website and it does not return to normal. Part of my site is behind my header and I am unable to scroll up to the missing portion.

Hi @glabs , I have this same problem! Were you ever able to find a solution for it?

Jeck
Visitor
1 0 0

I tried to do this and it really works.

But the dropdown(when you add menu under menu haha), the search and the three-bar(for mobile view) are not working.

unitech456
Visitor
2 0 3

Change the number 80 to 107. The number 107 made it stop doing what you described in my situation. Maybe try playing around with that number until it stops

This is the line of code you need to edit as you can see instead of 80px i changed it to 107px

#PageContainer {
padding-top: 107px;
}

 

View my reply above for further clarification 

PrimpandPosture
Visitor
1 0 0

This worked for me!!! 🙂 Extending a big thanks, I've been troubleshooting this issue for days! 🙂

diego_ezfy
Shopify Partner
2958 568 890

Hey everyone,

I have coded a professional, highly tested solution for this as well if you'd like to try.

You can download/install it for free under 1 minute, just click here to read the tutorial.

Besides that you also have options to turn it on/off at the customize page, even to allow it only on desktop or mobile depending on your needs.

Kind regards,
Diego

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.
rip2
Visitor
1 0 0

Thanks Diego, the free version works well for me. There are a few small bugs like resetting to the top of the page when you click the search icon in the menu bar, but these are very minor. Overall an easy copy & paste solution!

nezi
Tourist
6 0 3

Hi,

I added the Part 2 of the code given in the original post. The navigation menu is sticking and the announcement bar moves but as you scroll it shows the background above the navigation menu instead of the navigation moving up and replacing the announce

Screen Shot 2021-01-20 at 12.18.06 PM.png

ment bar. See photo.

topkozuchy
Tourist
4 0 0

Same problem for me 😞 

my website is topkozuchy.sk please if you could fix the space and moving menu bar to the top after scolling down it would help me. 

diego_ezfy
Shopify Partner
2958 568 890

@topkozuchy 

Have you checked this solution yet? It fixes the problem you mention. 

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.
jhonmusk12
Visitor
2 0 0

Same problem for me 😞 

pogiroheat
Visitor
1 0 0

Caution This is an advanced tutorial and is not supported by Shopify .

tantsteven
Visitor
2 0 0

Hi there! I followed option 1 to add the sticky header, but I need to temporarily stop using the sticky header. When i comment out all the code I added for the sticky header in the theme.js and theme.scss.liquid and save, the header is still sticky on the published website.

Nadallswan
Shopify Partner
9 1 5

@AkanshaSharma  @afsiragusa  Have you found a solution for this loading lag / glitch? 

 When the page is loading (when you first get to the page), it's almost like the whole page if shifted up under the header a tiny bit, and then once the page officially is loaded, it pops back down to how It should be. There's some sort of lag/glitch.

It is indeed very unpleasant to the eye and seems unprofessional.

Any help with a solution will be so so much appreciated. 

Thanks!

aorlin
Visitor
3 0 0

this is tutorial work, thanks, bro! Aorlin.com

arnoldlan
Tourist
4 0 1

Hi there, I followed all the instructions in your post, but just got a white space between the header and the slideshow (first thing under the header). The header/announcement does not follow me when I scroll down either. 

 

My website is www.immigenshop.com 

 

Thanks!

 

Edit: Solved!

GYGY
Visitor
2 0 0

Hi Sean,

 

Excellent work, thank you!

 So I was stoked using option 1 that it worked on both desktop and mobile.

BUT but on mobile, the scroll-down menu that resides in the header does not function as desired: after scrolling down the site, sticky header all perfectly in place, I clicked the menu... but the menu list does not appear... so I thought maybe the menu got "left behind" at the top. So I tested by scrolling back to the top and click Menu button, the menu then worked perfectly just like before I implemented the code.... So, is there more code I have to look at to add for my case? 

 

By the way, I am using a premium theme, not the debut theme

 

Thanks once again for the excellent code snippets!

 

GYGY
Visitor
2 0 0

By the way, I am using a premium theme, not the debut etc

Thanks

smithroger
Tourist
16 0 3

Thanks for this amazing and helpful tutorial about Fixing header and Navigation for Debut Theme. I also face that problem but due to your tutorial, i solve that problem and my store is running properly. Again Thanks.

Alex-Testoni
Visitor
1 0 0

And for the all code works only on mobile? I have a debut theme.

mitcheep
Visitor
2 0 0

Hi SeanP this is really helpful.  However, I am wondering if it is possible to fix the nav bar except for checkout.  I find it inconvenient to see the nav bar while making payment

cpoveda89
Tourist
15 0 1

Hello!!! 

 

That's really nice. I have a little issue with it. My breadcrumbs are not appearing after the implementation of the code. Here's how I have them coded:

 

code1.png

 

Do you know what can I do to fix it?

jessisaun
Tourist
7 0 3

Hi Sean, I used the option two on my brooklyn theme and it worked great. I have a few issues though and I was hoping you could help me with it. Or anyone that knows the answer!

 

I have the fixed menu change color when i scroll down, but I don't know how to also change the text and icons, they stay white and can't bee seen properly, I would like them to be grey. Also there is a space between the top of the page and the fixed menu, I would like that not be there, and for the menu to be attached to the top of the page. Screenshot: https://imgur.com/mx3FDG2

 

Also, the menu is too low and covers part of all other pages.  How can I fix that? I already modified the padding on the code for the menu, but that doesn't help.

Screenshot: https://imgur.com/ufkG8no

 

These are my codes:

 

I have this at the end of theme.scss.liquid: 

 

/* CHANGE HEADER TO STICKY */
 
#SearchDrawer {
  z-index:1001;
  
}
 
.site-header {
  position: fixed;
  z-index:1000;
  background-color: #F7F1EB;
  left:0;
  right:0;
 
}
 
.template-index .fixed-header .site-header {
background-color: #F7F1EB;
}
 
#PageContainer {
  padding-top: 100px;
}
 
@media screen and (max-width: 749px) {
#PageContainer {
  padding-top: 70px;
  
}
}

 

And this at the end of theme.js.liquid:

 

// Header

function headerSize() {
var $headerHeight = $('div#shopify-section-header').outerHeight();
$('#PageContainer').css('padding-top', $headerHeight);
}

$(window).on("load", headerSize);
$(window).on("resize", $.debounce(500, headerSize));

$(window).scroll(function() {
scroll = $(window).scrollTop();
if (scroll >= 1) {
$('.site-header').css('top', '0');
} else {
$('.site-header').css('top', 'initial');
}
});

 

 

RadT
Excursionist
12 0 4

@jessisaun Same theme and issues for me. Did you discover a solution? 

 

A sticky navigation menu is fairly basic for websites, I'm surprised Shopify does not offer a built-in option. 

Haylalayla
Excursionist
24 0 3

Can anyone help me to make my main navigation header sticky in brooklyn theme 

Thanks alot


@jessisaun wrote:

Hi Sean, I used the option two on my brooklyn theme and it worked great. I have a few issues though and I was hoping you could help me with it. Or anyone that knows the answer!

 

I have the fixed menu change color when i scroll down, but I don't know how to also change the text and icons, they stay white and can't bee seen properly, I would like them to be grey. Also there is a space between the top of the page and the fixed menu, I would like that not be there, and for the menu to be attached to the top of the page. Screenshot: https://imgur.com/mx3FDG2

 

Also, the menu is too low and covers part of all other pages.  How can I fix that? I already modified the padding on the code for the menu, but that doesn't help.

Screenshot: https://imgur.com/ufkG8no

 

These are my codes:

 

I have this at the end of theme.scss.liquid: 

 

/* CHANGE HEADER TO STICKY */
 
#SearchDrawer {
  z-index:1001;
  
}
 
.site-header {
  position: fixed;
  z-index:1000;
  background-color: #F7F1EB;
  left:0;
  right:0;
 
}
 
.template-index .fixed-header .site-header {
background-color: #F7F1EB;
}
 
#PageContainer {
  padding-top: 100px;
}
 
@media screen and (max-width: 749px) {
#PageContainer {
  padding-top: 70px;
  
}
}

 

And this at the end of theme.js.liquid:

 

// Header

function headerSize() {
var $headerHeight = $('div#shopify-section-header').outerHeight();
$('#PageContainer').css('padding-top', $headerHeight);
}

$(window).on("load", headerSize);
$(window).on("resize", $.debounce(500, headerSize));

$(window).scroll(function() {
scroll = $(window).scrollTop();
if (scroll >= 1) {
$('.site-header').css('top', '0');
} else {
$('.site-header').css('top', 'initial');
}
});

 

 





@jessisaun wrote:

Hi Sean, I used the option two on my brooklyn theme and it worked great. I have a few issues though and I was hoping you could help me with it. Or anyone that knows the answer!

 

I have the fixed menu change color when i scroll down, but I don't know how to also change the text and icons, they stay white and can't bee seen properly, I would like them to be grey. Also there is a space between the top of the page and the fixed menu, I would like that not be there, and for the menu to be attached to the top of the page. Screenshot: https://imgur.com/mx3FDG2

 

Also, the menu is too low and covers part of all other pages.  How can I fix that? I already modified the padding on the code for the menu, but that doesn't help.

Screenshot: https://imgur.com/ufkG8no

 

These are my codes:

 

I have this at the end of theme.scss.liquid: 

 

/* CHANGE HEADER TO STICKY */
 
#SearchDrawer {
  z-index:1001;
  
}
 
.site-header {
  position: fixed;
  z-index:1000;
  background-color: #F7F1EB;
  left:0;
  right:0;
 
}
 
.template-index .fixed-header .site-header {
background-color: #F7F1EB;
}
 
#PageContainer {
  padding-top: 100px;
}
 
@media screen and (max-width: 749px) {
#PageContainer {
  padding-top: 70px;
  
}
}

 

And this at the end of theme.js.liquid:

 

// Header

function headerSize() {
var $headerHeight = $('div#shopify-section-header').outerHeight();
$('#PageContainer').css('padding-top', $headerHeight);
}

$(window).on("load", headerSize);
$(window).on("resize", $.debounce(500, headerSize));

$(window).scroll(function() {
scroll = $(window).scrollTop();
if (scroll >= 1) {
$('.site-header').css('top', '0');
} else {
$('.site-header').css('top', 'initial');
}
});

 

 



@jessisaun wrote:

Hi Sean, I used the option two on my brooklyn theme and it worked great. I have a few issues though and I was hoping you could help me with it. Or anyone that knows the answer!

 

I have the fixed menu change color when i scroll down, but I don't know how to also change the text and icons, they stay white and can't bee seen properly, I would like them to be grey. Also there is a space between the top of the page and the fixed menu, I would like that not be there, and for the menu to be attached to the top of the page. Screenshot: https://imgur.com/mx3FDG2

 

Also, the menu is too low and covers part of all other pages.  How can I fix that? I already modified the padding on the code for the menu, but that doesn't help.

Screenshot: https://imgur.com/ufkG8no

 

These are my codes:

 

I have this at the end of theme.scss.liquid: 

 

/* CHANGE HEADER TO STICKY */
 
#SearchDrawer {
  z-index:1001;
  
}
 
.site-header {
  position: fixed;
  z-index:1000;
  background-color: #F7F1EB;
  left:0;
  right:0;
 
}
 
.template-index .fixed-header .site-header {
background-color: #F7F1EB;
}
 
#PageContainer {
  padding-top: 100px;
}
 
@media screen and (max-width: 749px) {
#PageContainer {
  padding-top: 70px;
  
}
}

 

And this at the end of theme.js.liquid:

 

// Header

function headerSize() {
var $headerHeight = $('div#shopify-section-header').outerHeight();
$('#PageContainer').css('padding-top', $headerHeight);
}

$(window).on("load", headerSize);
$(window).on("resize", $.debounce(500, headerSize));

$(window).scroll(function() {
scroll = $(window).scrollTop();
if (scroll >= 1) {
$('.site-header').css('top', '0');
} else {
$('.site-header').css('top', 'initial');
}
});

 

 




header sticky in theme brookyln but I can`t,can anyone help me?


@jessisaun wrote:

Hi Sean, I used the option two on my brooklyn theme and it worked great. I have a few issues though and I was hoping you could help me with it. Or anyone that knows the answer!

 

I have the fixed menu change color when i scroll down, but I don't know how to also change the text and icons, they stay white and can't bee seen properly, I would like them to be grey. Also there is a space between the top of the page and the fixed menu, I would like that not be there, and for the menu to be attached to the top of the page. Screenshot: https://imgur.com/mx3FDG2

 

Also, the menu is too low and covers part of all other pages.  How can I fix that? I already modified the padding on the code for the menu, but that doesn't help.

Screenshot: https://imgur.com/ufkG8no

 

These are my codes:

 

I have this at the end of theme.scss.liquid: 

 

/* CHANGE HEADER TO STICKY */
 
#SearchDrawer {
  z-index:1001;
  
}
 
.site-header {
  position: fixed;
  z-index:1000;
  background-color: #F7F1EB;
  left:0;
  right:0;
 
}
 
.template-index .fixed-header .site-header {
background-color: #F7F1EB;
}
 
#PageContainer {
  padding-top: 100px;
}
 
@media screen and (max-width: 749px) {
#PageContainer {
  padding-top: 70px;
  
}
}

 

And this at the end of theme.js.liquid:

 

// Header

function headerSize() {
var $headerHeight = $('div#shopify-section-header').outerHeight();
$('#PageContainer').css('padding-top', $headerHeight);
}

$(window).on("load", headerSize);
$(window).on("resize", $.debounce(500, headerSize));

$(window).scroll(function() {
scroll = $(window).scrollTop();
if (scroll >= 1) {
$('.site-header').css('top', '0');
} else {
$('.site-header').css('top', 'initial');
}
});

 

 


 

rsdimitrov
Shopify Partner
94 8 29

Hey @Haylalayla 

I have a working solution to the sticky header in brooklyn theme.

Here is my short guide with simple, easy to follow instructions: https://community.shopify.com/c/Technical-Q-A/Sticky-header-transparent-on-home-page-white-backgroun...

I help family-run Shopify stores increase sales from existing traffic Learn More
Problem Solved? Accept the solution so you can help others.
Confused? Busy? Let me solve it for you: rumen@rumendimitrov.com
Did my answer save you time? Buy me a coffee, please 🙂 paypal.me/rsdimitrov

MarBur
Visitor
1 0 0

option 1 - step 5:

filename should be renamed from "theme.js" to "theme.js.liquid" !!!!

 

sticky header works perfect

PalmahTeam
Visitor
1 0 0

Hey Sean, 

 

I'm trying to impliment your code into my website - option 2. Its moving the logo up and down, however the navigation menu is remaining at the top. What I'm seeking is to keep the announce bar and logo at the top, but I would love to have the Navigation menu (which has home, shop, collabs, stories, contact us) to stick to the top as the user scrolls up and down. I'm not a super experienced coder, so I'm hoping you'll able to assist me with this!
Any help from you or others - again would be greatly appreciated!

 

NRGISE
Visitor
2 0 1

Thank you Sean OPtion 1 work a treat for me. 

Nicolo
Tourist
4 0 2

Very nice post! I am currently using the "simple" theme, is this working also on this theme? thank you very much

 

vt26
Visitor
1 0 0

thank you for the solution! 

 

the menu bar is now fixed but the entire header is taking too much space of the screen, is it possible to reduce gap between menu items and the shadowed line?

 

Inkedcapture_LI_.jpg

brettcasson
Tourist
6 0 4

Thanks a heap.  I had the debut theme and this worked a charm for me!

SurelyWell
Visitor
1 0 1

This works great! However, I'm noticing when the page loads that there's a brief moment where the top of the pages are hidden, and then an animation kicks in so that there's more padding there. I think this is related to the z-index and padding of the elements, but does anyone know what I can do to stop that from happening? Perhaps load the function before the page fully loads?

CJTCoops
Tourist
20 0 2

Hi, I know it's been a long time but did you get this fixed?

 

mudcake
Tourist
4 1 2

This is too good! Thank you so much for the information, it was clear, and easy to do as well. 😄

unikforce
Shopify Partner
6 0 1

This could be fix by css. So you can write css there.

If you have a complicate or such a tough bugs then contact me for solutions.
Wanna get 100% satisfaction Hire me.
- Feel free to contact me on freelancerakibul@gmail.com regarding any help
Shopify Developer | Skype : rabby.hazi
Shopify Design | Custom Section and Settings | Shopify Custom Features

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on freelancerakibul@gmail.com regarding any help
Shopify Partner | Skype : raaby.hazi
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

prakashmatre
Visitor
1 0 0

It's working fine. Thanks.

AwardYouShop
Visitor
1 0 0

Very easy and works perfectly, I would give you 10 likes if I could

sneakytools
Visitor
1 0 0

Thank you very much! It's working.

GCWebTeam
Shopify Partner
158 13 170

Working flawlessly, very well written up

Dan the web man - GCWebTeam.com | Shopify Partner | FB Partner | Google Partner Need help with your store or Google ads / social media marketing? Hire: gcwebteam.com

Andogagra
Tourist
7 0 0

Thank! Excellent and useful information, everything works!

marchatton
Visitor
1 0 0

how can i undo this?

 

PhilipO
Tourist
3 0 1

Hey

thanks for this feature but:

The sticky header is hiding content underneath. I used Option 2 Because I want the announcement Bar to show up just in the beginning.

can anyone help me asap pls?

thanks 

philip