• Hi

    I hope someone can point me on the right track.

    Basically I have a custom homepage. I want to have an option in the theme, such as “show this section yes/no”, and if it yes, then content will be shown (like a div etc), and if no, then it will be hidden.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just use jQuery, should be fairly easy, but if you are new to it, it will take a few hours to learn.

    Here’s a simple tutorial I found from Google:
    https://www.learningjquery.com/2006/09/slicker-show-and-hide

    It may seem complicated at first, but you can honestly get it done by just adding about 20 lines of code.

    Thread Starter Rainerbird

    (@rainerbird)

    Sorry

    I want the option to be in the ADMIN. So that somewhere in the admin they can select an option, which will alter the appearance of content displayed on the front end.

    What you are looking for is a theme options page. Though there are some good articles on this, you will end up with errors on new WordPress as they are pretty old.

    I am about to post an updated article on creating theme options pages. You can check my technology blog for that article after a few hours. The post is about the exactly the same stuff that you are looking for.

    Hope to see you on my blog. And if you visit, don’t forget to leave a comment and add the blog on your Facebook ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create an admin option that will 'show/hide' content’ is closed to new replies.