• Resolved kartus

    (@kartus)


    Hi all. Some time ago i removed my sidebar and widgets, it took me a lot of nervs but i did it. And of course now i need the sidebar. The problem is that

    if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ));
    }

    I register a new one. I can see it in my widget area, but not on my pages. I’m using full wight template, but when i switch to default, it displays me only in archive, but not as in sidebar, just as text. Can some1 tell what the hell did i do to screw that up, cuz honestly i have no idea. I usually keep text docs of the code changes i made, but they are on my laptops HDD, which kind of broke….

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi

    (@esmi)

    Do you still have a sidebar.php template file in your theme?

    Thread Starter kartus

    (@kartus)

    Yes, thanks for the quick reply

    <?php
    
    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;
    
    /**
     * Main Widget Template
     *
     *
     * @file           sidebar.php
     * @package        Responsive
     * @author         Emil Uzelac
     * @copyright      2003 - 2012 ThemeID
     * @license        license.txt
     * @version        Release: 1.0
     * @filesource     wp-content/themes/responsive/sidebar.php
     * @link           https://codex.www.ads-software.com/Theme_Development#Widgets_.28sidebar.php.29
     * @since          available since Release 1.0
     */
    ?>
            <div id="widgets" class="grid col-300 fit">
            <?php responsive_widgets(); // above widgets hook ?>
    
                <?php if (!dynamic_sidebar('main-sidebar')) : ?>
                <div class="widget-wrapper">
    
                    <div class="widget-title"><?php _e('Машини', 'responsive'); ?></div>
    					<ul>
    						<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
    					</ul>
    
                </div><!-- end of .widget-wrapper -->
    			<?php endif; //end of main-sidebar ?>
    
            <?php responsive_widgets_end(); // after widgets hook ?>
            </div><!-- end of #widgets -->

    This is what i have in it

    esmi

    (@esmi)

    OK – stop now! You should not be editing that theme at all! delete the theme and re-upload a fresh copy. Then create a child theme for your changes.

    Thread Starter kartus

    (@kartus)

    I kind of knew that would happen xD. And i dont have child theme, cuz i had done a lot of changes when i learned about it xD.

    Thread Starter kartus

    (@kartus)

    thank god there is a new update on the theme xD. It fixed it xD

    Thread Starter kartus

    (@kartus)

    Can you tell me why when i delete the theme completely, after i install it again its absolutely the same ? All options i made before i deleted it are the same?

    Thread Starter kartus

    (@kartus)

    and still when i add for example “calendar” it dispalys only in archive. wtf

    esmi

    (@esmi)

    Try asking on the theme’s dedicated forum: https://themeid.com/forum/forum/10/responsive-theme/

    Thread Starter kartus

    (@kartus)

    Fixed it. I made my site again xD

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Screwed sidebar’ is closed to new replies.