incase of line 1 the %2$s is printing widget-3 (where the number 3 is variable added to it)
Output HTML>> <div class=”widget-3″ id=”linkcat-9″>
BUT when i use the same code as in line-3 it outputs <h2 class=”section%2$s”>
the above code is for sidebars and i want to add an ID on each element which is dynamic grows as the number of h2 section increases in my side bar. so that i can use the ID to use in JS to access each content of h2 element under the span tag section.
can anybody suggest how to use %2$s or %1$s or add a dynamic id on each of the H2 in sidebar?
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]