Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to animate this div like the others? WordPress


Hello I have a theme from themeforest that has some javascript movement in it.

I have added a div that contains an image and a link, however this div is showing on the homepage, I would like to hide it on the homepage but show on all other pages.

I would like to make this div animate with the same movement as the page load.

Please see the attached image for the link to my site, The button I would like animating is the register button that shows on the homepage.

Thank You

Answers (5)


Arnav Joy answers:

Hi Ross,

I would like to help you for this , please send me ftp.


Ross Gosling comments:

Hello Arnav, I have sent you PM

Arnav Joy comments:

Hi Ross ,

Please check the site and let me know if there is any issue.

Arnav Joy comments:

Ross , Please check I have corrected the issue told by you.


Romel Apuya answers:


I can surely help you with this.

send me ftp and login details




Nilesh shiragave answers:

If you set your home page as a static from Readings Settings at Settings->Reading in admin then you have to add following code to display div/html code just on home page

<?php if(!is_front_page()): ?>
<!-- Add Your Div Code here -->
<?php endif; ?>

Let me know your home page is set from readings settings or not?

Ross Gosling comments:

Thank you for you help, I tried your option but did not quite work.


Agus Setiawan answers:

hope this help you :

replace this line : <strong><a href="http://YOURDOMAINNAME/register/" title="Register"><div id="registerbutton"></div></a></strong>

with this code :

if (!is_home() ) {
<a href="http://YOURDOMAINNAME/register/" title="Register"><div id="registerbutton"></div></a>


use CURL function to detect is homepage or not :

function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
} else {
return $pageURL;

echo '<a href="http://YOURDOMAINNAME/register/" title="Register"><div id="registerbutton"></div></a>';


Ross Gosling comments:

Thank you for you help, I tried both your options but did not quite work.


Pau answers:

If you added the div manually or directly into the file then change it to this:

<?php if( is_home() ) : ?>
your div code here
<?php endif; ?>