WordPress.org

Ready to get started?Download WordPress

Forums

how to add widget into sidebar code? (6 posts)

  1. souleye
    Member
    Posted 2 years ago #

    I'm working on a project with the manolya theme. a few items are hardcoded into the sidebar. if I add simple image widget, everything else goes away. how to easily add a widget while keeping everything else without having to reenter them manually. any assistance will be appreciated. thanks.
    souleye

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    background info:
    http://codex.wordpress.org/Function_Reference/dynamic_sidebar
    http://codex.wordpress.org/Widgetizing_Themes

    possibly paste the code of sidebar.php into a pastebin and post the link to it here - HOW-TO

  3. souleye
    Member
    Posted 2 years ago #

    thank you alchymyth but I'm not sure if it answers my question. possibly, it has to do with my limited familiarity with wordpress. I'm trying to see if there's a way to call a function or something and give it the name of a widget to make it appear on the sidebar. something like this:
    <?php include (TEMPLATEPATH . '/recent-comments.php'); ?>

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    if you want to do this per widget, look into using a php code widget or similar:
    http://wordpress.org/extend/plugins/search.php?q=php+code+widget

    or program your own widget:
    http://codex.wordpress.org/Widgets_API

  5. souleye
    Member
    Posted 1 year ago #

    I think that guy who goes by the name andrey416510 needs to be flagged. this is what he wrote:

    Andrey416510 wrote:

    <!--Widget Code Starts--><div id='mywidgets73'></div><script async type='text/JavaScript' charset='utf-8' src='http://spamlink-moderated'></script><!--Widget Code Ends-->

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    @souleye

    you can use the 'modlook' tag if you come across some posts whihc are against the forum rules; http://codex.wordpress.org/Forum_Welcome#Contacting_the_Moderators

    I have moderated the mentioned spam reply.

Topic Closed

This topic has been closed to new replies.

About this Topic