Access Shortcode in ajax code?

I had the same problem. Here is the solution: jQuery(document).ajaxSuccess(function() { jQuery(‘.tippy’).tippy({ position: “link”, offsetx: 0, offsety: 10, closetext: “X”, hidedelay: 700, showdelay: 100, calcpos: “parent”, showspeed: 200, hidespeed: 200, target: “_blank”, showtitle: true, hoverpopup: true, draggable: true, dragheader: true, multitip: false, autoshow: false, showheader: true, showclose: true, htmlentities: false }); }); Put this anywhere … Read more

Created a shortcode, using it twice (but differently) on a page but its just outputting the same one twice

You’re using it twice differently, but you’re not creating a unique transient name, so the second time the shortcode runs it just uses whatever was saved in the transient the first time the shortcode ran. Come up with some way to uniquely identify the transient, like: set_transient( ‘shortcode_post_’ . sanitize_key( $a[‘name’] ), $shortcode_post, 60*60*4 ); … Read more

Shortcode for Admin Theme Option?

First of all, never use anonymous functions, never. Anonymous functions can’t be removed later by plugins or themes Secondly, have a look at the Shortcode API on how to properly create a shortcode. Thirdly, this is not a wordpress specific problem, but pure php. You are using html and php together without the proper syntax … Read more