Based on what I think this means I can take Snippet 3 and add it to my functions.php BUT I have some additional questions/concerns.
1) My functions.php references 2 other files in a function directory - sandbox.php and modmat.php. It would seem based on the code that sandbox.php is where I should add this. CORRECT? And does it replace something or is it addition to? Line 103 seems to have similar info.
2) This code also references images which I don't nee. I hope to be able to just replace the () with the name of the link and the ID with the number.
Can I adjust the code like this? And remove the 2nd and 3rd lines?
if ( is_page('advertising') || $post->post_parent == '11' ) {
This is the original Snippet 3.
<?php
if ( is_page('about') || $post->post_parent == '2' ) {
// the page is "About", or the parent of the page is "About"
$bannerimg = 'about.jpg';
} elseif ( is_page('learning') || $post->post_parent == '56' ) {
$bannerimg = 'teaching.jpg';
} elseif ( is_page('admissions') || $post->post_parent == '15' ) {
$bannerimg = 'admissions.jpg';
} else {
$bannerimg = 'home.jpg'; // just in case we are at an unclassified page, perhaps the home page
}
?>
ANY ADVICE IS GREATLY APPRECIATED.