Only loads on the contact template page

First a bit of advise (since the solution is based on it) – always “enqueue” your scripts, don’t just add them in the footer. Read this, for example . Now the solution for loading scripts on specific template, since this is what you asked for: function enqueue_themescrits() { if ( is_page_template(‘contact.php’) ) { //the file … Read more

Is 30 posts/sec considered slow for wp_delete_post?

Speed factor of any function that deals with content such as wp_insert_post() or wp_delete_post() highly depends on the situation and the content that it’s dealing with. Let’s make a simple example. You have a post, that contains featured image, dozen of tags, categories, a thousand custom fields, assigned taxonomies, and a hundred more. When you … Read more

How many caching plugins should be used?

@Tal, Generally speaking you should only be using one caching plugin. WP Super Cache, W3 Total Cache, Hyper Cache and DB Cache Reloaded all drop files directly in your wp-content directory and they would conflict with each other and cause errors if you were using more than one. I would recommend using W3 Total Cache … Read more

Async Loading of Custom Posts

Testing is the only way to be sure, but my guess would be that it is not the query itself that is slowing the page load. After you have fetched those 2000 records, you are looping through them. Every time you call get_template_part. This function in turn calls locate_template, which leads to load_template, where you … Read more

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