Give help. Get help.

  • # August 14, 2012 at 5:43 am

    Hello, would anyone know what lines of php I could put in my header which would show a certain link if you are on a certain page?

    Eg. If you are on the “Home” page display this link. If you are on the “Contact” page display this link?

    Thank you,

    # August 14, 2012 at 5:58 am

    Any PHP site? Or a particular platform…..Wordpress?

    # August 21, 2012 at 1:42 pm

    basic example:

    $setPage = $_SERVER;
    $currPage = trim($getPage, '/');

    if($currPage == 'WTFOMG.php'){
    echo 'do some stuff';
    }elseif($currPage == 'GMOFTW.php'){
    echo 'ffuts emos od';
    // echo out a link or something fun and creative
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.