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

    Hi Enfold Team,

    Some weeks ago, Ismael gave me a filter to change the H3 tag on standard widget titles (displayed everywhere).
    Here is the thread : https://kriesi.at/support/topic/change-template-code-in-child-theme/
    I’m adding the filter code at the end of this email

    I would like to do the same thing on a “Sidebar blog” widget (in this case an Enfold “Latest news” widgets.
    Example here, in the sidebar (my title …) : http://586814b516.url-de-test.ws/enfoldsupport/blog/

    Any way to do this ?

    Many thanks for your help

    Hi!

    You have to unregister the existing widget areas then register it back. Example:

    function ava_remove_some_widgets(){
    unregister_sidebar( ‘av_everywhere’ );

    register_sidebar(array(
    ‘name’ => ‘Displayed Everywhere’,
    ‘before_widget’ => ‘<section id=”%1$s” class=”widget clearfix %2$s”>’,
    ‘after_widget’ => ‘<span class=”seperator extralight-border”></span></section>’,
    ‘before_title’ => ‘<h2 class=”widgettitle”>’,
    ‘after_title’ => ‘</h2>’,
    ‘id’=>’av_everywhere’
    ));
    }
    add_action( ‘widgets_init’, ‘ava_remove_some_widgets’, 11 );
    This code in the functions.php file will unregister the “Displayed Everywhere” widget area and then register it back with the “h2” as widget title.

    Regards,
    Ismael

    #670501

    Hey ouranos3,

    Please add following code to functions.php file of your child theme as well

    function ava_remove_some_widgets_blog(){
    	unregister_sidebar( 'av_blog' );
    
        register_sidebar(array(
        	'name' => 'Sidebar Blog',
        	'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">',
        	'after_widget' => '<span class="seperator extralight-border"></span></section>',
        	'before_title' => '<h2 class="widgettitle">',
        	'after_title' => '</h2>',
        	'id'=>'av_blog'
        ));
    }
    add_action( 'widgets_init', 'ava_remove_some_widgets_blog', 11 );

    Best regards,
    Yigit

    #670519

    Thanks, Yigit, perfect.

    #670526

    Hey!

    Please do let us know if you need anything else, we will be happy to assist.

    Regards,
    Basilis

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.