WordPress.org

Ready to get started?Download WordPress

Forums

i can't edit sidebar (8 posts)

  1. bulion
    Member
    Posted 5 years ago #

    Hello.

    Firstable sorry for my english...

    1. I have my theme for WP
    2. Three columns (left sidebar, center - post, right sidebar)
    3. I can edit left sidebar (with wp admin - edit sidebar.php)
    4. I can't edit right sidebar. It always have: categories and blogroll. I also can't edit those names ("categories" "blogroll").
    WTF?

    HOW i can edit right sidebar (puting my own code).

    Please help.

    my website - http://www.lednica2000.pl/motocyklista/

  2. stvwlf
    Member
    Posted 5 years ago #

    You probably have widgets enabled in your right sidebar

    Go to Admin
    Click on Appearance, then on Widgets. Remove the category and blogroll widgets from your right sidebar. Then WordPress will execute your code in the sidebar file

  3. bulion
    Member
    Posted 5 years ago #

    In widgets admin i can choose: left sidebar and right sidebar.
    Both are clear. No widgets added to any of them...

  4. stvwlf
    Member
    Posted 5 years ago #

    OK - Right sidebar might be in a different PHP file than sidebar.php - check your theme folder.

  5. bulion
    Member
    Posted 5 years ago #

    checked. Nothing Was found.

    Only Functions.php

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
        	'name' => 'Sidebar Left',
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
        register_sidebar(array(
        	'name' => 'Sidebar Right',
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
    ?>

    sidebar.php:

    <!-- Sidebar -->
    		<div class="sidebar">
    
    			<h3>Pages</h3>
    
    <ul>
    				<?php wp_list_pages('title_li='); ?>
    			</ul>
    			<h3>Archives</h3>
    
    <ul>
    				<?php wp_get_archives('type=monthly'); ?>
    			</ul>
    			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
    
    			<?php endif; ?>
    
    		</div>
    		<!-- Sidebar -->

    i'm lost... :( but thankU for getting some help!

  6. stvwlf
    Member
    Posted 5 years ago #

    please edit your sidebar.php file

    put this comment line at the top
    <!-- sidebar.php -->
    and this comment at the bottom
    <!-- end sidebar.php -->

    Save the file & upload to server

    Then refresh your browser.
    Then check browser View Source
    You should see those two comment lines in the code surrounding the display of the sidebar. If you don't see it then that is not the file that WordPress is using to display your sidebar.

    You need to find which file WordPress is using to display your right sidebar.

    Start adding comments like that to your other theme files, using the name of the php file in the comments - index.php single.php etc.

    When you find the right one you will see its comments in the View Source source code display surrounding the display of the categories and blogroll. Then you will know which template file to edit

  7. SimonJ
    Member
    Posted 5 years ago #

    Hum. From what I can tell, the content of this sidebar is defined by the widget section of your admin panel.

    And it seems to me, if you look in your index.php, that everything after :

    <div class="clear"></div>
    </div>
    <!-- /Content -->

    Is in footer.php...

    (look in your html source... and compare with your index.php file...)

    But... The footer of this theme is encoded. Is the second sidebar defined there? Could be possible...

    I STRONGLY DISCOURAGE you to use this theme. DO NO USE themes with encoded footer.

    Find another real free theme.

    S.

  8. bulion
    Member
    Posted 5 years ago #

    thank's. i will try it or find another theme...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags