• hootywampus

    (@hootywampus)


    I was wondering if there was a way to make the single record field link unavailable in the list display if no information for that record is available in the single record post? Say for instance I have a list of artists displaying and I have personal info for some of these artists, but not all of them. I wouldn’t want to make their name a link that would display the single record page if it didn’t have anything to display. Is this an option you could develop?

    https://wordpress.org/plugins/participants-database/

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

    (@xnau)

    OK, this is possible by using a custom template. You’ll need a little PHP knowledge to make it work. You need to figure out what constitues an “empty” record, because obviously there will be some data there, so you need to figure out what field or fields to check.

    To suppress the link, you just need to set the “link” property if the single record link field to false with something like this:

    <?php
    if ( empty( $test ) && $this->field->is_single_record_link() ) {
       $this->field->link = false;
    }
    ?>

    Take a look at this tutorial for creating a custom template that alters the list, you just need to adapt it to your application.

    Adding an Edit Record Link to the Frontend List

Viewing 1 replies (of 1 total)

The topic ‘Single Record Link Field Options’ is closed to new replies.