I just did a custom footer. It works but when logged into my site the top dashboard bar is missing

  • ianizaguirre

    #7307

    I did a custom footer following all of these instructions perfectly found here

    null

    The only thing that does not work right though , is when I log into my dashboard everything works fine but when I click to see my website the gray bar that lets you get back to the dashboard is just one solid color, the color of my background.

    Is there something in the new footer.php file I have to fix?

    All the code can be seen that I did on the website link I put.

    You can only see the solid color bar when I log in, not as a normal visitor.

    I can still edit my site but I would have to press backspace instead which is not what I want. I want the toolbar to appear again. Maybe its a problem with the code?

    Thank you for your help

    to help you, this is the code I put exactly in my new footer.php file that I made. This is the only code in the file

    <div id="custom-footer">
    <div class="cf-inner">

    <?php
    $max_columns = 3; // change to number of columns you want to add to your footer
    $text_domain = 'appthemes'; // the text domain to use for translating the strings
    ?>

    <?php foreach ( range(1, $max_columns, 1) as $number ) { ?>

    <?php $sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number ); ?>

    <div class="cf-column">
    <div id="cf-col-<?php echo $number; ?>">
    <?php dynamic_sidebar( $sidebar_name ); ?>
    </div>
    </div>

    <?php } ?>

    <div class="clear"></div>
    </div>

    <p class="cf-copyright">
    <?php _e('Copyright ©', $text_domain); ?>
    <?php echo date_i18n('Y'); ?> <?php bloginfo('name'); ?>
    </p>

    </div>

    I also noticed that my slider is not working it is just blank

    And I just noticed the page “my profile” is not the way it is supposed to be. it is compressed and not showing the sidebars. Acutally all pages that have sidebars are still compressed but with just the background showing no side bar shows

    Please help me fix all this , I would really like to keep this footer with my page working right

    Admin

    Syahir Hakim

    #37762

    Take a look at the theme’s footer.php and you’ll notice that there are a few extra closing </div>s in there. Those are needed to close the <div> elements that are opened in other template files, like the header.php file. You are missing those closing divs.

    ianizaguirre

    #37763

    wow your the best. How can I interpret where to put extra <div> in the code ?

    this is the normal grapheme footer code I have

    <?php
    /**
    * The template for displaying the footer.
    *
    * Closes the <div> for #content, #content-main and #container, <body> and <html> tags.
    *
    * @package Graphene
    * @since Graphene 1.0
    */
    global $graphene_settings;
    ?>
    <?php do_action( 'graphene_bottom_content' ); ?>
    </div><!-- #content-main -->

    <?php

    /* Sidebar 2 on the right side? */
    if ( graphene_column_mode() == 'three_col_left' ){
    get_sidebar( 'two' );
    }

    /* Sidebar 1 on the right side? */
    if ( in_array( graphene_column_mode(), array( 'two_col_left', 'three_col_left', 'three_col_center' ) ) ){
    get_sidebar();
    }

    ?>

    <?php do_action( 'graphene_after_content' ); ?>

    </div><!-- #content -->

    <?php /* Get the footer widget area */ ?>
    <?php get_template_part('sidebar', 'footer'); ?>

    <?php do_action('graphene_before_footer'); ?>

    <div id="footer" class="clearfix">

    <?php if ( ! $graphene_settings['hide_copyright'] ) : ?>
    <div id="copyright">
    <h3><?php _e('Copyright', 'graphene'); ?></h3>
    <?php if ( $graphene_settings['copy_text'] == '' && ! $graphene_settings['show_cc'] ) : ?>
    <p>
    <?php printf( '&copy; %1$s %2$s.', date( 'Y' ), get_bloginfo( 'name' ) ); ?>
    </p>
    <?php elseif ( ! $graphene_settings['show_cc'] ) : ?>
    <?php
    if ( ! stristr( $graphene_settings['copy_text'], '</p>' ) ) { $graphene_settings['copy_text'] = wpautop( $graphene_settings['copy_text'] ); }
    echo $graphene_settings['copy_text'];
    ?>
    <?php endif; ?>

    <?php if ( $graphene_settings['show_cc'] ) : ?>
    <?php /* translators: %s will replaced by a link to the Creative Commons licence page, with "Creative Commons Licence" as the link text. */?>
    <p>
    <?php printf( __( 'Except where otherwise noted, content on this site is licensed under a %s.', 'graphene' ), '<a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">' . __( 'Creative Commons Licence', 'graphene' ) . '</a>' ); ?>
    </p>
    <p class="cc-logo"><span><?php _e( 'Creative Commons Licence BY-NC-ND', 'graphene' ); ?></span></p>
    <?php endif; ?>

    <?php do_action('graphene_copyright'); ?>
    </div>
    <?php endif; ?>

    <?php if ( has_nav_menu( 'footer-menu' ) || ! $graphene_settings['hide_return_top'] ) : ?>
    <div class="footer-menu-wrap">
    <ul id="footer-menu" class="clearfix">
    <?php /* Footer menu */
    $args = array(
    'container' => '',
    'fallback_cb' => 'none',
    'depth' => 2,
    'theme_location' => 'footer-menu',
    'items_wrap' => '%3$s'
    );
    wp_nav_menu(apply_filters('graphene_footer_menu_args', $args));
    ?>
    <?php if ( ! $graphene_settings['hide_return_top'] ) : ?>
    <li class="menu-item return-top"><a href="#"><?php _e('Return to top', 'graphene'); ?></a></li>
    <?php endif; ?>
    </ul>
    </div>
    <?php endif; ?>

    <?php if ( ! $graphene_settings['disable_credit'] ) : ?>
    <div id="developer" class="grid_7">
    <p>
    <?php /* translators: %1$s is the link to WordPress.org, %2$s is the theme's name */ ?>
    <?php printf( __('Powered by %1$s and the %2$s.', 'graphene'), '<a href="http://wordpress.org/">WordPress</a>', '<a href="http://www.khairul-syahir.com/wordpress-dev/graphene-theme">' . __('Graphene Theme', 'graphene') . '</a>'); ?>
    </p>

    <?php do_action('graphene_developer'); ?>
    </div>
    <?php endif; ?>

    <?php do_action('graphene_footer'); ?>
    </div><!-- #footer -->

    <?php do_action('graphene_after_footer'); ?>

    </div><!-- #container -->

    <?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
    </div><!-- .bg-gradient -->
    <?php endif; ?>

    <?php wp_footer(); ?>
    </body>
    </html>
    Admin

    Syahir Hakim

    #37764

    Just follow the theme. Two closing </div>s before your custom footer, and one after. Remember also to close the <body> and <html>.

    ianizaguirre

    #37765

    Im sorry if I am not following. this dident work though, this is what I did ? I am sure I am doing it wrong then, I bolded what I did to show you

    <div id="custom-footer">
    <div class="cf-inner">

    <?php
    </div>
    </div>

    $max_columns = 3; // change to number of columns you want to add to your footer
    $text_domain = 'appthemes'; // the text domain to use for translating the strings
    ?>

    <?php foreach ( range(1, $max_columns, 1) as $number ) { ?>

    <?php $sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number ); ?>

    <div class="cf-column">
    <div id="cf-col-<?php echo $number; ?>">
    <?php dynamic_sidebar( $sidebar_name ); ?>
    </div>
    </div>

    <?php } ?>

    <div class="clear"></div>
    </div>

    <p class="cf-copyright">
    <?php _e('Copyright ©', $text_domain); ?>
    <?php echo date_i18n('Y'); ?> <?php bloginfo('name'); ?>
    </p>

    </div>
    </body>
    </html>
    Admin

    Syahir Hakim

    #37766

    Read again. Two closing </div>s before your custom footer, and one after. You have two closing divs inside your custom footer, and none after.

    ianizaguirre

    #37767

    ok I put two before , one after, and then the closing body and html tags. Is it like this?? It did not work , so I have to be wrong again. Thank you for your patience in helping me

    </div>
    
    before footer
    </div>
    before footer
    <div id="custom-footer">
    <div class="cf-inner">

    <?php
    $max_columns = 3; // change to number of columns you want to add to your footer
    $text_domain = 'appthemes'; // the text domain to use for translating the strings
    ?>

    <?php foreach ( range(1, $max_columns, 1) as $number ) { ?>

    <?php $sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number ); ?>

    <div class="cf-column">
    <div id="cf-col-<?php echo $number; ?>">
    <?php dynamic_sidebar( $sidebar_name ); ?>
    </div>
    </div>

    <?php } ?>

    <div class="clear"></div>
    </div>

    <p class="cf-copyright">
    <?php _e('Copyright ©', $text_domain); ?>
    <?php echo date_i18n('Y'); ?> <?php bloginfo('name'); ?>
    </p>

    </div>
    This one is the one after
    </body>
    closing body
    </html>
    closing html

    Prasanna SP

    #37768

    Your custom footer is missing the call to wp_footer() function. The WP admin bar and Graphene Slider scripts are hooked to wp_footer()

    Add

    <?php wp_footer(); ?>

    just before the closing body tag.

    ianizaguirre

    #37769

    it worked ! :-))))))))))))) Awesome Thank you both sooo much

    so now the final footer code looks like this, is it fine with the three closing divs I added

    </div>
    
    I added this
    </div>
    I added this
    <div id="custom-footer">
    <div class="cf-inner">

    <?php
    $max_columns = 3; // change to number of columns you want to add to your footer
    $text_domain = 'appthemes'; // the text domain to use for translating the strings
    ?>

    <?php foreach ( range(1, $max_columns, 1) as $number ) { ?>

    <?php $sidebar_name = sprintf(__('Footer Column %d', $text_domain), $number ); ?>

    <div class="cf-column">
    <div id="cf-col-<?php echo $number; ?>">
    <?php dynamic_sidebar( $sidebar_name ); ?>
    </div>
    </div>

    <?php } ?>

    <div class="clear"></div>
    </div>

    <p class="cf-copyright">
    <?php _e('Copyright ©', $text_domain); ?>
    <?php echo date_i18n('Y'); ?> <?php bloginfo('name'); ?>
    </p>
    </div>
    I added this
    <?php wp_footer(); ?>
    I added this
    </body>
    I added this
    </html>
    I added this

    ianizaguirre

    #37770

    Actually I just noticed that my slider works, the gray admin bar appeared again so that’s perfect. BUT my right side bar does not appear on any of the pages I put it on its just the background visible. You can see an example of one page here My page that has no right sidebar visible . How can I fix this ?

Viewing 10 posts - 1 through 10 (of 12 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!