Add Code Snippet to a Specific Page Header

Code Snippet to add specific code to a specific page header.
Share:
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
Dijan-Mockup

The code snippet below is to add certain code to a specific page header .

Example of use when I am working on the Tantra-log Podcast page where the client wants to use the dedicated microphone favicon on that page only. (Notes: We use Oxygen Builder for build that page.)

Please replace and adjust the parts as you need.

<?php
add_action('wp_head', 'tantralog_favicon');
 function tantralog_favicon(){
 if(is_page(3540)) {  ?>
 <link ref="icon" href="https://dijan.co/wp-content/uploads/2021/04/podcast-icon.svg">

<?php  }
};

Notes: 3540 is page ID

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Article

OpenStreetMap and Leaflet.js
OpenStreetMap is a map of the world, created by people like you and free to use under an open license. […]
Video Code using ACF Video Field
Solution of Jumping Modal Popups
I get this code from my client and also my friend 😊
COMPLETE PACKAGE OF WEBSITE DESIGN & DEVELOPMENT
Digitalizer offers website design & development services for company profiles, online shops, event organizers, educational institutions or other fields. You don't need to think about domains, web hosting / servers, DNS, email, design, development, security and other technical issues. Just prepare your website content, we do the rest.
All website design & development packages include 1 year maintenance!
Free Consultation
Back to top
cross