AJAX function not working [closed]

You have an error on this line: var appendHTML = ‘<div class=”ajax-loading-screen appended”> Be careful with multi-line string in Javascript. It doesn’t work the way it does in PHP. https://stackoverflow.com/questions/805107/how-to-create-multiline-strings

Slow site initial load time

Try this: 1.- Review all your plugins. Try deactivating and activating plugins until you find the one (or ones) which are slowing down the loading time. 2.- Install and configure a properly cache plugin. W3 Total Cache works pretty fine, with multiple caching types as page cache, minify cache (also minifying HTML, CSS and JS … Read more

Calling a plugin from a page template in TwentyEleven

Call the method in the class in your template file WPRandomPosts::GetWPRandomPosts($cat_ID, $col, $UseExcerpt, $beforetitle, $aftertitle, $beforecite, $aftercite); Give the params in the function for ypur custom output. $col is Number of entries $UseExcerpt is for Display a quote $beforetitle is the Tag before heading out on $aftertitle is the Tag after the header record $beforecite … Read more

PHP displaying wrong custom taxonomy images

I think (at least part of) the problem is that you’ve got a nested loop where you don’t really need one. The output of get_terms() is an array of objects. So $categories should be an array of objects. You loop through this array of objects here: foreach ( $categories as $category ) { $id = … Read more

Exclude function from running on a certain page

This works for a page on my site with ID 675: function tst($content) { if (is_page(675)) print(‘howdy’); } add_action(‘wp_footer’,’tst’); I would just interrupt the function right at the top. function keyboard_shortcut_navigation(){ global $paged, $wp_query; if (is_page(2020)) return; // for a post with ID 2020 if (is_page(‘2020’)) return; // for a post with slug or title … Read more