Site logo

Archived topic

Create a Second Blog Section for Webinars

5 replies · Started by Oriol on February 11, 2021

Viewing posts 1–6 of 6

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!

Hello 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!

Hi 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 ID

Okay

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.

Glad to hear you found the solution.

This archived topic is closed to new replies.