Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #14599

    I am looking to create some landing pages, but need to remove the following elements to make them more effective:

    - Shopping cart menu bar

    – Navigation

    – Social media buttons (in header)

    – Breadcrumbs

    I would appreciate any and all help in showing me how to remove or simply (dispay: none) these elements for a specific page only so none of the other pages / posts are affected.

    Thanks in advance



    Duplicate template-archives.php then find this code

    Template Name: Archives

    Change the template name and edit the structure. :)




    Thank you for the quick reply Ismael, but that either didn’t work or I’m not doing something correctly.

    When I try to even just comment out sections I don’t want to show up the elements don’t get removed from the page.

    For example, I commented out the breadcrumb trail and they remained on the page.

    Any advice?



    When you create the landing page, do you select the template you created in Ismael’s post above? By that I mean, when you go to Pages > Your Landing Page on the right side you should see a dropdown for “Templates”. In that dropdown should be the template you created. You’ll also want to save the file as template-landingpagename.php just so its less confusing if you haven’t done so already.




    Thanks Mya.

    I have done this, but for some reason the elements I am commenting out or even completely removing still show up.



    First, duplicate your header.php and rename it to header-new.php. Open the file and remove these line of codes.

    echo "<div class='main_menu' data-selectname='".__('Select a page','avia_framework')."'>";
    $args = array('theme_location'=>'avia', 'fallback_cb' => 'avia_fallback_menu', 'max_columns'=>4);
    echo "</div>";

    The code above will remove the menu. Now open your new duplicated template file and find this code.


    Replace it with.

    get_header( 'new' );

    Note: You can change the name of the new header. In this case we name it header-new.php, so you have to call get_header( ‘new’ );. Lastly, you need to find this line of code and remove it.

    <?php echo avia_title(); ?>

    This will remove the title, searchbar and social medias.




    Thank you Ismael and Mya.

    Finally got it working as needed.

    I really appreciate the support!



    Glad we could help. :)



Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Removing elements from specific pages’ is closed to new replies.