Support » Fixing WordPress » calling the home page

  • Resolved cristiMaghiar

    (@cristimaghiar)


    hi,
    i’m trying to run an audio player only for the home page and i’m using this code

    <?php
    	wp_reset_query();
    	if (is_page('home')) {
    		echo '<p><a href="/audiofiles/EmpireStateofMind.mp3"
    class="wpaudio">empireStateOfMind</a></p>';
    	} else {
    		echo '<p class="no-sound"></p>';
    	}
    	?>

    when i change the the line » if (is_page (‘home’)) to » if (is_page (‘despre noi’)) it works fine for that page, but when the argument is ‘home’ the code generates the empty paragraph. Is there another way to call the first page?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘calling the home page’ is closed to new replies.