Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know PHP well but I'm new to Wordpress. I got an incomplete Wordpress website. It has a static home page with an Aweber newsletter form. I tried digging into installed theme and in home.php I came across:

<div class="home-infobox">
<?php if ( is_active_sidebar( 'homepage-infobox' ) ) : ?>
    <?php dynamic_sidebar( 'homepage-infobox' ); ?>
<?php endif; ?>
</div>

Now when I view source on the home page, the Aweber newsletter subscription form appears exactly within <div class="home-infobox">. I have to make changes to the form as my first step and I tried to figure out from where is it fetching the content? Is it from the database or from any PHP files, I am totally clueless. Please help me figure this out.

share|improve this question
    
What changes do you want to make? Are you referring to styling that specific widget or the contents of that widget? –  Brad Dalton Jan 13 at 1:26
add comment

2 Answers

You are looking at, as the function name suggests, a dynamic sidebar. Content that fills that sidebar should come from sidebar widgets, some of which are provided by the WordPress core but many (most) are provided by plugins and themes. Widgets could populate themselves from the database, or from external sources like RSS feeds, or may be hard-coded to display static data. It depends on the widget. If you look at the markup inside the sidebar for the individual elements you can usually work out what plugin is creating the widget. Check the CSS classes and ids.

share|improve this answer
    
Thanks, Aweber has its own plugin but this plugin is not installed on the website. RSS feeds are not possible as I can run the website on an offline machine. So either it is static or it is from database. It has <img> tags which have images from the theme folder. CSS classes and ids are found in theme's style.css, I tried doing a full folder search for the tags but they were detected ONLY in style.css, not in any other file. So does that indicate towards database? Can you suggest any specific tables to check? –  Zeeshan Apr 10 '13 at 15:21
    
You should avoid hacking the database. That is a dangerous game. Find the code that is generating the widgets first. Without knowing what widgets you are talking about I can't narrow that down. You may not find the class names written anywhere but the stylesheet but you can often infer from those names to the plugin or theme that created the widget. –  s_ha_dum Apr 10 '13 at 15:27
add comment

It may not be in the database. It's more than likely in a theme based functions file you haven't checked.

You'll want to check the functions.php of the theme folder. Either that or an includes/theme-init.php file may have the associated code for your dynamic sidebar.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.