Show Different Header for one particular page
-
<h1 class=”headline__primary” style=”margin-right: -0.1em; letter-spacing: 0.2em; opacity: 1; -webkit-transform: matrix(1, 0, 0, 1, 0, 0);”>Bellefull</h1>
i am trying to place a conditional statement in my theme’s php code to display an image on a particular page instead of the normal header text that it displays on all the other pages. but i want this for only one page. so i found the right file to edit under Apearance > Editor but when i edit the php code i am getting the following screen: https://s10.postimg.io/hmeud12rt/error.png
seems there is a mistake somewhere in my code. as i see the code is not being read as code but as text. here is the exact php script i entered. i entered it where the string calling the initial header is supposed to be. i just replaced that script with this one:
if ( ! is_page(‘598’) ) {
echo ‘<img class=”marginn” src=”https://www.bellefullcatering.com/wp-content/uploads/2016/08/Bellefull-Logo-NEW.png” alt=”” width=”300″ height=”179″>’
}else {
echo ‘<h1 class=”headline__primary”><?php esc_html_e( $title ) ?></h1>’
}pls can someone show me what is wrong with my code and why it wouldnt display properly. thanks very much.
using Rosa Restaurant theme and i cant send links to the page because it is being worked on locally. thanks very much.
- The topic ‘Show Different Header for one particular page’ is closed to new replies.