WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] editing the sidebar (10 posts)

  1. TGC5308
    Member
    Posted 4 years ago #

    I would like to add a graphic and link to one of the sidebars. I need to plug in the code for this.

    When I go to the Edit page I see the header, footer, middle and several other areas, but nothing I recognize as the sidebars.

  2. bytesforall
    Member
    Posted 4 years ago #

    Use a widget to add content to a sidebar. Put the content into a widget and place the widget in a sidebar.

  3. TGC5308
    Member
    Posted 4 years ago #

    I would like to add a graphic and link to one of the sidebars. I need to plug in the code for this.

    When I go to the Edit page I see the header, footer, middle and several other areas, but nothing I recognize as the sidebars.

  4. agunks_17
    Member
    Posted 4 years ago #

    what is your theme??

  5. TGC5308
    Member
    Posted 4 years ago #

  6. TGC5308
    Member
    Posted 4 years ago #

    Hi:
    I still need to find out how to put in codes for ads and a link to the sidebars. I am guessing I do this from the Edit page.

    Thanks.

  7. hungjon
    Member
    Posted 4 years ago #

    Running into a similar problem. Trying to add text and a custom image field the way other blogs do their feature section.

    @TGC5308 I discovered that if you leave the theme options alone, you can indeed edit the sidebar code by diving into the footer.php --

    namely, find this section in footer.php:

    <!-- Right Sidebar -->
    <td id="right">
    
    	<?php // Widgetize the Right Sidebar
    	if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>
    
        	<div class="widget"><div class="widget-title">
        	<h3>Recent Posts</h3></div>
    <?php $r = new WP_Query(array(
    	'showposts' => 20,
    	'what_to_show' => 'posts',
    	'nopaging' => 0,
    	'post_status' => 'publish',
    	'caller_get_posts' => 1));
    if ($r->have_posts()) : ?>
    <ul><?php  while ($r->have_posts()) : $r->the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
        	<?php endwhile; ?>
        	</ul>
        	<?php wp_reset_query();  // Restore global post data stomped by the_post().
        	endif; ?>
        </div>
    
       ......
    
    <!-- / Right Sidebar -->

    The problem is, once you "widgetize the sidebar", (that is.. using the dashboard to add widgets to the appearance of the right sidebar) I can find no way of editing the code. I'm gonna try tinkering some more, possibly dive into the PHP of wp-includes/widgets.php

    wish me luck!

  8. ChiefAlchemist
    Member
    Posted 4 years ago #

    Pardon me but can't you just use the text widget and do your image & link HTML with that?

  9. TGC5308
    Member
    Posted 4 years ago #

    Now I get it. I didn't realize that the text widget was actually blank. BytesForAll told me that a month ago and it just didn't seem to click.

    Thanks, ChiefAlchemist.

    hungjon, go to the text widget and just plug your code there. I don't know why I made this so hard.

  10. Danielle Parsons
    Member
    Posted 4 years ago #

    I have an issue with the right sidebar on this site: Avazzia

    Ever since my second post, the blogroll and meta and calendar appear way down the page. I went in and selected the Atahualpa settings reset.

    Is my problem due to changing the header image and removing the opacity? I have tried several things and want that dashed area on the right to appear again and not have my sidebar components way down the page.
    Thanks,
    Danielle Parsons
    360.383.0265 Pacific Weekdays

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags