It depends on what you’re talking about. If you’re talking about using just
<a href="https://wordpress.stackexchange.com/page-title">Page Title</a>
, then no. It’s better to use the full link.
However, instead of using http://www.domain.com/page-title
, it’s better to use
<?php echo bloginfo('url'); ?>/page-title
.
The reason you don’t want to use relative links is the way wordpress permalinks work. If you’re on a sub-page (domain.com/about/john
) and you use a relative link to another subpage (href="https://wordpress.stackexchange.com/jane"
), it will point to the root URL (domain.com/jane
instead of domain/about/jane
.
UPDATE
The full <a>
will be
<a href="https://wordpress.stackexchange.com/questions/24476/<?php echo bloginfo("url'); ?>/page-title">Page Title</a>
Related Posts:
- Is it possible to get a page link from its slug?
- How can I reverse engineer a Permalink to Find the Page?
- How can I store page ID in a post instead of other selected permalink?
- Page begins with number, WordPress adds 2
- Removing hierarchical pages in the permalink
- Can WordPress realistically handle a site with 500 ‘pages’?
- Subdomains to pages
- Passing variables through permalink structure
- Broken wordpress permalinks on pages only
- How to get a page url by a page id?
- How to Remove Slug From Database?
- Relative or Absolute Paths for Flash Video Player Files
- How to change the permalink structure of a master page?
- Why I can’t change the permalink of this page?
- Page Attachment Permalink Structure based on Menu Order?
- Get closest page ID from URL
- How can I add a page’s ID to its permalink using WP_Rewrite?
- Permalinks for pages
- Permalinks by page/post name returning 404
- Pages not using permalink
- How to get post object on blog template
- Is it possible for a custom post type and sub pages of a page with the same slug as the custom post type to share a slug?
- Add prefix to page URL based on the page template
- get_permalink returning site home url instead of the url of slug being passed
- Get the url of a page template without using the page slug and ID
- Remove -2 from URL; no duplicate pages, no images, no pages in trash
- Host frontpage via example.com and everything else via example.com/blog
- WordPress is suppressing page extensions!
- Let me choose permalinks
- Passing the JQuery string to Worldpress URL
- Path to Pages Resolves to Archive instead of Actual Content
- Changing permalink name redirects to another template?
- Permalink opens attachment instead of page
- How do I reclaim either deleted pages or their permalinks?
- Permalink of a page that has already been deleted
- Edit permalink for certain pages
- cannot link a external url, present page url acting as parent url
- Test site pages go to main site
- how to get a list of all top level pages
- “-2” Being added to end of URL (no duplicate pages, no pages in trash)
- Redirect From Url To Url
- How are WordPress Page URLs affected by permalink settings?
- How to use page jumps to top of banner and page title?
- Get a link to paged() part?
- WordPress Page Not Found if Permalink Settings is Postname
- Pagination url for page template
- Why does enabling Permalinks make pages not found?
- Page content doesn’t display when published but does when previewed as draft?
- Update page breaks permalinks
- WP as a CMS menu
- Subdomains pointing to a permalink URL
- How can I see a list of all pages my WordPress site has generated?
- Auto Changing Text Case
- Default Permalink Structure for Pages
- Non Latin page permalink problem
- How do I structure my permalinks in WordPress?
- Link to a page before launch
- My WP homepage works, but the other pages don’t when accessing from out side of my network
- Nested permalink without dummy parent page
- Custom Permalink (with category) for Pages
- Can I link to content dynamically from a page to a new page?
- Woocommerce product page 404 not found
- Page returns 404 for specific permalink
- Change all pages permalinks instead of hierarchical to have id of the page
- The permalink for the page doesn’t work and page’s defined link throws “Object not found!”
- Page permalink ending in “-2”
- Change the permalinks structure
- Development before domain name chosen
- Select page/template from the permalink url
- Permalink for pages
- Mystery ghost page not appearing in Admin
- Category pagination first link works, remaining don’t
- Permalinks of New Pages and their Parents
- Why doesn’t my page know it’s a page (won’t return true for is_page())?
- How does wordpress keep track of post id when post id is not used in permalinks?
- How to add query parameters to all internal links?
- How to make draft posts or posts in review accessible via full url / slug?
- Social Media Links on homepage – within posts/post loop
- Does WordPress send a 301 header message when you change permalink structures?
- Trying to get property of non-object when using get_post_permalink()
- Attachment Page Permalink/URL Rewrite Issue. How to change the actual rewriting?
- 301 Redirects Result in 404 for WordPress Search Query Strings
- After updating to 4.8 permalinks will not work (all 404)
- Editing URL character replacement
- WordPress archive permalink with leaf category
- All top-level pages are using index.php as template
- How to rename ‘Tag Base’ with WPeC 3.8?
- When I click on a single post my browser goes to about:blank#blocked and the page is white
- xammp server permalink by postname not working
- Permalinks and page store
- rewrite based slug standar post wp
- Site Tagline ended up in permalink
- Getting 400 Bad request Error when trying to open posts after updating to wordpress 5.0
- Pretty Filter URL
- Permalink base only for posts
- Add URL to selected post in meta box
- Pretty permalinks to work for lighttpd webserver?
- Customize category permalinks
- permalinks url with woocommerce
- Custom Permalink Structure For a Specific Category