Forums

New to php. Need some PHP help (4 posts)

  1. Cixxy
    Member
    Posted 3 years ago #

    Hi im just wondering on my site,
    http://www.anothera.net/v2
    how do i make it so that the headings Origins, News and Archives only appear for the index.php page and not the others?

    I have tried things with Sites in the wordpress admin, but clearly wordpress isnt built by default to do such a thing. So I'm guessing I have to go with PHP? I have tried something like adding <?php if (is_home()); ?> to the start of those headings and <?php endif to the bottom of them. Doesn't work though.

    Any help would be v. appreciate ty.

  2. Cixxy
    Member
    Posted 3 years ago #

    and also so that stuff like Tags won't use all of that headings as well.

  3. Cixxy
    Member
    Posted 3 years ago #

    worked it out by

    <?php if ( is_home() ) { include ('file.php'); } ?>

    but , how to do it instead of including? like <open> </end> kind of way?

  4. Hiranthi
    Member
    Posted 3 years ago #

    Well, the following should have the same result:

    <?php if ( is_home() ) {?>
    <!-- YOUR HTML HERE -->
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.