Okay
  Public Ticket #402178
Sensei Integration Question
Closed

Comments

  • Raymond started the conversation

    I am attempting to integrate the Sensei plugin (http://www.woothemes.com/products/sensei/) with Salient and their directions (http://docs.woothemes.com/document/sensei-and-theme-compatibility/) call for declaring my own content wrappers within my theme's functions.php (I am using my own child theme). Based on how Salient begins/ends the wrapper, I've modified the recommended Sensei code with this:

    // Unhook default Sensei wrappers
    global $woothemes_sensei;
    remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
    remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );


    // Hook Sensei wrappers for Salient Theme
    add_action('sensei_before_main_content', 'my_theme_wrapper_start', 10);
    add_action('sensei_after_main_content', 'my_theme_wrapper_end', 10);

    function my_theme_wrapper_start() {
    echo 'ID); ?>

    ';
    }

    function my_theme_wrapper_end() {
    echo '

    ';
    }

    Am I doing something wrong with my function my_theme_wrapper_start() & end()?

    I unfortunately get the attached result (an errant "ID); ?>") when visiting a page that is processed via Sensei...any ideas as to why?

    Thanks!

    UPDATE: Wow, just by posting this request I can see the problem, but don't know how to address it! When I pasted in my code as typed into my functions.php the resulting paste in this field ended up showing me why I am seeing what I see! I am attaching a screenshot of my code as a 2nd pic attachment...hopefully you can help me resolve the proper way to declare the functions given the Salient wrapper...thanks for any assistance.

  • Raymond replied

    UPDATE2: OK I think I figured out my error...to remove the <?php nectar_page_header($post->ID); ?> from the echo.....it seems to work now so unless I misunderstood my own fix, consider this self-rectified. :)