• Hi!
    I am running a website for artists, and of course I use PDB as a database plugin.
    Have one wish, and that is to be able to automatically show an artist, completely random, for example, using [pdb_singel] on the front page.
    Is this possible? There is no solution in the documents I have searched through.

    /GeirH

    The page I need help with: [log in to see the link]

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

    (@xnau)

    The list shortcode has the ability to choose a record at random. If you set up the shortcode like this:

    [pdb_list orderby=random list_limit=1]

    it will show a single record using the layout determined by the list template. You can also determine which fields are shown in the shortcode using the “fields” attribute. If you want to limit which records it chooses from, you can use the “filter” attribute for that.

    For the presentation, I also have a tutorial that explains how to set up a list template that shows a single record using the single record shortcode if you’d rather go that way. It is for a slightly different purpose, but the basic idea is the same:

    Showing a Search Result as a Single Record

    Thread Starter geirhog

    (@geirhog)

    Hi!
    This was almost as I had intended.
    What I do not want is that there is an opportunity to browse other records. I just want to see a post alone.
    See: https://test.web4artist.no

    Plugin Author xnau webdesign

    (@xnau)

    What is giving them the opportunity to browse other records? I don’t see that it is possible to do so on that page.

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

The topic ‘Show random record’ is closed to new replies.