Remove Spotlight on User Page only

How to show spotlight section on Home page only, but remove spotlight section on all other pages?

  • I have success did it!!! I used php if else statement to show spotlight section if the url of current page is homepage or index page. Here is the code :

    <?php
            $homepage1 = "/";
            $currentpage1 = $_SERVER['REQUEST_URI'];
            if($homepage1==$currentpage1) {
            echo elgg_view('page_elements/spotlight', $vars);
            }
     ?>

    Note that it is not working on WAMPserver / Xampp localhost because the homepage url is not the same as your online web hosting / server. You can echo $currentpage1 to check the url of current page.

    Demo at : http://plekz.com

  • You can do it the ghetto way and put display:none in the custom index plugin lol

  • @Cim, Spotlight is not in custom_index. They both are different plugins. Custom Index control the body of Home page. Spotlight is not in the body, Spotlight is at the middle of Header and Body. Furthermore if put display:none, Spotlight will not show on Home page anymore, I want it show on Homepage and hide from all other pages.

  • ohhhhhhh i read it wrong

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking