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

    (@xnau)

    By “friendly url” do you mean an URL without a “?pdb=” tacked on the end? Where do you want the URL to go?

    Thread Starter franc3s

    (@franc3s)

    It would be lovely to have something like site.com/a-specific-field

    Is it possible?
    I know it’s a lot!

    Thread Starter franc3s

    (@franc3s)

    Or maybe something like
    site.com/pagename&specific-field

    or
    site.com/pagename?runner=specific-field

    ??

    Plugin Author xnau webdesign

    (@xnau)

    OK, do you have links to each participant’s record happening on your page with the [pdb_list] shortcode? If not, set that up, and you will see such a URL for each participant in that list.

    Thread Starter franc3s

    (@franc3s)

    I have a list with a link only for some participant. I have did it thru the method you suggested me here .

    My link url now is this;
    https://mysite.it/mypage/?pdb=167

    Can I have something like
    https://mysite.it/mypage/?runner=namesurname

    ?

    Plugin Author xnau webdesign

    (@xnau)

    franc3s,

    OK, you can do it, but you have to do it in the template. (not a plugin template, a WP theme template) The [pdb_single] shortcode can show any record based on any field, so what you have to do is put something like this in your template:

    <?php echo do_shortcode('[pdb_single term="runner" id="'.$_GET['runner'].'" ]'); ?>

    What it does it the “term” is the field you want to use to locate the record, and the “$_GET[‘runner’]” is the value that you have in the URI. If there is more than one match, it will return the first one it finds.

    This code did not work for me… Did you get it working franc3s?

    Still, I am very interested too in pretty URL for the single-record page.

    You can see my list (secondhand stores) here
    An example for a single record is here.
    Now the URL is:
    https://www.kringloop-info.nl/uitgebreide-winkel-info/?pdb=2887 where 2887= the record_id

    But I would like something like:
    https://www.kringloop-info.nl/uitgebreide-winkel-info/first_name(value)/2887

    Did you get it working franc3s?
    Can you share it with us please?

    Thank you!
    Grtz, Anna-Karina

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Friendly url?’ is closed to new replies.