WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Accidentally deleted the codes in sidebar (20 posts)

  1. bubbamama
    Member
    Posted 1 year ago #

    this is what i have in the editor now:

    <?php
    /**
     * The Sidebar containing the primary and secondary widget areas.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?>
    
    		<div id="primary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    
    <?php
    	/* When we call the dynamic_sidebar() function, it'll spit out
    	 * the widgets for that widget area. If it instead returns false,
    	 * then the sidebar simply doesn't exist, so we'll hard-code in
    	 * some default sidebar stuff just in case.
    	 */
    	if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    
    			<li id="search" class="widget-container widget_search">
    				<?php get_search_form(); ?>
    
    			<li id="archives" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
    
    <ul>
    					<?php wp_get_archives( 'type=monthly' ); ?>
    				</ul>
    			<li id="meta" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
    
    <ul>
    					<?php wp_register(); ?>
    
    <li><?php wp_loginout(); ?></li>
    					<?php wp_meta(); ?>
    				</ul>
    		<?php endif; // end primary widget area ?>
    
    		</div><!-- #primary .widget-area -->
    
    <?php
    	// A second sidebar for widgets, just because.
    	if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
    
    		<div id="secondary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    				<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
    
    		</div><!-- #secondary .widget-area -->
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Which theme is that?

  3. bubbamama
    Member
    Posted 1 year ago #

    Twenty Ten

  4. shadez
    Member
    Posted 1 year ago #

    well, good hosting providers (including shared ones) provide a free backup of your files. do have a look via http://ftp..

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @bubbamama, perhaps easier is to just upload a new copy of that file to your site via FTP. You can get it from downloading a new copy of twentyten to your desktop.

  6. bubbamama
    Member
    Posted 1 year ago #

    ermmmm.... how do i do it? I m totally new to this hosting of my blog. i m not even sure if i have an ftp tunnel.

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Where is your site hosted? You'll need to check with them about FTP access. This explains more about how it works:

    http://codex.wordpress.org/FTP_Clients

  8. bubbamama
    Member
    Posted 1 year ago #

    my blog is hosted by bluehost... i just saw the ftp access... i havent updated the password yet so maybe i should do that first?

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yes, you need to have FTP set up on your site (for other things besides this) -- but the specifics of doing that are through Bluehost, not here. They have good documentation and customer support, so ask there if you get stuck with it.

  10. bubbamama
    Member
    Posted 1 year ago #

    ok thanks! i will set it up now and then send them an email to ask for help.

    Hope this works.... ;)

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    One other thing is that you should not be making any changes to the theme files -- but rather using a child theme - so that your changes won't be erased when WP is updated:

    http://codex.wordpress.org/Child_Themes

  12. bubbamama
    Member
    Posted 1 year ago #

    I sorted out the FTP access but somehow i dont quite get how i can get this last portion of the codes back into the editor.
    whats the easiest way to get it done?

    i forgot to copy and paste over the portion i deleted in a word document in case i deleted the wrong portion. anyway, it's the last portion that i deleted and its missing now. I dont quite get how i can get it completed.

  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Download a new copy of the theme to your local computer. Then look in the folder and find the file that you messed up. Using FTP, move that file to your WP installation -- in the theme folder.

    Also, just so you know, you should never use Word for any code -- as it can corrupt it and cause problems. Instead use a Text Editor -

    http://codex.wordpress.org/Editing_Files#Using_Text_Editors

    Be sure that if you are making any changes to you theme files, that you are using a child theme -- see above link.

  14. bubbamama
    Member
    Posted 1 year ago #

    where do i download it from? wordpress.org?

  15. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

  16. bubbamama
    Member
    Posted 1 year ago #

    Thanks, gonna do it right now.

  17. bubbamama
    Member
    Posted 1 year ago #

    i downloaded the theme and found the sidebar folder i messed up but i can't find the theme folder.

  18. bubbamama
    Member
    Posted 1 year ago #

    Thanks guys! It's all sorted! ;)

    http://www.bubbamama.com

    its up and running again!

  19. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    YAY - good job!

  20. bubbamama
    Member
    Posted 1 year ago #

    Thank you so much for your help!
    Now i have to make some changes to the blog itself!

Topic Closed

This topic has been closed to new replies.

About this Topic