• hi.
    Im using a plugin called gigpress. I wanted to have the artist name link to an artists WP page. Someone else asked a year ago about it and the suggestion was to use;

    ‘<?php
    global $wpdb;
    if($artist_page = $wpdb->get_var(“
    SELECT post_id
    FROM wp_postmeta
    WHERE meta_key = ‘gigpress_artist’
    AND meta_value = {$showdata[‘artist_id’]}
    LIMIT 1″)) : ?>
    <p class=”gigpress-artist-link” id=”artist-link-<?php echo $showdata[‘artist_id’]; ?>”>
    “>More about <?php $showdata[‘artist’]; ?> – artist bio, news, mp3 samples
    </p>
    <?php endif; ?>’

    What I understood from that was I needed to add a custom field on an artists WP page with a value that matches their artist ID which is shown within gigpress admin.

    I pasted the code into all the gigpress templates one after another but did not see any change anywhere.

    the guy who used it said

    The code you gave returns a permalink for any one page where the value of a custom field called ‘gigpress_artist’ matches the artist_id. If there’s not a match, it returns the permalink of the current page.

    Can someone just double check the code is valid please? Once I know that i will just paste it systmatically on templates until i see something happen.

    I also want to do the same thing with the venue names but assume i can just modify the code above and change the artist_id to venue_id and custom field names for the same result.

    Thanks in adavance for reading and any help offered.
    Liam

  • The topic ‘Gigpress Plugin – global $wpdb;’ is closed to new replies.