Custom Post Type Linked to Custom URL (Not the Post)

[ad_1]

Hello everyone,

I have a client who has a multitude of different sponsors they want listed on the website for an event. There are commonly changes to the sponsors listed and I got tired of editing carousels.

So I created a custom post type (Sponsors) and have them listed using a Post Grid block. I would like it so when someone clicks the Sponsor, instead of going to the Sponsor post, they go to the Sponsor’s URL. I have a field group with a URL field set up, but could use some help getting pointed in the right direction for implementing the redirect to the URL field for the post instead.

Would this be easiest to implement using a PHP function, or is there another method someone knows?

Thanks in advance!

[ad_2]
1 Comment
  1. Don’t use the Post Grid Block. Use a Query Loop block and design each item however you want and to link wherever you want. I’m pretty sure you can use Custom Fields as data in default WordPress, but if not, I know GenerateBlocks has it built into their query builder.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer