Home Forums Newsletter Plugin Support Change the post link to custom field link

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #273592
    Ken Wilson

    I want to create a list of sponsor logos and change the ‘post permalink’ to a custom link (sponsor’s website). Because each logo is a custom post type, I am customising the CPT block.
    All logos are pulled into the email and formatted correctly, however, the default link needs to change.
    Within the block.php, the line I need to change is either:
    <href=”<?php echo tnp_post_permalink($row[0]) ?>”
    href=”<?php echo tnp_post_permalink($post) ?>”
    $url = tnp_post_permalink($post);

    The custom field link I need to add is: cv_custom_url
    How do I pull in the custom URL and replace the usual permalink?


    Hi $posts or $row[x] is a post, so you need to use the WP functions to get the post’s meta data.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.