• Resolved holypaul

    (@holypaul)


    Hi, Arthur?

    Like everyone, I’d like to express my thankfulness to create such good theme!

    This theme is my favorite, but I’d like to use footer widget on the theme like sidebar areas so that people can pay attention only to posts.

    However, I could not find footer widgets on the menu. Could you help me?

    Excuse my languege and thank you so much!
    Have a good day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author arthur-gareginyan

    (@arthur-gareginyan)

    Hi,

    Thank you for the nice words!

    At the end of the functions.php file place this code:

    // This feature enables widgets area in the footer.
    function anarcho_widgets_footer_init() {
    	register_sidebar(array(
    			'name' => __('Footer Area 1', 'anarcho-notepad'),
    			'id' => 'footer-1',
    			'description' => __('Widgets in this area will be shown left.', 'anarcho-notepad'),
    			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    			'after_widget' => '</aside>',
    			'before_title' => '<h3 class="widget-title">',
    			'after_title' => '</h3>',
    	));
    		register_sidebar(array(
    			'name' => __('Footer Area 2', 'anarcho-notepad'),
    			'id' => 'footer-2',
    			'description' => __('Widgets in this area will be shown center.', 'anarcho-notepad'),
    			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    			'after_widget' => '</aside>',
    			'before_title' => '<h3 class="widget-title">',
    			'after_title' => '</h3>',
    	));
    		register_sidebar(array(
    			'name' => __('Footer Area 3', 'anarcho-notepad'),
    			'id' => 'footer-3',
    			'description' => __('Widgets in this area will be shown right.', 'anarcho-notepad'),
    			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    			'after_widget' => '</aside>',
    			'before_title' => '<h3 class="widget-title">',
    			'after_title' => '</h3>',
    	));
    }
    add_action( 'widgets_init', 'anarcho_widgets_footer_init' );

    At the end of the style.css file place this code:

    // Footer Widgets
    #footer-widgets {
    	display:block;
    	height: 250px;
    }
    #footer-widgets span {
    	float: left;
    	width: 30%;
    	margin-left:5px;
    	margin-right:5px;
    }

    In the footer.php file, find this block:

    <div class="site-info">
    	<?php echo get_theme_mod('site-info'); ?>
      </div>

    and replace for this:

    <div class="site-info">
    	<div id="footer-widgets">
    		<span><?php dynamic_sidebar( 'footer-1' ); ?></span>
    		<span><?php dynamic_sidebar( 'footer-2' ); ?></span>
    		<span><?php dynamic_sidebar( 'footer-3' ); ?></span>
    	</div>
    	<br clear="all">
    	<?php echo get_theme_mod('site-info'); ?>
      </div>

    Now you can add widgets in the footer from “Admin Panel” -> “Appearance” -> “Widgets”.

    I’ll add this option in the next update of the “Anarcho Notepad” theme.

    Thread Starter holypaul

    (@holypaul)

    Thank you, Arthur, once more!

    Finally, I’ve got footers on my blog!!!

    By the way, let me ask you one more thing.
    That is, can i the auto bullet point dot on the left side of things in the footer (holypaul.org). the bullet is away from things. (so sorry for my language again here)

    And can I align list as left not as “center” that is current default in the footer.

    Thank you and have a blessed day! ??

    Theme Author arthur-gareginyan

    (@arthur-gareginyan)

    Try add the follow line:

    text-align: initial;

    in this block of style.css file:

    #footer-widgets {
        display:block;
        height: 250px;
    }

    You are welcome! ??

    Can you add a option to disable footer widgets?Thanks.
    https://www.lenovo.me/

    Theme Author arthur-gareginyan

    (@arthur-gareginyan)

    Oh, I see the bug! In the next update it will be fixed!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding "footers" on the theme?’ is closed to new replies.