3303 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 more
dtbaker Moderator says

Hello forum people,

Creating my first WordPress theme here, and I am wondering what the best way is to control HTML content in the header / footer / sidebar areas.

You can see a good example of the type of content I’m talking about by viewing this picture The three boxes along the top (title, bit of text, image, and a link).

I could just have this small piece of content hard coded into the template, but this means any updates would require editing this file.

How do others do this?

  • Create an un-published page, so uses can control this content using the WYSIWYG editor? Pull this page content out into the header/footer/sidebar area?
  • Create a side bar, with a “text” widget in it?
  • Create a new menu in the “appearance” tab with some custom php coding in it (similar to the default “header appearance” menu)
  • Just leave it as part of the template (easiest option) if a user wants to change it, they modify the template?

Any pointers or examples greatly appreciated.

Cheers heaps,

Dave

352 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+6 more
danharper says

Personally, I’ve found the best way of handling this is to create a ‘theme options page’ in the dashboard (your Option #3). I’ve wrote a tutorial on this here

Here is an example of how I implemented something similar in my ‘Creative.Industry’ template.

4388 posts ThemeForest Reviewer
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Member of the Envato Team
+12 more
Ivor Envato team says

I’m going to use this too, thanks Dan

3303 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 more
dtbaker Moderator says

Looks perfect, thanks danharper!

Do you know if it’s possible to have multiple custom menu’s under the “appearance” tab on the left?

I quickly tried but just ended up with multiple menu’s that linked to the same page, I’ll give it a better go when my brain wakes up.

Cheers!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by