July 22, 2012 at 12:33 am #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
– Social media buttons (in header)
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 advanceJuly 23, 2012 at 12:05 am #84152
Duplicate template-archives.php then find this code
Template Name: Archives
Change the template name and edit the structure. :)
IsmaelJuly 24, 2012 at 4:49 pm #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?July 24, 2012 at 7:32 pm #84154
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.
MyaJuly 24, 2012 at 8:30 pm #84155
I have done this, but for some reason the elements I am commenting out or even completely removing still show up.July 24, 2012 at 11:06 pm #84156
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);
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.
IsmaelJuly 27, 2012 at 9:39 pm #84157
Thank you Ismael and Mya.
Finally got it working as needed.
I really appreciate the support!July 29, 2012 at 3:13 am #84158
The topic ‘Removing elements from specific pages’ is closed to new replies.