How do I get the URL of my wordpress pages - wordpress

I'm creating a new WordPress blog and have three pages, which I list on the main page.
But when I try and generate links for the text and publish, I get 404 errors.
codewings.blog/about - this is the default page, but I want to link to codewings.blog/webdevelopment, etc.
But wordpress wants to generated page id's in the url.
I don't understand any of this, coming from an ASP.NET background.

Related

Page URL duplicated twice in the website sitemap

When WordPress website Home Page displays the latest posts, the Rank Math SEO Plugin Sitemap contains the Home Page URL (https://website.com/) twice. In "page_sitemap.xml" and "post_sitemap.xml".
I created a static page and blog page as a test, and from settings I selected "Home Page as Homepage" and "Blog Page as Posts Page".
The same thing happened, the Blog Page URL (https://website.com/blog/) duplicated twice in "page_sitemap.xml" and "post_sitemap.xml".
Logically the Page URL must be in "page_sitemap.xml" only.
Why this is happening and If this is wrong, could you please guide me to the best practices to do?
When you see your homepage both at page-sitemap and post-sitemap, that might be happening because you've selected WordPress Dashboard > Settings > Reading > Your homepage displays to your latest posts. The sitemap should have chosen a static page but choosing that option will show the latest posts on that page. So the homepage is both a homepage (included in page-sitemap) and a posts page (included in post-sitemap), and logically that's correct.
But It’s fine, and that shouldn’t cause any SEO issues, as it simply tells Google to crawl the site. But at some point, Google will count the same URL in different sitemap files separately, which could sometimes lead to the number of URLs in your sitemaps being less than the number of URLs counted as being indexed. The same URL in multiple sitemaps is counted separately, which is why you could see something like this.
However, creating a static page for the homepage and a blog page should work.
In your case, this might be happening due to a caching issue. You can try clearing the sitemap cache and excluding the sitemap from caching.
#Steps:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
3. If the above steps doesn't seem to work, kindly apply the following filter code to your site.
`add_filter( 'rank_math/sitemap/enable_caching', '__return_false');`
Here's how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/

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

Custom link is redirecting without subfolder in URL - Wordpress

Wordpress is eating up a subfolder within my links.
My wordpress menu is set up by adding pages and custom links under the pages. Each page has several sections/paragraphs that I've link-anchored and I'm using custom links to refer to their URL.
For example: The page "Glass" has two custom links under it - "Double Pane" and "Single Pane". The "Glass" URL is found at example.com/glass and the two custom links at example.com/glass/#double-pane and example.com/glass/#single-pane respectively.
The links work just fine from the homepage. However, when I end up at one of the other pages and click on one of the custom links then the browser inputs the URL without the appropriate subfolder. So if I'm at example.com/glass and I click on example.com/glass/#double-pane then the browser inputs example.com/#double-pane which spits me back out to the homepage.
Any ideas on what could be causing this? I deactivated all plugins and the problem persists.
My .htaccess looks standard and I'm up to date on wordpress (4.5.3)
Try this plugin for url redirect https://wordpress.org/plugins/redirection/

How do i add a page to a wordpress site?

I need to add a page to a wordpress site. However, for legal reasons, the page cannot be placed in/managed by wordpress as we are not allowed to make any changes to the page or it's content. How can I add this page to our site, but keep it outside wordpress management.
Odd request, but here's one idea:
Create a page template with no dynamic content from the post, load this content into it. The only way to edit the file would be through raw code. Anything entered into the post/page content area would not appear.

WordPress cms and blog with same site, how to code blog's index page

i am coding up a cms site which also has a blog section by using wordpress.
the website previous had a blog section at /blog, which powered by wordpress, and a bunch of static pages. now they want to convert entire site to wordpress.
basically what i did is making a handful of "page"s , and set the website's index page as one of these static "page". apparently the blog section need to be part of this wordpress installation.
now i am wondering how do i render the index page of the blog as index.php has been taken for the "cms" part?
thanks
Your question isn't very clear - but there are two options for "home" page and "blog" page. Home page you have set, you can then set another page as the blog index.
Of course you will need a page template for that page so that it retrieves the latest blog entries.

Resources