- This topic has 5 replies, 3 voices, and was last updated 3 years, 1 month ago by David.
-
AuthorPosts
-
February 11, 2021 at 7:52 am #1654641Oriol
Hello,
We are just building a brand new website for our company, using GeneratePress.
In our current website, we have a Webinar section, but we are using normal Pages for every individual Webinar landing page, and linking it manually to the general Webinar page, every time we generate a new individual Webinar entry.
For the new web, we would like to treat webinars just like blog posts, but in a separate section. I am referring, for example, that we would like to have a similar “Blog” page, but specific for webinars, in which every webinar entry could generate a new excerpt automatically, and we could also filter webinar entries according to its date or category (similar as we can do for posts).
Another solution would be to create individual webinar landing pages as posts, but in this case we would need to have a Blog page, showing only regular posts, and a Webinar page, showing only webinar type posts.
I’ll appreciate any thoughts you could give me on that.
Thank you so much!
February 11, 2021 at 10:22 am #1654842LeoStaffCustomer SupportHi there,
Not sure if I understand the requirement 100%.
Would Webinars be a category? If so then WordPress generates a category archive by default which you can use.
Or maybe consider using a custom post type?
https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/February 16, 2021 at 2:48 am #1660005OriolHello Leo,
Thx for your response. The final picture we are looking for is to have two “blog” pages, one with all blog posts listed, and another with all webinars listed.
Both “Blog” and “Webinar” pages would be pages that display automatically all posts or webinars, depending on each case.
My initial idea, as you mention in the beginning, is to use the same blog post template for both cases, and create separate categories for regular posts and webinar posts. I would prefer this way, but I see the following problems:
– We will need to display, in blog page, only regular posts (don’t know if we can decide only to display some posts, based on its category).
– We will need to create another page, like “Blog”, that displays all webinar type posts, as they are being created.I would prefer using the previous solution, but as I don’t know how to address these problems, maybe would be better to create another blog post type template, and include webinars here, instead of using the blog post template.
How do you recommend me to address that?
Thanks so much again!
February 16, 2021 at 5:20 am #1660193DavidStaffCustomer SupportHi there,
simplest solution is to create the Category for your Webinars.
Then use this function to exclude the Webinar category from your Blog.function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-xx' ); } } add_action( 'pre_get_posts', 'exclude_category' );
change
xx
to the Category IDFebruary 22, 2021 at 4:43 am #1667511OriolOkay
Thank you so much. I finally just linked category archive links in the nav bar, instead of the blog page. This way there is no need to create a new “blog” page with webinars.
February 22, 2021 at 6:38 am #1667651DavidStaffCustomer SupportGlad to hear you found the solution.
-
AuthorPosts
- You must be logged in to reply to this topic.