Change directory of javascript files

go to your themes functions.php and find line 122. You will find navigation.js function. get_template_directory_uri() . ‘/js/navigation.js and change it to get_template_directory_uri() . ‘assets/js/navigation.js do it again for skip-link-focus-fix.js code located on line 124. For customizer go and find customizer.php in ‘inc’ folder. Go line 53 and change js/customizer.js code to assets/js/customizer.js Don’t forget to … Read more

How to get the most recent modified date of anything in the footer of my site?

Just a continuation from mozboz’ answer. For those curious as I was, you could use the date() or date_i18n() functions to format the date properly in the following snippet. function get_latest_update_date() { global $wpdb; $thelatest = $wpdb->get_var(“SELECT max(post_modified) FROM wp_posts WHERE post_type IN (‘post’, ‘page’);”); //returns formatted date like 13.08.2001 return date_i18n(‘j.m.Y’, strtotime($thelatest)); } add_shortcode(‘latestupdatedate’, … Read more

can’t change footer

Hmmm sometimes FTP clients will show that you are the owner of the file but it doesn’t explain to you that other users don’t have read / write permissions. So even if you changed something in the your footer.php another user (WordPress in this case) will not see it. Did you change permissions or CHMOD … Read more

Most recent post from another database

The WordPress wpdb class is a little different than the normal way of querying in that you run “vanilla” database queries. You can see documentation on the wpdb class on the WordPress docs: http://codex.wordpress.org/Class_Reference/wpdb#Run_Any_Query_on_the_Database Also, in regard to your code, you should be able to change the line here: $originaldb->query_posts( ‘posts_per_page=1’ ); To something like … Read more

Overwrite or Replace code in WP_Footer

Since you ruled out remove_action there is only one way you can do it. And you’ve guessed it: preg_repalce, substr mixture but with a little help and PHP DOM add_action(‘wp_footer’, ‘my_start_footer_ob’, 1); function my_start_footer_ob() { ob_start(“my_end_footer_ob_callback”); } add_action(‘wp_footer’, ‘my_end_footer_ob’, 1000); function my_end_footer_ob() { ob_end_flush(); } function my_end_footer_ob_callback($buffer) { // remove what you need from he … Read more

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