Support » Fixing WordPress » show or hide part of page depending on admin set variable

  • I have an embedded radio player on my wordpress homepage, which i sometimes broadcast live music through. It is at the bottom of my front page at (its actually in an iframe, because its less buggy than php code in the middle of a page!)

    When I am not broadcasting, i want to be able to make the player dissapear from the page, and when i am broadcasting i want to be able to make it reappear. however, i dont want to have to edit the page each time just to acomplish this.

    what would be great is if there was a way to make it so when the content is hidden, non administrators just dont see anything on the page where the player would be. Administrators however would see a little show / hide option. when it is selected to “show”, the player is visible to all users.

    the area to show or hide could be defined perhaps by simple tags in the page code. example

    <showhide>partof webpage which is variable</showhide>

    (on the page there would be admin only buttons to switch between modes)


    even cooler would be if it could DETECT when the stream was active or not, and AUTOMATICALLY show or hide player. but i guess that would be greedy of me 😉 heheh

    I realise this is a very specific question, and i hope somebody might have the time spare to ponder a solution for me 🙂 I would be very grateful!

    Cheers in potential advanceness!


Viewing 1 replies (of 1 total)
  • esmi


    Forum Moderator

    You’d need to set up some sort of custom option in your theme for this kind of functionality.

Viewing 1 replies (of 1 total)
  • The topic ‘show or hide part of page depending on admin set variable’ is closed to new replies.