Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1467933

    Hi Team,
    I use this code for show an widget Area after content (before header) for all portfolio items:

    function enfold_widget_before_footer_for_single_portfolio() {
    if(is_singular(‘post’) || is_singular(‘portfolio’)){

    dynamic_sidebar( ‘portfoliocontact’ );
    }
    }
    add_action(‘ava_after_content’, ‘enfold_widget_before_footer_for_single_portfolio’ );

    But this don’t work – why?
    Thank you
    Michael

    #1467947

    Hey Mike61,
    Your snippet is using the hook ava_after_content, so it will show after the content, if you want the widget to show before the header you will need to use ava_main_header
    Like this:

    function enfold_widget_before_header_for_single_portfolio() {
    if(is_singular('post') || is_singular('portfolio')){
    
    dynamic_sidebar( 'portfoliocontact' );
    }
    }
    add_action('ava_main_header', 'enfold_widget_before_header_for_single_portfolio' );

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1467951

    Hey Mike,

    Yes, your code shows the widget before / above the header, sorry, that was my mistake. I need the widget after the content and before the FOOTER!

    Best regards
    Michael

    • This reply was modified 1 month, 3 weeks ago by Mike61.
    #1467957

    Hi,
    Try this instead

    function enfold_widget_before_footer_for_single_portfolio() {
    if(is_singular('post') || is_singular('portfolio')){
    
    dynamic_sidebar( 'portfoliocontact' );
    }
    }
    add_action('ava_before_footer', 'enfold_widget_before_footer_for_single_portfolio' );

    Best regards,
    Mike

    #1467958

    Hi Mike,

    thank you, this will work!

    Best regards
    Mike

    #1467961

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Widget Area after Portfolio Content don’t work?!’ is closed to new replies.