[Support request] Issues with custom foot widgets

Home Forums Support [Support request] Issues with custom foot widgets

Home Forums Support Issues with custom foot widgets

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #474758
    Thomas

    For some reason, the code below is not working for me.

    Im trying to set
    cpt1 = 3 widgets (working)
    blog single pages = 3 (not working)
    default = 0 (working)

    add_filter( ‘generate_footer_widgets’,’tu_custom_blog_footer_widgets’ );
    function tu_custom_blog_footer_widgets( $widgets )
    {
    // If we are on the blog, set the number
    if ( is_singular( ‘cpt1’ ) )
    return ‘3’;

    if ( is_singular( ‘post’ ) )
    return ‘3’;

    // Or else, set the regular number
    return $widgets;

    }

    #474842
    Leo
    Staff
    Customer Support
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.