Insert HTML in post, below nav bar but above content?

Edit your single.php or single-post.php template, depending on which one is present and in use with your theme. The JS file should be registered and conditionally enqueued when the template is loaded. This allows for dependency management and lots of other easy management actions. Another way to consider is make your menu an actual WordPress … Read more

Cannot set property ‘className’ of null at setThemeFromCookie

Using JQuery Simplifies the whole thing, using JS Cookie $(document).ready(function(){ // Check cookie and set theme if(Cookies.get(‘theme’)) { $(‘body’).removeClass(‘light-mode dark-mode’).addClass( Cookies.get(‘theme’) ); }; //Switch theme and create the cookie… $(“#theme-toggler”).click(function(){ if ($(‘body’).hasClass( ‘light-mode’)){ $(‘body’).removeClass(‘light-mode’).addClass(‘dark-mode’); Cookies.set(‘theme’, ‘dark-mode’); }else { $(‘body’).removeClass(‘dark-mode’).addClass(‘light-mode’); Cookies.set(‘theme’, ‘light-mode’); } }); }); Add id to button. <button id=”theme-toggler” type=”button” name=”dark_light” title=”Toggle dark/light mode”>🌛</button> … Read more

Path for php file for inserting data through html form

You need to integrate your form and php form processor with WordPress. One method to do this in your theme as follows. Create a page template in your theme folder, as described here. And put your form markup in it. Don’t specify an action on your form, and add a hidden field to your form … Read more

Add Codepen animation as Preloader to WordPress

1) In which location should I add the codepen html code? If you’re using a child theme, then for example, you could copy parent theme header.php file to your child theme directory and add the required html to that file after <head>. If you’re developing your own theme, then put the markup wherever you want … Read more

Need to edit themes HTML code

Can you search the theme source code for the CSS class that is used for the cart icon (“aux-shopping-basket” or “aux-phone-off” or “aux-action-on-click”)? Then you could create a child theme and copy the original file and then edit the copied file to fix the error. What is the fix?