• Resolved phaze112

    (@phaze112)


    I am trying to check to see if I am at the root of my site or not. Are there any functions for this at all?

    I know about is_home and is_front_page but they don’t work for me.

    Yea I see what you mean. The only problem I am having is my home page or lets call it root of my site is here:
    http://www.acne-skin.org/

    and I am trying to get the same style sheet element, call it class XYZ to display differently on this page of my site
    http://www.acne-skin.org/?gccid=139475

    But to do that I need to do something like:
    if (is_root()) then
    .XYZ{
    css code here;}
    else
    XYZ{
    other css code here;}

    Does that make sense?

    thanks for any help,

    Travis

Viewing 1 replies (of 1 total)
  • Thread Starter phaze112

    (@phaze112)

    I solved it and what I did was this:

    <?php
    $x=$_SERVER[‘REQUEST_URI’];
    if ($x==’/’){
    echo “<style>CUSTOM CSS HERE</style>”;
    }
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Can I Check To See If I’m At The Root Of My Site?’ is closed to new replies.