WordPress always uses the full URL when it inserts a link. There are a number of reasons for this, and they are all good reasons.
You can add relative URLs yourself by simply typing your own links and omitting the domain portion of the link.
So http://sitename.tld/cool-page
becomes /cool-page
.
As I said, though, this is not the best practice to develop. it creates a lot of potential for ambiguity and inefficiency.
Here are a couple of links for reasons to not do that and just use the tools WordPress offers you instead.
https://yoast.com/dev-blog/relative-urls-issues/
https://moz.com/blog/relative-vs-absolute-urls-whiteboard-friday
Related Posts:
- How to bulk Update URLs to new values?
- Access post from post id in URL
- How to add category to: ‘wp-admin/post-new.php’?
- How to Check if a Page Exists by URL?
- Strategy for handling hierarchical pages with empty parent content
- Open WordPress ‘Add New Post’ admin page with parameters set via $_GET
- How do you get all the urls of images attached to a post?
- How to allow slashes in single posts when i click in the edit permalink button
- Possible to create a permalink to sort with meta_key?
- how to grab first link in post… and of course call it
- How can I extract the URL of a link from a post?
- Create a separate JS application for an individual post?
- Remove slashes (both before and after) in relative post url
- Random post category URL
- Paginated Posts – Social Media Buttons Share First Page URL
- WordPress not opening posts with only numbers if permalink is post_name
- Assign category to new post via URL
- filter RSS feed in URL
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- Retrieve post ID from “querying” URL
- Start post pagination at 0 instead of 1
- How do I Redirect a WordPress Page?
- WP move posts to different path
- Make insterted image point to post url instead of attachment page
- Post is blank when I click on the link
- How to get the latest URL of my blog?
- Inserting Media to WordPress Posts
- Custom Post Type, post-formats associated to custom post type > 404 archives
- Can Permalink structure of %postname%/%post_id% improve performance
- How to prevent to create same url of post, if the previous was deleted?
- Can I show category name in url for only one of my categories?
- WordPress posts have a different URL to the index
- Posting to WP via URL
- Permalink Short code showing unnecessary link text inside the loop
- Every time I try accessing a post it redirects me to the feed
- How can I make a post sub link?
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- How to add a ‘News’ section to specific posts in WordPress
- Template for displaying CPT / Taxonomy URL issues
- Change WordPress names duplicate titles (url)
- How to generate an HTML link automatically from URL in a users’ post
- Prevent Archive URLs
- Category URL to use same string as Post URL Permalink
- Querying posts from current category, using a variable as array argument
- If I moved the location of my generic “posts” page, do I need to change the slugs for all of the individual posts?
- Multipage Post URL correction
- Post & Category Archives URL structure
- Post URL duplication adds numerical value
- WordPress URL question
- Embed image in post from external url
- structure of posts and pages
- How to change post template via url?
- How to retrieve a post by inputing the url in a custom field and displaying it on an options page
- Post as frontpage – avoid duplicate content
- Custom URL Structure for posts with subcategories
- How can I display a specific number of post in a category via a url
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- Create custom URL with different levels
- Moving Posts to a new site and maintaining URLs
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- Rewrite a specific Post Format to URL slug
- Change the default video URL in a post to shortcode format
- Choose options via url
- Default post type doesn’t display in url
- Do I need to create a multisite for querying posts from multiple WordPress sites?
- Post page still linked to old site
- Blog posts are not appearing as subs of Blog Page
- How to add paraent in Blog post URL in wordpress
- Modify Post URL Programmatically
- Get Category in save_post Hook
- migrate only recent posts
- WP Ajax returning 0, can’t find action
- Refresh wordpress post without reloading browser
- Remove pagination if search returns empty
- Remove status ‘archived’ from the default post and page view
- Adding posts updates previous post
- How to invoke a HTML custom button based on a HTML dropdownlist menu
- SQL query: select duplicate posts – but using duplicate meta [duplicate]
- Remove HTML tags from all posts
- Strange behaviour in WordPress admin
- How to create page with post content in it?
- Show post count in custom taxonomy page
- Top tags with minimum number of posts
- Set a post expiration and delete a post when expirate
- Parent menu item does not display posts when I add the sub-items
- How to 301 redirect from url with post id to permalink with post name (slug)?
- Count singular post views automatically
- Create/Set Category as Title of Post
- Reusing old post IDs
- Taxonomy checkboxes not showing current status on edit page
- Add a url parameter to the current post and read it in a shortcode
- Posts not showing content after migration
- Blocked posts in network tab
- How to distinguish pages created by woocommerce?
- Trigger on DB make problem on wordpress?
- Post images are not displayed in media library
- How to show WP admin edit page within template page/post?
- WordPress Screen Options, Help, Visual editor, Status, Visibility, Revisions, Published on and any toggled indicator don’t work for posts
- Centre Blog Index (Posts Page) on Home.php
- How to prevent post update using transition_post_status