- This topic has 9 replies, 2 voices, and was last updated 4 years ago by
Tom.
-
AuthorPosts
-
May 4, 2019 at 8:37 am #888994
Dee
I need help with a rough outline for setting up a couple of custom post types with the Dispatch Site as a base, so I can retain the overall styling for each of the custom post type modules.
I am using Pods to add the custom post type and taxonomy. I find there are several different places to make changes, and I feel I am chasing my tail a bit. I can figure this out if I have a to-do list to follow.
Here is an outline of one of the custom post types to show what I am trying to achieve:
Custom Post Type: Events
Separate Event Landing Page for Events
No sidebar, just columns
Separate Taxonomy – Event_filter
Navigation/ability to use filters to display event posts similar to the Blog Page secondary navigation in DispatchArchive pages for Event_filters similar to the Dispatch category archive pages, but with events and event_filters.
Single Posts
Keep the Single Post Header Styling and Custom Post Navigation for the Event type postsShow related posts(based on event_filter) in sidebar or below content
I have created a custom post type: event, and a custom taxonomy: event_filter and related the 2 in Pods.
What modifications do I need to get this working?
Modify the Additional CSS?
Add new php page templates – or is this something I can do with elements and layout?
How can I get the event_filters to function with the event type posts similar to the Dispatch categories/secondary navigation/archive pages?Thanks in advance
May 4, 2019 at 3:44 pm #889182Tom
Lead DeveloperLead DeveloperHi there,
I’m not sure I fully understand quite yet.
The lists that come with Dispatch can be edited to show posts from different post types/taxonomies inside the WP Show Post settings.
The “filter” (secondary navigation) can be changed conditionally using a plugin like this: https://wordpress.org/plugins/conditional-menus/
The standard archives in WordPress can’t be made to look like Dispatch without some significant coding, unfortunately. It’s something we’d like to get integrated into the Blog module at some point.
If there’s a specific issue I’m missing here, it may be better to tackle the issues one by one.
Let me know ๐
May 4, 2019 at 4:55 pm #889212Dee
I think I am overthinking this:
OK, Lets start with the event archive page here: https://dzp.photo/event/
Single Event page https://dzp.photo/event/the-third-of-the-tests/1. I can create the WPSP list to for event-sidebar and have the original Sidebar list, but both show. What is the best method to conditionally show the correct list? Can I use 2 hooks for before_right_sidebar_content for each post type(Events and Posts?) When I do this, where do I apply the css class for the list (wpsp-card zero-padding no-background)?
2. I want the custom post navigation like the standard posts, but relating to events only. Do I need to create another hook element just for events, and then what do I change in the element coding?
I will add my other questions as separate posts.
May 5, 2019 at 7:51 am #889725Tom
Lead DeveloperLead Developer1. You could try a plugin like this: https://wordpress.org/plugins/content-aware-sidebars/
It should allow you to conditionally display widgets depending on the page you’re viewing.
2. Can you show me a page with the custom post navigation? I think it should stay within its current post type (events) by default, but I could be wrong.
May 5, 2019 at 8:01 am #889735Dee
Yes I just added the Custom Sidebars plugin for the sidebars. I was hoping to minimize my plugins, but this works.
2. Here is an example. The custom post navigation does not show at all.
May 5, 2019 at 8:09 am #889740Tom
Lead DeveloperLead DeveloperCan you make sure the “Custom Post Navigation” element (Appearance > Elements) is set to display in events inside of its Display Rules?
May 5, 2019 at 8:10 am #889742Dee
Yes, I checked it, and it is set to posts and events
May 5, 2019 at 8:16 am #889749Tom
Lead DeveloperLead DeveloperCan you try replacing the custom post navigation code with this?: https://gist.github.com/generatepress/179434f97888af190ee1d65e36402962
May 5, 2019 at 8:19 am #889754Dee
Awesome….that works
May 5, 2019 at 8:22 am #889757Tom
Lead DeveloperLead DeveloperAwesome! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.