generate different IDs in functions.php (3 posts)

  1. cristiMaghiar
    Posted 5 years ago #


    in functions.php i have

    function snowsummit_widgets_init() {
    	// Area 2, located at the top of the sidebar.
    	register_sidebar( array(
    		'name' => __( 'Primary Widget Area', 'snowsummit' ),
    		'id' => 'sidebar-1',
    		'description' => __( 'The primary widget area', 'snowsummit' ),
    		'before_widget' => '<div class="infobox">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3>',
    		'after_title' => '</h3>',
    	) );

    I want to give to <h3> an unique ID, so I can control them individualy by CSS, in my widget i will have about 7-10 menus that will start with this <h3> and i want them hav different styles

    i tried using the_ID() but no luck...
    please help!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    'before_title' => '<h3 id="%1$s">',

  3. cristiMaghiar
    Posted 5 years ago #

    i tried %1$s, %2$s, %3$s, nothing helps

Topic Closed

This topic has been closed to new replies.

About this Topic