[Support request] create second blog page

Home Forums Support create second blog page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1027833
    Yves

    Hi

    I have created the blog page under /aktuell. Everything works wonderfully. Now I want to create another page like the blog overview under /overview or anywehre.

    It is important to me to have the same html structure, so that my css takes effect. That’s why I do not want to use new WP_Query ($ args) or a Plugin like DisplayPosts.

    I would like to make the same call as it happens automatically under /aktuell

    I found the generate_blog.php – but how do I make a call eg. via hook

    #1027996
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    How would you be querying posts on the overview page? Where would they be coming from? Maybe a custom post type?

    Let me know πŸ™‚

    #1028496
    Yves

    I tried with a custom post type. The question is how do I call the content in it?

    #1028894
    Tom
    Lead Developer
    Lead Developer

    Your custom post type should come with a standard archive page, just like the GP blog template.

    This might help: https://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/

    Let me know πŸ™‚

    #1029600
    Yves

    but the custom archive page shows only the posts from the custom post type – it’s clear. I would like to see all posts from the blog.

    Maybe I should just rebuild the view with WP Show Posts. Then I could also implement the related post with this

    Or I can find out how I call the blog posts in a new template, with exactly the same HTML as on the blog page.There must be called a certain function, so that instead of the static page the blog post on the main page are displayed.

    Tom, thank you very much, especially because I noticed that it does not have anything to do with Generatepress πŸ˜€

    #1029830
    Tom
    Lead Developer
    Lead Developer

    Hmm, I’m confused – so your two blog pages would display the same blog posts? What would be the difference between the two?

    #1030415
    Yves

    Sorry, i was too inaccurate. I do not know enough about WordPress.

    the goal is:
    I have the blog post index page under /aktuell, with athe newest posts. And I want another overview with all posts on the start page /, but where I want to prepare the content a bit more. I thought about sorting all posts by categories and organizing the categories into a tab view.

    On both pages I wanted to display the individual posts as cards. To write the css rules only one time, its would bean an advantage to use the same template and the same html structure. So my first thought is to take the generated Content from the blog posts index page and filter it to build the new view with the category tabs.

    #1030835
    Tom
    Lead Developer
    Lead Developer

    WP Show Posts might be the way to go in that case.

    Otherwise, you need to create a page template and set up a WP_Query:
    https://www.wpbeginner.com/glossary/wp_query/
    https://generatewp.com/wp_query/

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