Add Posts page slug to Single Post permalink structure - wordpress

Does anyone know if it's possible to place WordPress Blog POSTS in a unique directory?
In other words:
mywebsite.com/blog/Post-A/
mywebsite.com/blog/Post-B/
mywebsite.com/blog/Post-C/
I'd like to create /blog/ which I believe is done by creating a PAGE but that doesn't seem possible.
I've googled this for the last few hours and still can't figure it out.

The only way you're probably going to be able to do this without a plugin is by utilizing Categories and a custom permalinks structure.
Navigate to Posts > Categories
Add a new Category
Apply the Category to the desired posts
Navigate to Settings > Permalinks
Select Custom Structure and apply the following structure: /%category%/%postname%/
There are also plugins that expand endpoints and routing. https://wordpress.org/plugins/custom-permalinks/
If your goal is to not have the posts on the front page, you can also set the Blog page to a specific page in Wordpress.
Create two new Pages (not to be confused with a post)
Navigate to Settings > Reading
Set Front page displays to A Static Page
Select the Pages to be displayed for the Front page and the Posts page
The Blogroll (Posts page) will then appear under the endpoint of the defined Page's slug. However, the individual posts permalink will not have the Blogroll Page's slug in the route.

Related

For each WordPress page of my site why I have two URLs?

In my website, I set the custom structure permalink to "/post/%postname%". I want the URL of a single blog post like domain/post/postname and it is working fine but in addition to this every page of the website following both domain/post/pagename and domain/pagename URLs but for pages, I only want domain/pagename.
Both of these URLs landing on the same page
https://shergroup.com/aboutus
https://shergroup.com/post/aboutus
I only want https://shergroup.com/aboutus for pages.
Change permalinks from setting to http://localhost/yoursitename/sample-post/
On pages, the simple posts will be changed to the page names.
And in your website, if you want to show a blog page like https://shergroup.com/aboutus/blog/ for that you need to change the slug of the web from /blogs/ to aboutus/blogs in a page but in my opinion, it's fine.
Change Permalink common and optional settings (both), then you will get desired url structure.
Path : Setting > Permalink

Identify post or page in wordpress and when to use both

I am new to wordress.. I need to create a wordpress site.. I am little confused when I use post and when I use page? How to identify whether the site should be pages or posts??
This post is very usefull for you for make Company website in Wordpress
There are very key differences between posts and pages in your WordPress site.
About Posts
Posts are entries listed in reverse chronological order on the site homepage or on the posts page if you have set one in Reading Settings. If you have created any sticky posts, those will appear before the other posts. Posts can be found in the Archives, Categories, Recent Posts, and other widgets. Posts are also displayed in the RSS feed of the site. You can control how many posts are displayed at a time in the Reading Settings.
If you want your posts to appear on a page other than your home page, see Front Page.
About Pages
Pages are static and are not listed by date. Pages do not use tags or categories. An About page is the classic example. Pages can be displayed in the sidebar using the Pages widget, and some themes display pages in the navigation at the top of the site.
How many can I have?
There is no limit on the number of posts or pages you can have.
How do I post to a Page?
All posts will appear on the main posts page, but you can also display specific posts on category pages with our custom menus feature. If you want, you can change the default page for posts to appear by changing Reading Settings in the Dashboard. This will likely require changing your Front page as well.
Reference from Wordpress Community

how does wordpress know what page to open

Newbie to WordPress coming from Joomla. Trying to get my head around how wp knows to use base.php or page.php. also if I have a page called about us do I create a page called page-about-us.php and if so how does wp know to open it
Slug
Slug is a simple id of posts and pages. WordPress by default creates slug for Posts, Pages, Categories and Tags as long as we have not created a specific Slug. Slugs are always created in small letters with “-” sign in between the words.
Example
your page name is -> “about us“ the slug of that page will be “about-us”.
In this way,this will execute from page.php and if you want to customize it in your way make a page-about-us.php.

Unable to list all the posts on blog page

I am trying to get all the posts from my wordpress site to one single page. after implementing the custom theme first i created the page named "blog". In settings->reading i set the post page to blog. I created some posts. but instead of showing these posts my blog page show index page. I have tried same procedure on default activated theme then it is working fine. please let me know what can be the issue for this ?
If you create a page named blog, then the template to produce the content of the page should be called page-blog.php (in your theme folder).

post page in wordpress

In the wordpress reading settings, where you set your "blog" page to post page,
even if I create a custom template for the blog - or add addition text/custom fields etc.
nothing seems to appear....
as far i understood , those will be ignored... as it is set static...
is there a other way, to create a custom page ("blog"), where you can add all those post into this page , style them, add text as well
If you're asking, how can I make a page of posts then there are many answers to this question. I personally ended up using these 2 plugins:
Pages Posts (which lets you present posts of a specific category or tag on a page)
Simply Exclude (Lets you selectively exclude categories and tags from page)
both can be installed via the plugins search

Resources