Support » Plugins » Widget File Location

  • I have added the widget for ‘Recent Posts’. I now want to control how/where this information is displayed, however I am a
    little confused, the information shows on the right hand side bar, but when I look at sidebar.php there is nothing about recent
    posts in there? Which file should I be looking at?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Bump I have the same question.

    Your template files will only have a function call to load the sidebar contents, that’s why it’s a “dynamic” sidebar.

    All sidebars and widgets are controlled under the Design menu, Widgets. But I bet you know this, because you have to go there to add widgets to a sidebar. Click on the widget on the right, while it’s shown in its sidebar, and some widgets have settings you can change.

    If those settings aren’t sufficient, or unclear, check the plugin’s readme file. There may be other settings or changes you can make.

    Ok I got that.

    Let me ask you this.

    In the Cutline theme, l_sidebar and r_sidebar default are coded to show what they want. But as soon as you add a widget to a sidebar, that supersedes those 2 php files. Correct? Assuming that is true, where can you go in and edit the code after you add the widget, take for example categories, if I wanted to only display certain cats, which I know how to do from the codex, about the loop, and also reading, but then wanted another category widget added for another category.

    To do this, is the only reason I can see why they let you add multiple instances of the category widget, unless I am missing something completely.

    If the dynamic sidebar is empty, the if statement will result in that code being executed, otherwise it will be skipped.

    Some widgets have no settings, and as a result, many people find they don’t meet their particular needs.

    If the widget is too plain vanilla, you’ll need to try one of the alternatives in the Plugin Directory.

    Or move the section of code in the sidebar template outside of the if statement, so it is displayed before or after your dynamic sidebar.

    You suggest “Move the section of code in the sidebar template outside of the if statement, so it is displayed before or after your dynamic sidebar.”

    My problem is I cannotfind any section relating to the Recent Posts section anywhere, and yet when my page is shown in the browser it is displayed within the sidebar and I do not want it there.

    @millsy: You won’t find anything related to Recent Posts anywhere in your theme directory.

    You need to go to Admin, Design, Widgets. Choose the sidebar from the dropdown if you have more than one. Your Recent Posts widget will be in there. And all the other widgets too.

    It is there, but all it allows me to do is change the title and the number of posts to show. What about being able to change the location and style of the widget?

    The location depends on which sidebar you put it in and in what order.

    The style depends on what you have in your style.css file. You can do a lot with CSS, and specifically affect just that widget or all your widgets in general.

    I have used the default theme, and it is in ‘sidebar 1’ on my widget design page.

    I know I can do alot with CSS to syle my widget but at the moment it is in totally the wrong location on my page.

    @millsy – then try a different theme with different sidebars, or customize your theme. You might find help on that in the Themes forum. Or read the Docs on customizing your blog.

    Since this post is at the top of google, and yet unanswered,


    that is the name of the wordpress widget file

    And to further clarify, widgets.php is located in /wp-includes/.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Widget File Location’ is closed to new replies.