Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #84152

    Hi,

    Duplicate template-archives.php then find this code

    /*
    Template Name: Archives
    */

    Change the template name and edit the structure. :)

    Regards,

    Ismael

    #84153

    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?

    #84154

    Hi,

    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.

    Regards,

    Mya

    #84155

    Thanks Mya.

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

    #84156

    Hello,

    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);
    wp_nav_menu($args);
    echo "</div>";

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

    get_header();

    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.

    Regards,

    Ismael

    #84157

    Thank you Ismael and Mya.

    Finally got it working as needed.

    I really appreciate the support!

    #84158

    Hey,

    Glad we could help. :)

    Regards,

    Ismael

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

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