• Resolved Kaoskuri

    (@kaoskuri)


    Is it possible for me to put a center and right aligned widget that shows up on the copyright footer area of the website? If so, would I just create the widgets I need for the center and right widget and then place the widgets in their respective areas?

    Or is there a simpler way for me to have the copyright text show up in the center and the contact information show up in the right side of the copyright footer section?

Viewing 6 replies - 1 through 6 (of 6 total)
  • There are 4 widget on the footer in this theme. They are just above copyright area.
    You need to create your own widget and insert in copyright placeholder if you want one there.

    Thread Starter Kaoskuri

    (@kaoskuri)

    Thanks for the reply back. Yeah, I am using the widgets in the footer above the copyright area. I was able to put the following codes in to create the widgets but I can’t get the widgets to show up in the widgets area so that I can put the information I wanted into the widgets.

    Functions.php

    if ( function_exists('register_sidebar') )
    { register_sidebar();
    register_sidebars(3, array('name'=>'Footer %d')); }

    Footer.php

    <div id="footerwidgets">
    <div id="footer-left">
    <ul>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer 1') ) : ?>
    <li>
    <?php endif; ?>
    </ul>
    </div>
    <div id="footer-middle">
    <ul>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer 2') ) : ?>
    <li>
    <?php endif; ?>
    </ul>
    </div>
    <div id="footer-right">
    <ul>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer 3') ) : ?>
    <li>
    <?php endif; ?>
    </ul>
    </div>
    </div>
    <br>
    <br clear="all" />

    Custom CSS:

    #footerwidgets { display: block; width:900px; margin: 0 auto; text-align:center; }
    #footer-left { width: 210px; float: left; margin: 15px 10px 10px 30px; padding: 10px; background-color: #f3f3e7; }
    #footer-middle { width: 210px; float: left; margin: 15px 10px 10px 15px; padding: 10px; background-color: #f3f3e7; }
    #footer-right { width: 210px; float: left; margin: 15px 10px 10px 15px; padding: 10px; background-color: #f3f3e7; }
    Thread Starter Kaoskuri

    (@kaoskuri)

    I’m still trying to figure out how to add the widgets into the copyright footer and then have the widgets show up in my widgets section. So far I am able to create the widgets and have them show up in the copyright section but when I go to the widgets section, the widgets don’t show up in there.

    Every time I try and add a widget in the copyright section I end up breaking my site and having to reset it.

    It seems like the site breaks when I put anything in the functions.php file. What am I doing wrong that it’s not showing up in the widgets section for me to go and enter the information I need in there? Also, why does the site keep breaking when I update the functions.php file?

    Thread Starter Kaoskuri

    (@kaoskuri)

    So I was able to create the widgets and have them show up in my copyright footer but both widgets are both centered. How can I go about making 1 widget in the center and 1 widget in the right side?

    This is the code I am using:

    CSS:

    .widgetcopyrightcenter {
        float: center;
        margin-top: 5px;
        margin-bottom: 0px;
        margin-right: 1px;
        display: block;
        font-size: 10.5px;
    }
    
    .widgetcopyrightright {
        float: right;
        margin-top: 5px;
        margin-bottom: 0px;
        margin-right: 0px;
        display: block;
        font-size: 10.5px;
    }

    Footer.php:

    <?php if ( ! dynamic_sidebar( 'Copyright Footer Center' ) ) : ?>
    
    <?php endif; // end extra-widget area ?>
    
    <?php if ( ! dynamic_sidebar( 'Copyright Footer Right' ) ) : ?>
    
    <?php endif; // end extra-widget area ?>

    Functions.php:

    // Add a widget.
    if (function_exists('register_sidebar')) {
    	register_sidebar(array(
    	'name' => 'Copyright Footer Center',
    	'id' => 'extra-widget2',
    	'description' => 'Copyright Footer Center',
    	'before_widget' => '<div id="%1$s" class="widget %2$s">',
    	'after_widget' => '</div>',
    	'before_title' => '<p>',
    	'after_title' => '</p>'
    	));
    }
    
    // Place the widget in copyright footer
    add_filter ('__row', 'add_my_widget2');
    function add_my_widget2() {
    if (function_exists('dynamic_sidebar')) {
    dynamic_sidebar('Copyright Footer Center');
    }
    }
    
    // Add a widget.
    if (function_exists('register_sidebar')) {
    	register_sidebar(array(
    	'name' => 'Copyright Footer Right',
    	'id' => 'extra-widget3',
    	'description' => 'Copyright Footer Right',
    	'before_widget' => '<div id="%1$s" class="widget %2$s">',
    	'after_widget' => '</div>',
    	'before_title' => '<p>',
    	'after_title' => '</p>'
    	));
    }
    
    // Place the widget in copyright footer
    add_filter ('add_my_widget3');
    function add_my_widget3() {
    if (function_exists('dynamic_sidebar')) {
    dynamic_sidebar('Copyright Footer Right');
    }
    }

    Since this theme uses bootstrap 2. It would be easy for you if you follow the convention of bootstrap to manage it.

    You can find in the documentation below how the grid is managed and how you can set offset in the grid : https://getbootstrap.com/2.3.2/scaffolding.html

    Thread Starter Kaoskuri

    (@kaoskuri)

    Ok, I’ll take a look at that and see what I can do. Thanks so much. =)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Widgets in the Copyright Footer Section’ is closed to new replies.