Please add this code in the 3rd Party JavaScript Section for adding Custom Text on the HOME, CATEGORY and SUB-CATEGORY pages just above the footer.



Things to be changed in the code before using it on the store:

  • Line 2 to Line 4 can be used for adding text only on the HOME page
  • Line 5 to Line 7 can be used for adding text only on the CATEGORY / SUB-CATEGORY pages. These lines can be duplicated if custom text has to be added on multiple category/sub-category pages.
  • "ENTER THE REMAINING URL AFTER THE FIRST SLASH AFTER THE DOMAIN NAME" has to be changed by the actual URL of the category or sub-category page. For E.g.: If the URL is "http://www.domainname.com/CategoryName-depid-296597-page-1.html" then replace the above text by "CategoryName-depid-296597-page-1.html"
  • "TITLE ON HOME PAGE" can be changed with the required text
  • "CONTENT ON HOME PAGE" can be changed with the required text
  • "TITLE ON CATEGORY PAGE" can be changed with the required text
  • "CONTENT ON CATEGORY PAGE" can be changed with the required text 

 

<script>
if(window.location.pathname == "/"){
jQuery("#loading_icon").after("<section class='span12 pageContent'><h1>TITLE ON HOME PAGE</h1>CONTENT ON HOME PAGE</section>");
}
else if (window.location.pathname == "/ENTER THE REMAINING URL AFTER THE FIRST SLASH AFTER THE DOMAIN NAME"){
jQuery("#loading_icon").after("<section class='span12 pageContent'><h1>TITLE ON CATEGORY PAGE</h1>CONTENT ON CATEGORY PAGE</section>");
}
</script>

 

The output of the above code will look as shown in the image below.