ThemeShaper Forums » Thematic

[closed]

Menu Removed from 1 Page

(6 posts)
  • Started 3 years ago by BenParis
  • Latest reply from BenParis
  • This topic is not resolved

Tags:

  1. Hi I'm trying to remove the #access div from one page (affiliate).

    I have tried

    body.slug-affiliate #access

    and

    function remove_menu() {
    if (is_page('affiliate')) {
    remove_action('thematic_header','thematic_access',9);
    }
    add_action('init', 'remove_menu');
    }

    with no love.

    Any help much appreciated

    Thanks Ben Paris

    Posted 3 years ago #
  2. Thanks Helga.

    sorry i feel like a noob.
    So it's a 2 step solutions
    create a page template ( affiliate.php) with this in it

    function remove_access() {
    if is_page('affiliate) {
    {
    remove_action('thematic_header','thematic_access',9);
    }
    }
    add_action('template_redirect','remove_access');
    ________________________________________________________________________

    I then insert something into the functions.php file to call it?

    Posted 3 years ago #
  3. if you want to use it for a specific page then you don't need to create a separate template. as discussed in that thread the conditional will always be false when hooked into init. I don't totally understand why, just that it is necessary to hook into a different function. hooking into template_redirect works if you are doing an if is_page. i found that didn't work for if(is_page_template) and I had to hook into wp_head

    drop this into your functions.php

    function remove_menu() {
    if (is_page('affiliate')) {
    remove_action('thematic_header','thematic_access',9);
    }
    add_action('template_redirect', 'remove_menu');
    }
    Posted 3 years ago #
  4. I've dropped that into my functions.php

    unfortunately it doesn't work. I've done nothing else should I have don't something else for this to work?

    Sorry to keep bothering you.

    Posted 3 years ago #
  5. i should also add that if i remove the if (is_page('affiliate')) it works fine by removes the menu from the whole site

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.