I have what I think is a simple question but for some reason using any type of ararys won’t work, at least as I tried.
I have two or three short codes I want to rotate using php but I’m not sure how to get only one to show at a time and what options I have for rotating.
Thanks for the code. That is what I have used in the past but with shortcodes I cannot get it to work. The php code I showed in the original post works great, but is will show both at the same time. I need only one to show and for them to be rotated.
I have been going nuts with this, it cannot be that difficult, I must be overlooking something.
Thanks again for the help, does anyone have any other suggestions?
The problem is the shortcode works like this [this shortcode], it will be converted to whatever the shortcode represents.
example: [shortcode 1] will display a form
[shortcode 2] will display a image
[shortcode 3] will display link
whatever is in the must be a shortcode with a function already written. So if I use my example line from the other post: <?php echo do_shortcode(‘[shortcode content 1]’); ?> [shortcode content 1] would display. The have to also show on the page so the script knows it’s a shortcode.