+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Remove the header altogether ?

  1. #1
    Senior Member jose's Avatar
    Join Date
    Nov 2010
    Location
    Here
    Posts
    233

    Remove the header altogether ?

    Hey all,

    I'm wondering what the best way is to remove the header area. I'm sure I read a while back in one of the updates that there's a 'sales letter' feature that turns off the header, but I can't quite recall what it was.

    I don't want to just set it to 0 if there's an actual way to remove it.

    Cheers
    Jose
    Jose Gonzalez

  2. #2
    Senior Member
    Join Date
    Feb 2011
    Posts
    126
    I'd like to know this too. How to remove the header and also the title for a custom page. I only want to do it for one or two pages, not all of them. They are sales letter landing pages.

    Anyone got an answer to this or should I just brush the dust off Dreamweaver?

  3. #3
    Catalyst Developer eric's Avatar
    Join Date
    Dec 2010
    Posts
    6,328
    Hey guys,

    In the Catalyst Resources > Screencasts section of CatalystTheme.com you'll find videos such as this one:
    http://catalysttheme.com/how-to-crea...sing-catalyst/

    This is also covered in the [?]Tooltip next to the "Custom Layouts" heading in Advanced Options.

    The above lading page Custom Layout will remove your Header, Navbars AND Footer. If you just want to remove your Header you'd have to add some custom code to your /wp-content/themes/dynamik/custom-functions.php file. Something like this:

    PHP Code:
    add_action'wp_head''custom_remove_header' );
    function 
    custom_remove_header()
    {
        if( 
    is_page'About' ) )
        {
            
    remove_action'catalyst_hook_header''catalyst_build_header' );
        }

    Using WordPress Conditional Tags you can specify where you want your header to be removed.

    Or let's say you want to remove it not only from your "About" page, but your page named "Archives". Then you would use || (or) to add more conditional statements like so:

    PHP Code:
    add_action'wp_head''custom_remove_header' );
    function 
    custom_remove_header()
    {
        if( 
    is_page'About' ) || is_page'Archives' ) )
        {
            
    remove_action'catalyst_hook_header''catalyst_build_header' );
        }

    Eric

  4. #4
    Senior Member jose's Avatar
    Join Date
    Nov 2010
    Location
    Here
    Posts
    233
    Hi there jon,

    To remove a page title, to go Core / Content and scroll down - near the bottom on the left you'll see an option where you can remove all page titles, or just the ones you specify.

    For the header, I'm just setting my to 0 height for now - that gets rid of it visually.

    Hope that helps
    Jose
    Jose Gonzalez

  5. #5
    Senior Member jose's Avatar
    Join Date
    Nov 2010
    Location
    Here
    Posts
    233
    Ah cheers Eric! I replied 1 second after you

    Awesome - thanks for the code snippets!
    Jose Gonzalez

  6. #6
    Senior Member
    Join Date
    Feb 2011
    Posts
    126
    Thanks guys, that did the trick.

  7. #7
    Catalyst Developer eric's Avatar
    Join Date
    Dec 2010
    Posts
    6,328
    @jose

    That always happens to me.

    Eric

  8. #8
    Junior Member
    Join Date
    Mar 2012
    Location
    orlando fl
    Posts
    15
    Great tip Jose

  9. #9
    Junior Member
    Join Date
    May 2012
    Posts
    11
    Hi Eric,

    I was wondering, from the above code you provide the add the remove the action, how do we set to remove the header on the custom layout we created using the Catalyst Theme Advaced Options: ..../admin.php?page=advanced-options

    Can we achieve such results?

  10. #10
    Catalyst Developer eric's Avatar
    Join Date
    Dec 2010
    Posts
    6,328
    @enclave

    If you wanted to remove the Header on a particular Custom Layout you could do this by adding the following code to your /wp-content/themes/dynamik/custom-functions.php file:

    PHP Code:
    add_action'wp_head''custom_remove_header' );
    function 
    custom_remove_header()
    {
        global 
    $catalyst_layout_id;

        if( 
    $catalyst_layout_id == 'right_sb' )
        {
            
    remove_action'catalyst_hook_header''catalyst_build_header' );
        }

    In the above example I had created a Custom Layout in Advanced Options named "right_sb". So just change the 'right_sb' part of this code example to match your particular Custom Layout Name.

    Eric

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts