Support » Plugin: MetaSlider » Simple slider, requires hard-coded id

  • Julix

    (@julix91)



    I love the slider in general, but I’m getting really annoyed at them breaking.

    Can’t choose the id myself (it’s selected randomly), thus when moving the theme – or database – stuff can break horribly. Would be better if there were other ways to target which one you want to display.

    Cheers,
    Julian

    Update: got a supportive response in less than a third of a day… that’s impressive! Have a star back! 🙂

    • This topic was modified 5 months, 4 weeks ago by  Julix. Reason: Update re support
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor kbatdorf

    (@kbat82)

    Hi @julix91,

    You’re correct that we assign the ID automatically, but changing themes or exporting the database will absolutely not cause them to break. When you export a WP custom post type, it’s attached to that ID. Maybe something else is happening? If you can provide more details I am more than happy to help debug your situation.

    That being said, if we add the logic to let users use the title instead of the ID, the trade-off is adding more logic that isn’t necessary. However, I’ll look into adding an extra optional shortcode parameter this week and see what’s involved. Thanks for the feedback.

    If you’re exporting the database as well – I meant or. For big changes, we sync staging with the live-version and then move the entire staging live again after changes – but for small stuff (and implementing a slider should be small stuff) it’s great to be able to just push the changed theme files for example.

    Also, the theme files shouldn’t have to be customized too much per project – so one thing I’ve done is create a theme option where I store the id of the slider, so that way if it does change it’s fixable without editing theme files. But it would be neat if we could have a better way of grabbing the slider.

    What’s up with the random id rather than just in order?
    First slider id=1, second id one higher, etc.?

    Sorry if the question is dumb haven’t looked into the plugin code much yet.

    And thanks for the quick reply!

    Update: I just thought about it again… gravity form has in order ids but it also adds extra tables to the database. So I’m guessing the id thing is because this one doesn’t do that, right?

    • This reply was modified 5 months, 4 weeks ago by  Julix.
    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @julix91,

    We use WP custom post type so it’s in order with posts you create. If you create a slideshow, then a few pages/posts, the number will increment.

    If you want to keep your theme files in sync with two separate databases you can just use both shortcodes in the theme files and if one doesn’t exist it will be ignored.

    <?php 
      echo do_shortcode('[metaslider id="4"]');
      echo do_shortcode('[metaslider id="7"]');
    ?>

    I want to write my theme to be agnostic to the database – i.e. it could be the same theme on completely different websites knowing only that “the slider goes here”.

    I guess one way would be to make a widget for the home-slider section, that way the exact shortcode stays on the dashboard/database side of things… But that seems a bit much.

    Ideally I’d want

    [metaslider name=”home-slider”]

    Plugin Contributor kbatdorf

    (@kbat82)

    Well there’s many ways to go about it that aren’t too much extra work. But anyway I’ll see about adding a name/title parameter that will take precedence over the ID.

    joe

    (@joemilesxibo)

    Thanks Julix for the feedback. Every star helps us invest more in improving things.

    [metaslider name=”home-slider”]

    That would be absolutely fantastic!

    Will it be implemented in the next releases?

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @baga, @julix91,

    I added that feature a little while back (but forgot to mention it here). There’s a button where you can switch to view the title shortcode. See here:

    [metaslider title="Home"]

    http://prntscr.com/l7h6f8

    Hi kbatdorf,
    thank you very much for your reply!!
    It works like a charm,
    kind regards.

    Yay! Cheers

    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @julix91,

    Try it out when you get a chance and let me know if that’s what you were looking for. Always happy to add in requested features when possible!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this review.