• WP 4.5.2
    Flatsome theme 2.9.2

    Hi,

    I am trying to make something extremely simple work. I’m a noob but this should be easy enough.

    I can’t make the right footer content to show only in the homepage. The field is supposed to accept any kind of content.

    I tried a lot of things, the last one is:

    <?php if(is_home() ) { ?>
    
    <a href="https://somelink"><img src="some_image" border="0"  width="33" height="33"></a>
    
    <?php } ?>

    I also tried is_front_page but it just doesn’t work. It shows it on every page.

    Any suggestion? Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello fakurkr,

    Please use the function call wp_reset_query() before the conditional tag to solve this issue of WordPress’s is_home() || is_front_page() is not working.

    Thanks

    Thread Starter Ron Ashman

    (@fakurkr)

    Hi, thanks for you answer.

    I tried this and I’m having the same problem.

    Could it be possible that it’s not “reading” the php code?
    I also tried is_front_page

    <?php wp_reset_query();
    
    if(is_home() ) { ?>
    
    <a href="https://somelink"><img src="some_image" border="0"  width="33" height="33"></a>
    
    <?php } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't make is_home function work properly’ is closed to new replies.