Support

Account

Forum Replies Created

  • Ok, I figured this out. Needed to change orderby to ‘orderby’ => ‘post__in’

      if($ids){
      $args = array(
          'post_type' => 'any',
          'posts_per_page' => 6,
          'post__in' => $ids,
          'post_status' => 'publish',
          'orderby' =>  'post__in',
          'order' => 'ASC'
      );
      } else{
          $args = array();
      }
  • This is great John, thank you for sharing. I’ll have a look and if I have any questions I’ll ping you on github. Many thanks again!

  • Hi John

    You’re probably right regarding the suitability of this feature with ACF. I’d love to see how you achieved your solution in a gist – if only for learning purposes 🙂 I can’t see me using this solution too often either. The only reason I started looking for one was because somebody wanted a friggin parallaxing homepage and I was curious as to how to add an easy solution to change the images used.

  • Hi John

    I’m looking for a solution that can dynamically change the inline style tag to set the path to the appropriate background image. I’ve managed to do this with feature thumbnail images within <picture></picture> using picturefill as the polyfill but cannot find any reference to a background images solution. It would be nice if this sort of thing would be a nice feature for ACF using an image array without having to resort to multiple uploads? Hoping Elliot feels the same 🙂

  • Figured it out. Using this:

    <?php $var = get_field('media_gallery_slider');
    if ($var == '')
    { }
    else { echo do_shortcode( '[new_royalslider id="' . $var . '"]'); } ?>
  • Hi spacewindow

    I’m just using this snippet to return a list of RoyalSliders in a select field for a custom post type. Works perfectly in the backend. How did you get the slider to display on the front end? When using the_field('media_gallery_slider'); I just get the slider ID number displayed. I’m assuming you manage to echo the shortcode on the front end, but can’t figure out how? Any help would be awesome

    Many thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.