Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Let's say you want all pages to have a common footer, and have that footer editable in WordPress; how would you accomplish this?

My current solution is to create a page "footer" and include it using custom template function.

But I am wondering if there is a better way to do it, without requiring custom coding.

As an example, in the footer of this page you have the text statement

"WordPress is a trademark of the WordPress Foundation, registered in the US and other countries. This site is not affiliated with the WordPress Foundation in any way."

How do you make them editable by normal wordpress user?

share|improve this question
    
Show us what you mean by "include" it. –  Wyck Aug 7 '13 at 17:15
1  
Also, what elements are you wanting to edit? –  mtuttle Aug 7 '13 at 17:28
    
This answer should help you: wordpress.stackexchange.com/questions/103433/… –  Krzysiek Dróżdż Aug 7 '13 at 17:49
    
I would say either Custom Fields or Custom Post Types, probably the former though –  Howdy_McGee Aug 8 '13 at 18:19
    
Create a custom footer? footer-yourspecialfooter.php and call it in the template that displays pages, ie. page.php calls get_footer('yourspecialfooter');. No time for full answer, else i'd write one out for you. –  t31os Aug 9 '13 at 0:56

1 Answer 1

If this text was static, then of course you could use custom footer template. So create file footer-my-custom.php and then include it with get_footer('footer', 'my-custom');

If you want to edit this text in wp-admin (or have many editable texts in there) you can use one of these solutions:

1. Custom Fields (good if you use static front page)

If you use static front page, then you can add some custom fields to it and then show these fields in footer on every page. To add these CF only to front page, I would use Advanced Custom Fields plugin.

Then in footer you'll have to add:

<?php echo get_post_meta( get_option('page_on_front'), '<CUSTOM FIELD NAME>', true ); ?>

2. Options

The other solution (better in this case, I guess) is to define some theme options.

I usually use OptionTree plugin to do this. But it's not so hard to do this by yourself.

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.