WordPress wp_enqueue_style and wp_enqueue_script not working

Your action is wp_enqueue_script and not wp_enqueue_scripts. This should fix it. Lemme know how it goes! 🙂 <?php //Adding the css and js files function gt_setup(){ wp_enqueue_style(‘google-fonts’,’https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Roboto+Slab’); wp_enqueue_style(‘font-awesome’,’https://use.fontawesome.com/releases/v5.1.0/css/all.css’); wp_enqueue_style(‘style’,get_stylesheet_uri()); // wp_enqueue_script($handle,$src,$deps,$ver,$in_footer); wp_enqueue_script(‘main’,get_theme_file_uri(‘/js/main.js’),NULL,’1.0′,true); } add_action(‘wp_enqueue_scripts’,’gt_setup’); ?>

Copy permalink to clipboard automatically when publish/update posts?

Finally, I did it! Use the post_updated_messages hook instead. add_filter( ‘post_updated_messages’, function( $messages ) { // Get the permalink $link = esc_url( get_permalink($post_ID) ); // Copy the permalink automatically $autocopy = ‘<script type=”text/javascript”>navigator.clipboard.writeText(“https://wordpress.stackexchange.com/questions/367921/%s”);</script>’; // `6` is for publishing $messages[‘post’][6] = sprintf( __(‘Post published. <a href=”https://wordpress.stackexchange.com/questions/367921/%s”>View post</a>’. $autocopy), $link, $link); // `1` is for updating $messages[‘post’][1] … Read more

Modifying an enqueued script URL

You can use the script_loader_src function to filter the URLs of scripts before they are output in a <script> tag. I’d suggest something like this: add_filter( ‘script_loader_src’, function( $src, $handle ) { // Only filter the specific script we want. if ( ‘google-recaptcha’ === $handle ) { // Add the argument to the exisitng URL. … Read more

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