I want to add a meta tag for my site description inside the head area of a specific page, before the body tag opens. The site is built with WordPress & Elementor.
I don't want to add it globally like in the theme>>header option here: https://wordpress.org/support/topic/how-to-inset-code-the-closing-tag/
I'm looking for another solution besides editing the header.php file in a way that applies for all the theme pages. If I can do so in this file, and control which pages/posts the added meta tag will apply to, so that will be good.
What is my solution?
EDIT: This can be the relevant code at functions.php
function envo_shop_setup() {
// Theme lang.
load_theme_textdomain('envo-shop', get_template_directory() . '/languages');
// Add Title Tag Support.
add_theme_support('title-tag');
// Register Menus.
register_nav_menus(
array(
'main_menu' => esc_html__('Main Menu', 'envo-shop'),
'main_menu_right' => esc_html__('Main Menu Right', 'envo-shop'),
'main_menu_cats' => esc_html__('Categories Menu', 'envo-shop'),
)
);
// some templete conditions...
endif;
function envo_shop_pingback_header() {
if (is_singular() && pings_open()) {
printf('<link rel="pingback" href="%s">' . "\n", esc_url(get_bloginfo('pingback_url')));
}
}
add_action('wp_head', 'envo_shop_pingback_header');