Site logo

Archived topic

Modifying a site library page

14 replies · Started by Nanette on June 28, 2019

Viewing posts 1–15 of 15

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?

Hi 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 :)

Well 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, application2

I hope that helps

I 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.

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

Hi Leo,

That worked like a charm. Thank you so much.

No problem :)

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

I am trying to make it alphabetical and only show one category which is Industries. And I did not build a custom one.

So 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?

Yes, 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.

This archived topic is closed to new replies.