Multiple Custom Post Type tags on one page

Is it possible to have multiple Custom Post Type tags on a single page?

Setting up a CPT was ok. Listing one result on a page was ok, but if I try to display more I get an Error 500.

I need to show three of them as teasers from a front page into blog posts, if this seems like a strange way of doing this, it’s because I cannot fathom another way to do it.

  • Yes it should be possible to add more than 1 … we will need to test and look at why this is happening
  • In the meantime you could use the recent post tag or a super block in 3 columns of your Page?

We will test more on this for the next update after 5.3 :slight_smile:

Thanks for looking into this for me Michael, much appreciated.

Sadly, the recent posts tag doesn’t return enough information to do what’s needed in this case. Ideally, I’d need things like an image, a title, a paragraph of text, text for a button (Read more) and a url that the button would be linked to (the blog post itself).

I have resorted to displaying 3 blocks using a superblock, which will hopefully link through to entries in the blog. Quite a manual way of doing things, but that’s all I can think of at the moment.

I realise that the custom post type can only return text strings or text areas at the moment, but hopefully in the future we’ll be able to specify richer content… :crossed_fingers:

1 Like

Thanks @ezchile and a good solution / work around for now

@nate also mentioned this a couple of weeks ago (richer content custom post types) so it’s something we’re hoping to add in the not too distant future :slight_smile:

Thanks for the vote for it

1 Like

This would be amazing! Once richer custom post types are implemented, I feel like this would be my go to CMS to use for every project, especially since eCommerce is out now :slight_smile:

2 Likes

Hi Michael. I’ve just checked whether 5.3 allows more than one instance of a Custom Post Type on a page, but it still gives a 500 error. Thought you might like to know.

In case it wasn’t clear what I’m trying to do, or how to replicate the error:

I’m creating a custom post type called ‘teaser’ which has a text input for title and a textarea for a small amount of text. Then I create three instances of a ‘teaser’. I then try to include those on a page, or in a block. If I include one, it’s fine, but if I include more than one, it errors. I can get it to display any of the instances individually, but if the page tries to call more than one then it throws a 500. I’d really like to be able to include more than one on a page if at all possible. Is it something I’m doing?

1 Like

Haha - hold on cowboy! :cowboy_hat_face:

We said above it’s a good idea and something we’ll add in the not too distant future, but it’s not in 5.3

You can read the full new features and fixes to 5.3 here:

I think realistically this comes in 5.3.2 or higher. We’re working on 5.3.1 and that has patch fixes currently and this will need to wait a little longer as a new feature, but we’ll do it :+1:

Apologies. When you said this, it implied to me that it was an ability that was already possible but required a fix. Not that it was new functionality.

I believe that you may be getting this thread confused with a feature request to add more than just text or textarea types to the custom post type.

1 Like

No problem at all! We’ll get this out soon enough :slight_smile:

Both features have been required and pending an update:

  • multiple per page
  • feature rich

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Thanks @ezchile and @nate this is ready for release in 5.3.2:

  • Custom Post Types can now have multiple tags and basic audio/video/image support (entry needs full URL to support this)

:star_struck:

2 Likes