WordPress.org

Support

Support » Plugins and Hacks » [Resolved] can I use hard coding and widgets?

[Resolved] can I use hard coding and widgets?

  • 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)
  • Jan Dembowski
    Volunteer Mod. & Brute Squad

    @jdembowski

    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.

    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 ‘[Resolved] can I use hard coding and widgets?’ is closed to new replies.