[Resolved] Remove navigation on landing pages

Home Forums Support [Resolved] Remove navigation on landing pages

Home Forums Support Remove navigation on landing pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1367585
    Jeffery

    Hi guys,

    Thanks for the great template. I have searched a little in the forum but couldn’t find an exact way of doing what I want. So what I am trying to do is, I have a landing page for Google Ads and Facebook Ads. For these landing pages, I would like to remove the navigation but keep the “Logo” part of the navigation (but disable the hyperlink for the logo as well).

    I am trying to prevent people from getting distracted and navigating around when I want them to complete a form. Is there an easy way of doing this without css? I am able to do the css thing because I am quite tech savvy, but I am afraid my other colleagues are not. I have submitted the URL of the landing page as an example.

    #1367843
    Leo
    Staff
    Customer Support

    Hi there,

    You can disable the primary navigation using the disable element metabox:
    https://docs.generatepress.com/article/disable-elements-overview/

    To remove the logo link, you would need this filter with a conditional tag:
    https://docs.generatepress.com/article/generate_logo_href/
    https://codex.wordpress.org/Conditional_Tags#The_Front_Page

    #1367926
    Jeffery

    Alright! Thanks for your help Leo. The Code Snippet plugin is really handy. In case anyone is trying to disable the logo link as well, here is the code I use:

    add_action('get_header', function() {
    if ( is_page(YOUR_PAGE_ID_HERE) ) {
    	add_filter( 'generate_logo_href', function() {
        	return "";
    	} );
    }
    });
    #1368085
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.