Home Forums Xi Theme Discussion & Support Remove Theme Support

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  themeweaver 4 years, 3 months ago.

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

    Cam Collins
    Participant
    Post count: 8

    I read the post on how to Disable Event Mangement in XI so I can use the Events Manager Pro plug-in. http://themeloom.com/forums/topic/disabling-event-feature/

    I have a child XI theme called Surfhero, so I prefer the idea of adding ‘remove_theme_support’ to my functions.php file instead of commenting out add_theme_support in Xi. Commenting out this function in the Living_OS/functions.php did work. But when I tried to write a function in Surfhero/functions.php and wasn’t able to get it to work. NOTE: my child theme is working because I have other functions working.

    Here is my code:

    function remove_some_things () {
    	//get theme options
    	$options = get_option( 'livingos_theme_options' );
    
    	remove_theme_support(‘livingos_event_manager’);
    }
    add_action( 'after_setup_theme', 'remove_some_things', 15 );

    NOTE: that I played with the add_action priority. Made it ‘5’, ’10’ and ’15’. None of these removed the Event Management function.

    Thanks!

    #3359

    themeweaver
    Keymaster
    Post count: 730

    This is what we have and works in a child theme functions.php

    // child theme setup to change the way theme behaves
    function los_child_setup() {
    	
    	// EXAMPLE : you can turn off events like this:
    	 remove_theme_support('livingos_event_manager');
    	
    }
    add_action( 'after_setup_theme', 'los_child_setup', 11 );

    Priority needs to be at least 11 to work.

    Not sure what is wrong with your code, but the quote marks in your remove_theme_support function seem a bit odd!

    #3364

    Cam Collins
    Participant
    Post count: 8

    The quote was hosed up. Good eye. Thank you. I can now upgrade to 3.1!!

    Best,

    Cam

    #3366

    themeweaver
    Keymaster
    Post count: 730

    🙂

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

You must be logged in to reply to this topic.