• I would like to customize the code of posts listed in a dynamic sidebar. I know this is likely super easy but I’m lost.

    I can change parameters of the widget in the functions.php file in my theme:

    register_sidebar( array(
    ‘name’ => __( ‘Primary Widget Area’, ‘theme’ ),
    ‘id’ => ‘primary-widget-area’,
    ‘description’ => __( ‘The primary widget area’, ‘theme’ ),
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget-container %2$s”>’,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h2 class=”widget-title”>’,
    ‘after_title’ => ‘</h2>’,
    ) );

    But I’m unsure on how to add the class ‘post’ to the individual
    <li>‘s within that widget.
    [mod: please use the code button or backticks to mark code]

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Thread Starter swortis

    (@swortis)

    “But I’m unsure on how to add the class ‘post’ to the individual
    li’s within that widget.”

    (the tag was stripped out)

Viewing 1 replies (of 1 total)
  • The topic ‘Customing code within dynamic sidebar widget’ is closed to new replies.