In your header.php file, you can test which page is loading and modify the markup based on this condition. For your example, the is_page()
function seems ideal.
<div style ="float: right; margin-top: 10px;">
<p class="headersample3">
<?php if ( is_page( '###' ) ) { ?>
<a href="https://wordpress.stackexchange.com/questions/359723/tel:555-555-5555">555-555-5555</a>
<?php } else { ?>
<a href="tel:888-888-8888">888-888-8888</a>
<?php } ?>
</p>
</div>
Replacing the ### with your actual page ID.
If you truly need to load an entirely different header file for this one page, then you would test is_page()
in the page template and then conditionally load the header file you want.
if ( is_page( '543' ) {
get_header( '543' ); // file name is actually header-543.php
} else {
get_header();
}
Note: The parameter passed to get_header()
is not the full file name. See the Codex for more detail https://developer.wordpress.org/reference/functions/get_header/
Also, a good naming practice is to follow the WP core standards. A header for a specific page ID should be named header-pageid.php
EDIT: updated to reflect code added to question.