Quantcast
Channel: Topic Tag: error | WordPress.org
Viewing all articles
Browse latest Browse all 31576

AndrewShea on "Shortcode args not refreshing"

$
0
0

Ive wrote a plugin that takes an argument. When I change the argument in the shortcode it doesn't change the result and acts like the old arg is still being provided.

I've done all the various cache refreshes (soft/hard/full) and it seems random when it actually changes (anything from immediately to a day later - my workflow is being seriously affected)

Not sure what I can show in the way of code but heres the short code format
[ajs_push_content content="intro-test1" link="none"]

and the code is

function push_post_as_content($atts)

{

$fargs = shortcode_atts( array(
		'section' => '-999',
		'link' => '#',
	), $atts );

extract($fargs);

if($section != "-999"):

  $ajs_test = "#".$section."#<hr>";
etc......

When no arg is given its sometimes showing the previous arg, then when one is given its showing the -999....

Pulling my hair out - never had this problem before with shortcodes.


Viewing all articles
Browse latest Browse all 31576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>