[Resolved] Create a Second Blog Section for Webinars

Home Forums Support [Resolved] Create a Second Blog Section for Webinars

Home Forums Support Create a Second Blog Section for Webinars

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1654641
    Oriol

    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!

    #1654842
    Leo
    Staff
    Customer Support

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

    #1660005
    Oriol

    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!

    #1660193
    David
    Staff
    Customer Support

    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

    #1667511
    Oriol

    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.

    #1667651
    David
    Staff
    Customer Support

    Glad to hear you found the solution.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.