fadedglorydesign
Forum Replies Created
-
Forum: Plugins
In reply to: [Slideshow] Randomly choosing slideshow with Custom FieldWell, I actually found this old post: https://ww.wp.xz.cn/support/topic/do_action-with-id-from-custom-field-fails-in-random-deploy?replies=3
and just modified it until it worked. I guess it has something to do with it recognizing slideshownumber as a text instead of a number….D
Forum: Plugins
In reply to: [Slideshow] Randomly choosing slideshow with Custom FieldThanks!
I ended up finding this – I had tried to execute it before but it wasnt working: https://ww.wp.xz.cn/support/topic/do_action-with-id-from-custom-field-fails-in-random-deploy?replies=3The code I ended up using that worked was this:
<?php
$slideshow = get_post_meta($post->ID, “slideshownumber”, true);
if ($slideshow) {
do_action(‘slideshow_deploy’, $slideshow); }
?>Forum: Plugins
In reply to: [Slideshow] Randomly choosing slideshow with Custom FieldYeah, i declare each slideshownumber as a custom field. So in each wordpress post, I create a “slideshownumber” with the associated code. I think I’ve created somewhere between 5 and 10 slideshows, but this started happening even when there were only 2 or 3.
As far as i understand, the php code should be taking the custom field ‘slideshownumber’ and using that to display that slideshow. But it randomly just selects any slideshow, rather than the value of the custom field….?