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

display custom portfolio tags

You will need to know the name for your “portfolio_tags” taxonomy. Check where it is defined as a custom taxonomy, and it will need to be added to the portfolio custom post type. The register_taxonomy() function would be your theme like this: register_taxonomy(‘portfolio_tags’, array(‘portfolio’), array(‘hierarchical’ => false, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => … Read more

Iteratively add sub shortcodes to php array

Your data structure appears to be very list like. The reason you’re running into difficulties is because you’re trying to fix a fix, which is never a good thing. Instead I would suggest you seek alternative solutions to your problem. For example, instead it would be more logical to use something like: <ul class=”component”> <li>content … Read more

add_filter to the_content after apply_filters

if you want to keep the current setup, try to hook in early and use do_shortcode(): function av_standalone_doc_404($content) { remove_filter( current_filter(), __FUNCTION__ ); if ( has_term( ‘standalone-document’, ‘formats’ ) ) { $filtered_content = do_shortcode( $content ); // … If you want to avoid repeating shortcode outputs use a static variable in the shortcode handler: function … Read more

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

Adding a Tag Parameter / Filter to My Shortcode

That plugin you have is not using the WordPress Shortcode API as it should be. There is not a single add_shortcode to be found. It has basically cooked up its own shortcode ‘feature’ by hooking a preg_replace_calback into the_content define(“categoryThumbnailList_REGEXP”, “/\[categorythumbnaillist ([[:print:]]+)\]/”); define(“categoryThumbnailList_TARGET”, “###CATTHMBLST###”); function categoryThumbnailList_callback($listCatId) { And: function categoryThumbnailList($content) { return (preg_replace_callback(categoryThumbnailList_REGEXP, ‘categoryThumbnailList_callback’, $content)); … Read more