2821 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer 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
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
+1 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.

4264 posts ThemeForest Reviewer
  • Envato Staff
  • Reviewer
  • Community Moderator
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Venezuela
  • Has been a member for 5-6 years
  • Microlancer Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
+9 more
Ivor Reviewer says

I’m going to use this too, thanks Dan

2821 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer 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