PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered

Before you can use, those two lines : wp_enqueue_style( ‘wp-auth-check’ ); wp_enqueue_script( ‘wp-auth-check’ ); you should register those assets, inside wp_enqueue_scripts or admin_enqueue_scripts, like the following : function my_assets() { wp_register_style( ‘wp-auth-check’, ‘path/to/style’, $deps = array, $ver = false, $media=”all” ) wp_register_script( ‘wp-auth-check’, ‘path/to/your-script’, $deps = array, $ver = false, $in_footer = false ) } … Read more

WordPress sound bell when new data will add

There may be browser restrictions preventing autoplaying audio, see this answer https://stackoverflow.com/questions/53058421/local-variable-audio-in-object-method-not-playing You can see this in your browser developer tools console, there will be error like this NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. If this sound … Read more

while loop to be continue in next section

What you are looking for is PHP’s modulo operator and adjust markup as necessary: <?php $i = 0; $did_hr = false; $post_args = array( ‘post_type’ => ‘Student Form’, ‘posts_per_page’ => 6 ); $post_query = new WP_Query( $post_args ); if ( $post_query->have_posts() ) : while ( $post_query->have_posts() ) : $post_query->the_post(); ?> <?php if ( $i % … Read more

How to use wordpress with any “site url” (the url in settings) for development?

There’s a bit more than just the option to update unfortunately. I’d recommend reading over https://wordpress.org/support/article/changing-the-site-url/ to learn about what is involved first. As far as plugin solutions, there’s lots that exist already, which would be a safer route than rolling your own. Better Search and Replace is a popular one. Since you’re going to … Read more

Bootstrap 4 Optimization

You just make a big mistake. use this guideline. header.php <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” integrity=”sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm” crossorigin=”anonymous”> You also made a mistake calling js file. Frist needs jQuery then popper.js then bootstrap and the big mistake is you call all of them in the header file, that’s why when the page is loaded it takes time to … Read more

How can I make thumbnails a display different size/position if the blog post was posted before a specific date?

In what way is it affecting your post thumbnails? I cleaned up your code a bit. If you can show me the output you’re getting I’ll be able to help you further. <?php global $post; $compare_date = strtotime( “2018-03-01” ); $post_date = strtotime( $post->post_date ); if ( has_post_thumbnail() ) { if ( $compare_date < $post_date … Read more