I have problem with creating multiple different video headers on different pages. I'm using lattest Wordpress 4.7 and using "Twenty Seventeen" template. For now i manage how to add "video header" to page different from front page, by adding in custom-header.php
video-active-callback => 'is_page'
This gave me option to set video at every page, but then i saw that i changed all headers at the same time.
So my Question is, how to create separate headers, but if it is possible with this cool feature to change video from "Customize" menu.
I have problem with creating multiple different video headers on different pages. I'm using lattest Wordpress 4.7 and using "Twenty Seventeen" template. For now i manage how to add "video header" to page different from front page, by adding in custom-header.php
video-active-callback => 'is_page'
This gave me option to set video at every page, but then i saw that i changed all headers at the same time.
So my Question is, how to create separate headers, but if it is possible with this cool feature to change video from "Customize" menu.
Share Improve this question asked Jan 4, 2017 at 19:20 user110235user110235 11 bronze badge1 Answer
Reset to default 0What you can do is put an if statement to check if its on the correct page then execute the code
so:
<?php
if(is_page(5)){
echo "I'm on a WP page that has the id 5";
}
?>