inserting custom css, html and js into the current page as a popup window

I found a small solution BUT its not the best instead of what you ask! You can create an custom page template in your theme or child theme https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/#manual And paste the code: https://www.w3schools.com/howto/howto_js_alert.asp <!DOCTYPE html> <html> <head> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <style> .alert { padding: 20px; background-color: #f44336; color: white; } .closebtn { margin-left: … Read more

How do I change the text content of a div for a comment validation error message?

if your above Javascript is working fine and you want to insert that into a page. Kindly add the following code to your functions.php. I have tested this code it’s working fine. function handle_comment_error() { ?> <script> document.getElementById(“comment-error”).innerHTML = “Please enter your comment.”; </script> <?php }add_action(‘wp_head’, ‘handle_comment_error’); Let me know if you face any issues.

Custom CSS Nav Menu Style Not Being Applied

Well, I found the solution. The problem was with the PHP code in the plugin itself. Here is the ‘additional_stylesheets’ function with the code that ended up working. function additional_stylesheets() { // register and enqueue our style. wp_register_style( ‘bt-wp-styles’, plugins_url( ‘bt-wp-styles/css/bt-wp-styles.css’ ) ); wp_enqueue_style( ‘bt-wp-styles’ ); } add_action( ‘wp_enqueue_scripts’, ‘additional_stylesheets’ ); So, that’s everything. The … Read more

How to run Javascript popup modal in a loop?

Sorted using non java script pop up: Added <?php $postid = get_the_ID(); echo $postid; ?> to html so that it would act as a unique id for each loop post. HTML: <a href=”#openModal<?php $postid = get_the_ID(); echo $postid; ?>”>Open Modal</a> <div id=”openModal<?php $postid = get_the_ID(); echo $postid; ?>” class=”modalDialog”> <div> <a href=”#close” title=”Close” class=”close”>X</a> <h2>Popup</h2> … Read more

Div not working in WordPress post

End-of-line has no meaning in HTML, except if it separates text, where it is taken as one blank. If WordPress is eliminating blank lines, it’s only optimizing your code. To add a blank line, use the HTML br Tag: <br> Or the more syntactically correct (but equivalent): <br/>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)