• Resolved Bam Bam

    (@bam-bam)


    Guys and Gals,

    I have been playing around for a couple of days now trying to achieve something that seems so minor but is now doing my head in.

    I have a custom sidebar page template that I have managed to get to almost do what I want it to do, ie get rid of some stuff like adsense ads etc.

    However, I’ll be damned if I can get a footer with literally nothing in it to show at the bottom of the custom page template, I have watched no end of videos and read a heap of websites, but nothing will tell me the whole story.

    So up till now I have a template named custom-sidebar-page.php
    I have created a footer called footer-custom.php
    I have changed the call at the bottom of the custom page to
    <?php get_footer('custom'); ?>
    I have changed the 3rd last line in footer-custom.php to
    <?php wp_footer('custom'); ?>

    but I have obviously missed something here because what shows is exactly the same as the normal sidebar pages show.

    Can someone please tell me exactly what bits I need to change to make it show quite literally a blank footer area.

    On another point, re the custom sidebar page, what bit of code do I need to remove the stop the normal menu from displaying.

    At the bottom is the link to one of the pages I am trying to implement this on.

    Any and all help is greatly appreciated, php coding is way out of my league.

    Click Here for link

    Many Thanks
    Bam Bam

Viewing 11 replies - 1 through 11 (of 11 total)
  • Generally speaking, you should copy the file footer.php into your child theme, and then edit this so that the functions inside it don’t show anything. If there is another php file that generates the footer content you should edit this one in the same way. The files in the child theme override those in the parent theme, so this should do the trick.

    Thread Starter Bam Bam

    (@bam-bam)

    Daprela,

    Thanks for the prompt reply, yes I already have and for some strange reason it has suddenly decided to do what I have been trying to do, so now the only bit to change is to get rid of the menu out of the header.

    Any idea how to achieve that.

    Regards
    Bam Bam

    For menu out of the header you mean the menu on the sidebar, or the horizontal menu under the header?

    Thread Starter Bam Bam

    (@bam-bam)

    The site wide horizontal menu directly under the header image.

    The reason is I am offering very very cheap hosting for events, linked to the event listing on the main site, I want to make it look as much as I can as though it is a separate site, thus the 4 links in the sidebar.

    Many Thanks
    Bam Bam

    Thread Starter Bam Bam

    (@bam-bam)

    Daprela,

    If I could find a plugin that would allow Twenty Eleven to support more than one menu and you could select which one to use at the page editing stage, that would be ideal, but I searched high and low and can’t find one.

    Bam Bam

    The wp_footer() function doesn’t accept parameters.

    http://codex.wordpress.org/Function_Reference/wp_footer

    The solution for this is using page templates. If you edit your page, you’ll notice that in the right sidebar you can choose templates. Each template gives a different layout to you page. Unfortunately, none of the standard templates eliminates just the main menu, you can choose a template (landing page) that eliminates menu and sidebars, and leaves only header and content. If you want to eliminate only the menu you must create a custom page template.
    I’ve never created one, but if you have a bit of php knowledge I think you could do it by merging the landing page template with another template and by leaving out the menu section. If you’re not a WP coder it’s a matter of trial and error.

    Thread Starter Bam Bam

    (@bam-bam)

    Coding php like I said leaves me scratching by head, but I would have to think that in there somewhere, is a command that basically, just like it says get footer, must say get menu.

    So if that is the case, surely it can be coded out in my custom sidebar page, at least that is my thoughts on it, just don’t know how to do it.

    Thanks Again
    Bam Bam

    Thread Starter Bam Bam

    (@bam-bam)

    I think I will close this thread and start a new one.

    Thanks Daprela for your input.

    Thread Starter Bam Bam

    (@bam-bam)

    Daprela,

    Just solved it myself it’s easier than you would think.

    The call for the menu is not in the page template, it is in the header.

    So the solution is to create a child header, I called it header-custom.php

    then in the custom page template you call
    get_header('custom'); ?>

    In the header-custom.php file you code out the bit below using <!– and closing it with –>

    <!--
    			<nav id="access" role="navigation">
    				<h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
    				<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
    				<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
    				<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
    				<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</nav>  -->

    I also removed the part below from the very end of the code above.
    <!-- #access -->

    It normally sits immediately after </nav>

    It’s all good now and looks just as I wanted it, to have a look

    Click Here

    Kindest Regards
    Bam Bam

    That is great, I’m happy you did it. Removing the menu in fact it’s been a good idea, the page looks beautiful and the choice of colors in my opinion is perfect. Great job!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Editing the content of a custom footer’ is closed to new replies.