Archived topic
create second blog page
7 replies · Started by Yves on October 6, 2019
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
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 :)
I tried with a custom post type. The question is how do I call the content in it?
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 :)
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 :D
Hmm, I'm confused - so your two blog pages would display the same blog posts? What would be the difference between the two?
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.
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/