Support » Themes and Templates » Help with making a theme widget ready

  • Resolved Rocky

    (@christopherno1)


    Hi!

    I need help to making my theme widget ready, which is really important for me cause i really like the theme i have choosen. I would really appreciate if someone could help me with this:)

    As i have read, there is two type of codes you should put into the sidebar. But i dont know where to put them, however everytime i have put these code in the sidebar CSS it havent worked.

    Here is the code i have read i should put into to the sidebar:

    <?php if (!function_exists(’dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    <?php endif; ?>

    And here is my sidebar code:

    <div id="SIDE">
    
    <div class="Wrapper">
    
    	<ul>
    
    		<?php wp_list_pages('title_li=' ); ?>
    
    		<?php wp_list_categories('show_count=1&title_li='); ?>
    
    	</ul>
    
    	<div class="hr"></div>
    
    	<h2>Archives</h2>
    
    	<ul>
    
    		<?php wp_get_archives('type=monthly'); ?>
    
    	</ul>
    
    	<div class="hr"></div>
    
    	<div>
    
    		<?php get_calendar(); ?>	
    
    	</div>
    
    	<div class="hr"></div>
    
    	<h2>Other</h2>
    
    	<ul>
    
    	<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    
    		<?php wp_list_bookmarks('title_before=&title_li=&title_after='); ?>
    
    	<?php } ?>
    
    			<li>Meta
    
    		<ul>
    
    			<?php wp_register(); ?>
    
    			<li><?php wp_loginout(); ?></li>
    
    			<li><a href="http://www.wpthemesfree.com/" title="WordPress Themes">WordPress Themes</a></li>
    
    			<li><a href="http://www.2mhost.com">web hosting</a></li>
    
    					<?php wp_meta(); ?>
    
    		</ul>
    
    		</li>
    
    	</ul>
    
    	<div class="hr"></div>
    
    	<h2>Syndication</h2>
    
    	<ul class="rss">
    
    		<li><a href="<?php bloginfo('rss2_url'); ?>" >Entries RSS</a></li>
    
    		<li><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments RSS</a></li>
    
    	</ul>
    
    </div>
    
    <div class="Footer"></div>
    
    </div>

    Where should i put the above codes into my sidebar?

    Thanks for helping
    Christopher

Viewing 10 replies - 1 through 10 (of 10 total)
  • should go right under <div id="SIDE">

    Rocky

    (@christopherno1)

    Hi

    Thanks for your answer

    I have put the first code there as you said, but where should i place:

    <?php endif; ?> ?

    However i tried to put this code (<?php endif; ?>) in a lot of different places in the end of the sidebar code, and i can see the widget menu, when i click on “widgets”, but when i try to add a widget with some text, nothing is showing up when i look at my page (besides of those default ones who came with the template).

    I read in a guide that you also should create a functions.php file in your theme, and place this code there;

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar();
    ?>

    I have done this, but i still have the same problem which described above.

    Very thankful for help
    Christopher

    Not that it should matter, but it might try swithcing this…

    <?php if (!function_exists(’dynamic_sidebar’)

    for…

    <?php if (!function_exists('dynamic_sidebar')

    Check this page for how to add widgets the sidebar….
    http://automattic.com/code/widgets/themes/

    This page has a good run-down on widget support to..
    http://www.quickonlinetips.com/archives/2007/11/how-to-widget-enable-wordpress-themes-in-3-easy-steps/

    Rocky

    (@christopherno1)

    Hi

    I have done what you said, and switched to:
    <?php if (!function_exists(‘dynamic_sidebar’)

    And i can now see my widgets, but the problem now, is they are now showing up in the bottom of my page, but i want them to be on the side ,next to my text.

    Here is a link to my website so you see the problem
    http://affiliatecoachen.se

    Regards
    Christopher

    That’s because you have errors in your HTML…

    Fix the errors here first, then see if that clears up the problem..

    Link

    Rocky

    (@christopherno1)

    Hi

    Can you describe how I fix the HTML problems? (sry im a newbie to this) I tried to remove the “text widget” and then it was OK, but i want to use text widgets so i can put HTML and javascript in the sidebar to show ads and so on..,

    However the “widget layout” doesn´t look very good now, as you can see here; http://affiliatecoachen.se

    I want the “widget layout” to be as it was in the first place, as you can see on this link; http://www.wordpresstemplates.com/demo/?theme=Natures+Gift

    Thanks for helping
    Christopher

    Google XHTML/HTML tutorials…

    If you don’t know how to use XHTML then you should spend some time learning how to use it correctly…

    You sidebar has LI elements but does not have any UL or OL containers…

    This would be a complete and correct list..

    <ul>
    <li> example list item </li>
    </ul>

    This is how your sidebar list is being partially generated…

    <li> some stuff</li>

    Missing the opening and closing elements for the list…

    <ul> and </ul>

    Rocky

    (@christopherno1)

    Hi

    Thanks for your answer.

    Well i have read a bit about what you said, but i have not got it to work correctly yet.

    As you can see my sidebar still looks quite ugly;

    http://affiliatecoachen.se

    And i want it to look like this;

    http://www.wordpresstemplates.com/demo/?theme=Natures+Gift

    But maybe you or somemone else can put the elements on the correct playes you said in the post above, in my code in post 1, and then just make a new post here with my code and the elements on the correct places?

    I would really appreciate that to get this problem fixed once and for all:)

    Thanks for helping
    Christopher

    Rocky

    (@christopherno1)

    Please can someone help me with this?, its really urgent. If someone here just can help me solve this little problem and do what i described in the post above i can pay $5 to their PayPal acocunt, or even moore.

    I just need to get this problem fixed.

    Regards
    Christopher

    Check your mail…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Help with making a theme widget ready’ is closed to new replies.