Using queries in and i see 7000+queries?

195 queries for one page is a lot. 7000 queries is not a lot, it is insane. Install Query Monitor. It tracks all queries and presents them in groups. I don’t know if it can track that many queries, this is probably an interesting stress test. 🙂 Find the source of those queries, deactivate it. … Read more

Display DISQUS on homepage

Hook it in from your child themes functions file or add the template tag to a front-page.php file Untested add_action(‘loop_end’,’disqus_front_page_after_loop’); function disqus_front_page_after_loop() { if (is_front_page() && function_exists( ‘comments_template’ ) ) { comments_template(); } } Change the loop_end hook to another WordPress or theme specific hook. If using the template tag, you might want to try … Read more

Delete wp_deregister_script(‘jquery’) returns an not shown error

WordPress uses no conflict mode for jQuery but not when you use a cdn link to load jquery file. You should use it something like this: add_action( ‘wp_enqueue_scripts’, ‘load_custom_jquery’); function load_custom_jquery(){ wp_enqueue_script( ‘custom_admin_jquery’, get_stylesheet_directory_uri().’/js/flexslider.js’, ‘jquery’ ); } Just that much is enough. No other registering, deregistering will be required. This code will load your custom-jquery. … Read more

WordPress & Ajax

This link to the WordPress Codex should help. It demonstrates a few different ways to POST using AJAX in a plugin. As for re-arranging your listed elements, this can be done a number of ways. I would recommend running a search for rearranging elements using javascript. The jQuery function .insertBefore() and .insertAfter() can be used … Read more

echo a shortcode in a shortcode code?

You will have to execute do_shortcode() on your $button. $ptoutput .= ‘<div class=”pt-buynow”><a href=”‘ . $url . ‘” class=”mt-button large”>’ . do_shrtcode( $button ) . ‘</a></div>’ . “\n”; Be aware of endless recursions! You may also check if the $button is set as a shortcode, if you want to force one. if ( !has_shortcode( $button, … Read more