Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?

WordPress recommends the proper way to enqueue the main style is the method-A. Please see the WordPress theme development handbook here (though both methods will work). https://developer.wordpress.org/themes/basics/including-css-javascript/ It’s not clear to me why you want to link the two .css file? You can create custom .css file and enqueue it using method-B. However, if you … Read more

Two ‘If Statements’ is my syntax correct (functions.php) and what is ‘false’

You should use elseif for the second if statement: $title1 = single_term_title( ‘Conferences In ’, false ); $title2 = single_term_title( ‘CConferences In ’, false ); add_filter( ‘get_the_archive_title’, ‘my_theme_archive_title’ ); function my_theme_archive_title( $title ) { if ( is_tax(‘us_state’) ) { $title1; } elseif ( is_tax(‘country’) ) { $title2; } else { return $title; } } You can read … Read more

WPDB function not saving

It could also be the result of this known bug: https://core.trac.wordpress.org/ticket/32315 If your data is larger than the varchar field length then $wpdb->insert will fail and produce no errors. If you don’t mind data being truncated if it’s larger than the field length, switch to $wpdb->query($wpdb->prepare(..)). Because of this stupid bug I haven’t used insert … Read more

site_url is not honoring scheme

What is original link? var_dump( get_option(‘siteurl’) ); If I am interpreting code right then for http protocol argument action is to not change the link. So if you have set up URL to be secure by default then function doesn’t override that.

Having problems loading Jquery in functions.php

You have multiple errors here. You’re including CSS and JS on the same and wrong hook For JS you could use wp_enqueue_scripts For CSS you could use wp_print_styles wp_register_script / wp_enqueue_script only accepts 4 parameters. You should only register your scripts and enqueue only the last one with its dependencies. Use the third parameter to … Read more