• Resolved jaw23

    (@jaw23)


    Is it possible to add widgets in conjunction with hard code in a sidebar.php? If so, please share a sample coding. Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    It’s not that hard to do exactly that. Look at wp-content/themes/default/sidebar.php around line 9. It should read

    <?php   /* Widgetized sidebar, if you have the plugin installed. */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

    That’s where the widgets get displayed. You can put your PHP coded above or below there.

    NOTE: Make a copy of the theme in a new directory and don’t edit the default theme directly.

    Thread Starter jaw23

    (@jaw23)

    brilliant! much simpler than what I was trying to do. thanks so much. and thanks for such a quick response!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘can I use hard coding and widgets?’ is closed to new replies.