5441 posts
  • Author Level 11
  • Moderator
  • Winner
  • 6 Years of Membership
+20 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
  • 7 Years of Membership
  • Affiliate Level 3
  • Author Level 5
  • Bundle Boss
+8 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.

4483 posts ThemeForest Senior Reviewer
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 3
  • Envato Team
+14 more
Ivor
Envato team
says

I’m going to use this too, thanks Dan

5441 posts
  • Author Level 11
  • Moderator
  • Winner
  • 6 Years of Membership
+20 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