• Resolved supernova42

    (@supernova42)


    When I use pdb_single, the fields displayed are governed by the order of those fields within ‘Manage Database Fields’.

    I thought the order was governed by the order of the fields within the actual pdb_single shortcode. That is what happens with the pdb_list shortcode.

    For example I want model to be the first field displayed regardless of its position within ‘Manage Database Fields’.

    [pdb_single fields=”model,name,type,length,year,photo_gallery” ]

    Could you confirm this please

    Many thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author xnau webdesign

    (@xnau)

    There is a limit to what you can do with the field order when using the single record shortcode because the fields will still be grouped. The plugin sets the order of the groups based on the field order in the shortcode, but it will show all the fields that you have designated in the shortcode in each group. It won’t shows a group twice, so that fields can appear to be in a different order than what you have in the shortcode.

    Thread Starter supernova42

    (@supernova42)

    I’m trying to work out what this mean?

    thanks

    Plugin Author xnau webdesign

    (@xnau)

    The fields will always be grouped in their assigned groups. It will try to follow the order given in the shortcode, but it will not split up groups of fields.

    Hello!
    I’m having the same issue with this functionality.
    It’s not working as you describing it. I have a shortcode defined with ‘fields’ attribute where I listed my fields in the desired order. All fields listed in the shortcode are from the same group, and there are no fields from other groups. And it looks like the order in the database always takes priority.
    I have the latest version of plugin installed *1.9.2.

    Thanks

    Plugin Author xnau webdesign

    (@xnau)

    Yes, you’re right…I didn’t test this carefully enough!

    I’ll need to issue an update to fix.

    Thank you for the update!
    Now it’s working as expected.

    Many thanks for the great plugin!

    Thread Starter supernova42

    (@supernova42)

    function insert_category($category,$description,$parent) {
    wp_insert_term(
    $category,
    ‘media_category’,
    array(
    ‘description’ => $description,
    ‘media_parent’ => $parent,
    ‘slug’ => $category //convert to lower case with hyphen
    )
    );
    }

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘pdb_single field order’ is closed to new replies.