Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to use wp-admin to make a "page" which is used at the very botton of each pages. The bottom part would look like the below

Home | Tips | Services | Downloads | Workshops | Testimonials | Resources | Contact us

but on top of that it will be complex. A logo+links+images. Something you would find on a page rather then a menu

How do i create a page with the editor and have it display at the bottom of each page?

share|improve this question

2 Answers

up vote 1 down vote accepted

I don't quite grasp why you'd want to include a page "on the bottom of each page", rather than putting the "logo+links+images" in the footer and creating a menu below that.

That being said, in order to achieve what you want, create the page and include the following in your theme's footer.php (the below code example assumes that that page's ID is 83 and/or its slug "bottom-page", change it accordingly):

// query for the page using either (not both!) one of the two following lines
$bottom_page_query = new WP_Query( 'page_id=83' );
$bottom_page_query = new WP_Query( 'pagename=bottom-page' );

// loop through the query (even though it's just one page)
while ( $bottom_page_query->have_posts() ) : $bottom_page_query->the_post();
    the_content();
endwhile;

// reset post data (important, don't leave out!)
wp_reset_postdata();
share|improve this answer

You can use the get_page function in your footer.php template file:

<?php
$footer_page = get_page($id = 147);
echo apply_filters('the_content', $footer_page->post_content);
?>

Alternative approaches:

  • Create a custom menu for use in the footer. This may not be an option if you really need the flexibility of a page, but note that you can add CSS classes to each menu item. Coupling that to custom background images for each item may be powerful enough.
  • Hard-code the footer part. I prefer to edit HTML in a real editor anyway. Depending on who needs to be able to make changes, this may be a good option. Use get_template_part to pull in your custom footer part wherever you need.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.