• Ok this is an interesting one.

    I have a video player in my themes header and I though it would be cool to have posts as the information panel for whatever video is playing.

    http://www.ourmansfield.tv/testsite/

    The video player uses Javascript and part of the code to play a particular video is “var videoID = 9;” where “9” is the id number of the video to be played.

    What I need is when a post page is displayed, is for the var videoID = ; to display the number of the video that relates to the post, example var videoID = 11;

    One way of doing it to to have a plugin on the “edit post” page where the number of the video can be typed into a text box, example “11”. When the post is viewed then a code can be used to fill in the video id on the header such as var videoID =<? echo $vid_id; ?>; where $vid_id relates to the number entered into the plugin for the individual post

    If no number is entered then perhaps the player plays a default video instead.

    I can do basic things with php but I am far from expert. Can what I described be done?

  • The topic ‘Adding text to header dependijg on what post your viewing…’ is closed to new replies.