set cookies on certain page only
Please try to create certain page template and set cookies <?php /* Template Name: Certain Page */ setcookie(‘my_cookie’, “hello”, (time()+3600), “https://wordpress.stackexchange.com/”); get_header(); ?>
Please try to create certain page template and set cookies <?php /* Template Name: Certain Page */ setcookie(‘my_cookie’, “hello”, (time()+3600), “https://wordpress.stackexchange.com/”); get_header(); ?>
Using Javascript On Page – Header and Footer Now Missing
Try changing your headers from \n to \r\n Note from here that: Each line should be separated with a CRLF (\r\n). Lines should not be larger than 70 characters.
Update Code to be Compatible with WP 5.3 (‘cannot modify header information’ warning)
In my development experience. get_template_part() is better way to maintain In the future. https://developer.wordpress.org/reference/functions/get_template_part/
I went to the GeneratePress site and looked at one of their demos: <nav id=”site-navigation” class=”main-navigation sub-menu-left” itemtype=”https://schema.org/SiteNavigationElement” itemscope> <div class=”inside-navigation”> <button class=”menu-toggle” aria-controls=”primary-menu” aria-expanded=”false”> <span class=”mobile-menu”>Menu</span> </button> <div id=”primary-menu” class=”main-nav”> <ul id=”menu-menu-1″ class=” menu sf-menu”> <li id=”menu-item-594520″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-594520″><a href=”https://generatepress.com/”>area riservata</a></li> <li id=”menu-item-594521″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-594521″><a href=”https://generatepress.com/premium/”>Premium</a></li> </ul> </div> </div><!– … Read more
Easiest way to use relative URLs in my WordPress header
Use the following code to replace the original code: if(!get_theme_mod(‘site_logo_dark’)) echo ‘<img width=”‘.$logo_width.'” height=”‘.$logo_height.'” src=”‘.flatsome_option(‘site_logo’).'” class=”header-logo-dark” alt=”your alt information here” />’; i.e. you’re replacing alt=”‘.$site_title.'” with alt=”your alt information here”. What the ‘.$site_title.’ means is the echo statement ends at the ‘ and then the PHP variable $site_title is appended to the string, and then … Read more
I’m not sure what is your html structure, but have you tried applying the css to the parent element of the header? Can you elaborate your question, or maybe try the css below: .parent { display: flex; justify-content: space-between; }
How can I use an iframe element as my header media?