jeudi 1 novembre 2018

PHP - if URL is *this* then do *this*

I'm trying to create a PHP if statement that loads HTML elements on all pages except one. Here is my code:

{if $_post['post_type'] == "hiddenshared" && *URL != index.php*}

<span class="js_user-popover" data-type="{$_post['origin']['user_type']}" 
data-uid="{$_post['origin']['user_id']}">
    <a href="{$_post['origin']['post_author_url']}">
        {$_post['origin']['post_author_name']}
    </a>{__("'s")}
 </span>

How should I change the section of my if statement so that if the site is not index.php, the following code executes? Thanks in advance for your help

Aucun commentaire:

Enregistrer un commentaire