Get rid of the paralax header for some pages in Supreme

This topic contains 7 replies, has 5 voices, and was last updated by  mb 7 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #389714

    mb
    Buyer
    Post count: 151

    Hi,

    I couldn’t see a specific section for Supreme Theme, so I am positng my question here:

    I need to get rid of the paralax header on some pages, for example it is ok to appear on the gd_place and gd_event but I don’t need it for:
    – single pages
    – single posts
    – archive pages
    – taxonomy pages
    – category pages
    – May be lso the Home page

    Which files contain the code I should work with to achieve that?

    Thanks.

    #389722

    Kor
    Moderator
    Post count: 16516

    Hi Mb,

    Please share the URL of the pages listed and I’ll provide you the custom CSS to achieve this.

    Thanks!

    #389737

    mb
    Buyer
    Post count: 151

    Hi, thanks for the CSS solution proposal but this is not what I meant.

    If I hide some header areas with CSS, but I need to show h1 for SEO or UX, I will have then double H1 for those pages where the header is hidden, but the h1 is printed in the code already in the paralax header.

    Double h1 are problem for SEO.

    I need to completely disable the header code for some pages. I would just need your guidance in which files and where in the code exactly the headers are controlled for Supreme. I will add then my own conditions to allow the paralax header to appear or not on specific pages/posts.

    Looking forward to hearing from you and thanks in advance

    #389779

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    The developers will let you know how to do that after the week end.

    Thanks

    #389818

    mb
    Buyer
    Post count: 151

    Thanks, you are a treasure!

    Looking forward and have a nice weekend

    #390069

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi mb,

    There is no way to remove it per post type other than maybe CSS, but you can add this meta value “sd_remove_head” = 1 to any post/page and it will remove it for you.

    Thanks,

    Stiofan

    #390079

    Giri
    Expired Member
    Post count: 3155

    Hi mb,

    Here is the snippet I added for UsersWP compatibility. The following code hides the supreme banners in UsersWP pages.

    
    
    add_filter('get_post_metadata', 'sd_hide_banner_on_uwp_pages', 10, 4);
    function sd_hide_banner_on_uwp_pages($metadata, $object_id, $meta_key, $single) {
        if (defined('USERSWP_VERSION') && is_uwp_page()) {
            if ($meta_key == 'sd_remove_head' && $single) {
                $metadata = "1";
            }
        }
        return $metadata;
    }

    You can replace the UsersWP if check with this code.

    
    
    global $post_type;
    $post_types = geodir_get_posttypes();
    if(!in_array($post_type, $post_types)) 

    That would hide the banner in all other pages except gd detail pages.

    Hope that helps.

    Let me know if you can’t make that work.

    Thanks

    #390711

    mb
    Buyer
    Post count: 151

    Stiofan, the custom field worked perfect. It is easy to start with.

    Giri, I will definately try your code when the need of more customizations is really there.

    Thank you for the help!!!

    Let’s mark the ticket as solved.

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount