3132 posts
  • Located in Australia
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
+16 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.

4340 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

3132 posts
  • Located in Australia
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
+16 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!

by
by
by
by
by
by