•  

Dofollow link on premium listing page

This thread is over 4 months old
The content and issues discussed here maybe out of date or inaccurate.

Check you are running the latest version of your PremiumPress theme then look for a more recent forum post or submit a support ticket.
  1. u 7693
    offline
    Savas
    Posted 1 year ago

    Hi Guys,

    I want to keep my directory with nofollow links, but want to let premium listings have dofollow links. I thought I can achive that by creating a custom field that is only available to premium listing package and within the code, detect the database Key ID which is "Key_2" and removing the nofollow tag from it.

    However, I do not php that well, so I can't do it. is there an expert who can describe what needs to be done?

  2. u 8173
    offline
    Pragavailable for hire
    Posted 1 year ago

    what link/links you want to dofollow? I'm helping one of my clients to get same thing done, Maybe I can help you.

    Want some premium support? Just click the "Send Private Message" button.
    --- USPS shipping plugin for shopperpress.
  3. u 7693
    offline
    Savas
    Posted 1 year ago

    The custom filed with KEY_2.

    the content is URL,, I just want that to be dofollow. the regular visit website can be nofollow.

  4. u 8173
    offline
    Pragavailable for hire
    Posted 1 year ago

    NOT TESTED but something like this will do that.

    place this code in to your _single.php file

    $packageID = get_post_meta ($post->ID, 'packageID');

    /* you can add package number you are supposed to allow dofollow. Number 1 is FREE package */

    if( ($packageID == 2) || ($packageID == 3)) {
    print 'ID, 'KEY_2').'">Your Link text';
    } else {
    print 'ID, 'KEY_2').'" rel=nofollow>Your Link text';
    }

  5. u 7693
    offline
    Savas
    Posted 1 year ago

    Many thanks Prag. But, do I place this anyware in the code? or should it be a specific line?

  6. u 8173
    offline
    Pragavailable for hire
    Posted 1 year ago

    where you want to show the link, But it should need in side the wordpress loop. if it not inside the loop, you can add/replace $post->ID for your listing ID.

  7. u 7693
    offline
    Savas
    Posted 1 year ago

    Prag. This diddnt work but I solved it with the following code:


    <?php if ( get_post_meta($post->ID, 'Key_2', true) ) : ?>
    <div class="full clearfix border_b customfieldsoutput">
    <p class="f_half left"><span>Web Address</span></p>
    <p class="f_half left">" rel="bookmark">
    " href="<?php echo get_post_meta($post->ID, 'Key_2', true) ?>" target="_blank">
    <?php the_title(); ?>
    </p>
    </div>
    <?php endif; ?>

  8. u 1
    offline
    Mark
    Posted 1 year ago

    thanks for sharing