WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Reusables
using IDs instead of names a bad idea (3 posts)

  1. withinreach
    Member
    Posted 3 years ago #

    Although the docs in readme say you can use reus('some-name'), the online FAQS here say otherwise.

    And that's a bad thing.

    See, if we develop locally while the client works on a test server to pop info, I found that the IDs are not in synch. Therefore my template code - reus(161) or shortcode won't work on test server.

    A consistent naming convention, now gone away, would have been much better. To my mind, this lack renders your product unusable.

    http://wordpress.org/extend/plugins/reusables/

  2. ooeygui
    Member
    Plugin Author

    Posted 3 years ago #

    Originally the plugin was designed this way, but one way or another you're going to need a unique identifier. Name just isn't unique. Unfortunately, with the transition over to using custom post types in WP3.0 we don't have much(if any) control over post titles/names so theoretically you could create two reusables that share the same name, which can be a bigger problem.

    I appreciate the input, this has been on my mind after having made that change in the plugin, a controllable "slug" would be what you want. Similar to the url slugs on posts.

    One suggestion, if you're working locally(with or without version control) it might be a good idea to create your reusables out on the production environment and sync the database to your development environment before you start working. That ought to cut down this issue a bit. Also, consider using dynamic sidebars, reusable region widgets, and the [reus] short tag in your theme rather than directly calling the reus() function(ie: Utilize your admin screens as much as possible, that's really the whole point of the plugin). I made the functions available just in case, but I really don't recommend using them if you don't have to. It creates dependencies where your theme MUST have that plugin installed in order to work. This has always been why I like WordPress, for the most part everything works independently, and its just simple. Look at Drupal where everything depends on everything else in order to work, it can be really confusing.

  3. badandy80
    Member
    Posted 3 years ago #

    My client has the same issue. For some reason, the plugin stopped working and now that we're trying to put it back all of the ID's are out of sync. Is there any fix for this? We have hundreds of pages with the short tags in there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags