Rik de Vos
Rik de Vos

Reputation: 3517

Style Wordpress Custom Post Type Single Page

I'm registering a custom post type 'events'. The events can be listed using a shortcode, and when you click on an event you go to the single view of that event. Now, I want this single view page to be styled completely different using all of the event's metadata to create maps, images, etc, but I cannot figure out how. Using a template for this single view isn't an option since this is a plugin and should work with any theme. Just filtering the post's content isn't enough as I want to style the title too.

Any ideas? Thanks in advance!

Upvotes: 0

Views: 429

Answers (1)

Charlie Morton
Charlie Morton

Reputation: 787

Luckily for you it's extremely simple.

All you have to do is create a new template called single-yourcustomposttype.php

I would recommend copying your single.php type and then modifying it, so that you keep in styling of your theme.

All the best!

Upvotes: 2

Related Questions