Good day.
For example, in the functions.php file, I have some code that runs a script on all pages of the site:
function custom_profile_phone_script() {
?>
<script>
jQuery(document).ready(function($) {
// We get the value of the phone number from the main block of attributes
...
});
</script>
<?php
}
add_action('wp_footer', 'custom_profile_phone_script');
How to limit the use of this script only on the Vendor profile view page?
To define my static and normal pages, I mainly use functions:
if ( isset( $post->post_type ) && $post->post_type === 'vendor' )
if ( is_page('slug-page')
And I don’t know how to add a condition to the definition of the Vender view page, which is dynamic and is built on the basis of hivepress templates