problems with jquery external rss feed integration

Your stand-alone file doesn’t know the WordPress constants and functions. Use the native WordPress AJAX API instead. See also: What’s the preferred method of writing AJAX-enabled plugins? In short: Put all your custom code into a function or a class and hook from your plugin into … add_action(‘wp_ajax_ACTION_NAME’, ‘your_function’); … and … add_action(‘wp_ajax_nopriv_ACTION_NAME’, ‘your_function’); Replace … Read more

How do you use do_shortcode via AJAX call?

I dont think it is possible to do this by using the contact form 7 plugin. Because the plugin uses bind(‘click’) on the submit button JS trigger, where it supposed to be live(‘click’) to work on an AJAX loaded form. As an alternative you can use a custom made contact form, or hide the contact … Read more

Use ajax request to load sidebar

I didn’t test anything, but I imagine it would be something like this: As you must include a sidebar.php, just include an empty sidebar.php, and leave the real one to the sidebar-ajax.php, for example. To call the sidebar: <?php get_template_part(‘sidebar’); ?> And it should be something like this: <div id=”sidebar”></div> In your functions.php: add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_scripts’); … Read more

Using jQuery .after inside loop

WordPress requires no-conflict for jQuery. Change this: var tiles = $(‘#article-tile:nth-child(‘+adLoc+’)’); $(tiles).after(adTile); …to this: var tiles = jQuery(‘#article-tile:nth-child(‘+adLoc+’)’); jQuery(tiles).after(adTile); Or else wrap your entire script accordingly: jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function });