- This topic has 14 replies, 3 voices, and was last updated 4 years, 5 months ago by Nanette.
-
AuthorPosts
-
June 28, 2019 at 6:40 pm #944329Nanette
I am using the Merch site because it has the look I want but I don’t want the Woo Commerce. I like the blog page as it is, but want to change the menu name, images, and content but keep the formats of the post pages. I want to modify them all to my content and images. I assume this would be easy but I can’t see the blog page and my changes unless I preview the site to see the changes. If I go to pages and choose the Merch blog page in the dashboard, I don’t see anything. Why?
June 29, 2019 at 8:12 am #944670TomLead DeveloperLead DeveloperHi there,
The blog (posts page) is set in “Settings > Reading”. You’ll see it allows you to set your front page as a static page, or the posts page. If the front page is a static page, you can set your posts page (the blog) as another static page.
Then, WordPress will automatically populate that static page with your posts (inside the “Posts” area of your Dashboard).
If you want your blog to be your front page, you can set that option in “Settings > Reading”. Then you simply need to replace the posts in the “Posts” area with your own posts.
Let me know if that helps or not π
June 30, 2019 at 2:04 pm #945540NanetteWell to explain better, in the Merch site that I am modifying, I don’t want the blog page to be my front page, but I do want to modify it, and can’t seem to do it.
I don’t want all the Posts just specific one I have categorized (industries) but can’t seem to figure out how to have my posts the way I want. In the blog page (renamed Industries) I want only the Posts categorized as Industries shown on the blog page. Then I want the posts categorized as Applications to be listed under specific blogs that fall under the category of Industries.
Industries page list industry 1: industry 2: Industry 3:
Posts categorized as applications are listed under the related industry, example:
Industry 1 post page>application 1, application2I hope that helps
June 30, 2019 at 8:07 pm #945641TomLead DeveloperLead DeveloperHi there,
It sounds like you need a plugin like this: https://wordpress.org/plugins/wp-show-posts/
It allows you to create lists of posts specific to a category, and then display them on a static page.
July 1, 2019 at 12:11 pm #946391NanetteI do have the free version from downloading the Merch site. But can’t seem to edit the blog page to work so it only pulls from a specific category. It is pulling all new posts into the static page. I believe it is using the WPshow post related but I can’t seem to have it pull only from one category, but it pulls in all new posts.
July 1, 2019 at 6:13 pm #946571LeoStaffCustomer SupportIf you want the default WordPress posts page to show one category only, you can use this PHP snippet:
https://generatepress.com/forums/topic/multiple-static-frontpage-selected-posts-on-frontpage/#post-157558Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know π
July 15, 2019 at 12:53 pm #958641NanetteHi Leo,
So I downloaded code snippets and got the PHP Snippet and changed modified it so it isn’t home but the name of my post page which is Industries (My Post page name) As shown below:
function generate_Industries_category( $query ) {
if ( $query->is_Industries() && $query->is_main_query() ) {
$query->set( ‘category_Industries’, ‘home-industries-slug’ );
}
}
add_action( ‘pre_get_posts’, ‘generate_Industries_category’ );But it still pulls all categories.
July 15, 2019 at 3:01 pm #958760LeoStaffCustomer SupportCan you try this snippet with Tom’s instruction instead?
https://generatepress.com/forums/topic/how-to-display-post-category-archive-as-home-page/#post-877735I tested the code and it should work.
Let me know π
July 15, 2019 at 6:21 pm #958826NanetteHi Leo,
That worked like a charm. Thank you so much.
July 15, 2019 at 6:28 pm #958827LeoStaffCustomer SupportNo problem π
October 22, 2019 at 8:01 pm #1041861NanetteHi Leo,
I made a mistake of changing the categories of my industries page and after correcting it the industries page is now pulling posts I don’t want. The PHP snippet isn’t working any longer on the industries page. It should only show 7 posts categorized as industries but not it is pulling them all posts on the page and the PHP snippet isn’t working. How do I get it to work again.
https://nir-for-food.com/industries/
this is the snippet I used
function generate_Industries_category( $query ) {
if ( $query->is_Industries() && $query->is_main_query() ) {
$query->set( ‘category_Industries’, ‘home-industries-slug’ );
}
}
add_action( ‘pre_get_posts’, ‘generate_Industries_category’ );I used an exclusion PHP snippet for the application category and another for the overview category but it only seems to work for the overview not for the application those PHP snippets are:
to exlude application post
function exclude_Applications( $query ) {
if ( $query->is_Home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘-26’ );
}
}
add_action( ‘pre_get_posts’, ‘exclude_Applications’ );To exclude Overview posts
function exclude_Overview( $query ) {
if ( $query->is_Home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘-46’ );
}
}
add_action( ‘pre_get_posts’, ‘exclude_Overview’ );The PHP Snippet has priority numbers can they all have priority 1 or does that conflict?
October 23, 2019 at 9:12 am #1042602TomLead DeveloperLead DeveloperI don’t believe
$query->is_Industries()
is actually a function unless you’ve built a custom one?The code Leo linked to (https://generatepress.com/forums/topic/how-to-display-post-category-archive-as-home-page/#post-877735) makes it so your home page displays posts from a category.
What are you wanting to do on the Industries page, exactly?
November 11, 2019 at 7:35 pm #1060060NanetteI am trying to make it alphabetical and only show one category which is Industries. And I did not build a custom one.
November 12, 2019 at 8:55 am #1060828TomLead DeveloperLead DeveloperSo right now, your category page is here: https://nir-for-food.com/category/industries/
The page you linked to looks like the main blog page, which will show all of your posts. Do you want your main blog page to only show industries? What about the other posts?
November 12, 2019 at 9:01 am #1060848NanetteYes, that page should show only Industry category. I have posts that display each category
So like the home post page they will show only Applications, Overview, or Industry.
On the home page the menu breaks them out that way, but when you click on Industry https://nir-for-food.com/industries/ you get everything not just industries. -
AuthorPosts
- You must be logged in to reply to this topic.