You can get the value of front
in the global $wp_rewrite
:
global $wp_rewrite;
echo $wp_rewrite->front;
// or
echo home_url( $wp_rewrite->front );
Though that is probably of limited use, as the front base isn’t necessarily an existing page, and may 404 in many cases. If you’re using that value to prepend to other URLs, you’re likely doing it wrong.
If you want the page designated as the posts page, that value is stored in the page_for_posts
option:
echo get_permalink( get_option( 'page_for_posts' ) );
Related Posts:
- How to change URL of my pages?
- remove “index.php” from permalinks
- How to get pretty URLs with add_query_arg in permalinks
- Creating custom permalink structure for languages
- Update URL Snippet to Canonical Permalink URL
- “.#[random-char-string]” being inserted at end of URLs
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- Pretty Permalinks
- How to create a permalink structure for posts in a specific category
- Remove subfolders from URL
- flexible rewrite ‘ramble’ URLs with WordPress
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- How to Modify Existing Rewrite Rules?
- custom permalink/shortlink with base62 encoded post ID
- Multilanguage URLs
- How to reset canonical URLs / fix redirect loop
- How to show the homepage on a different url, like site.com/blog instead of site.com?
- Change blog segment of URL
- Force wordpress to display page with same url structure as categories
- How to bulk edit image url in featured image and product description?
- How can i have a custom post type with more slugs for each post?
- URL rewriting: removing the site’s basename for a specific category
- Permalinks settings
- mod-rewrite exception? keep #hash in matching urls?
- Remove parent page from url
- Getting back a permalink from custom url
- Bulk append URL (add word to slug)
- home_url on IIS missing permalink index.php
- Access posts while mod_rewrite is broken
- Can I change the URL structure for a CPT only?
- Multiple Taxonomy Items for Separate URLs
- WordPress keeps removing query var from the URL
- How to construct a dynamic rewrite rule for child pages that passes more than one query var
- Permalink not changing according to post type
- Got 404 error when changed siteurl via DB in WordPress
- Using a template file for a specific custom URL
- Extra url paths as variable
- Passing parameter through permalink structure
- Logging in to installation in subdirectory renders broken dashboard (no CSS, broken links)
- rebuilding/ rewriting a url to make it SEO friendly
- My permalinks for all pages and posts now include old page titles as parents/categories
- Get value from URL with different types of parameters
- a way to support totally different url structure
- How to retrive previous Domain URL in Wp
- Custom Permalink Base
- Include language variable in url
- permalinks url with woocommerce
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- Lost WordPress website access after changing URL [closed]
- Need help with add_rewrite_rule
- Stop WordPress appending `-2` to the end of my url after i change it
- Get current URL (permalink) without /page/{pagenum}/
- URL rewrite based on a custom field value
- why does anchor name add a slash to url?
- How to change author base without front
- How to map permalinks with accented letters to sanitized slugs?
- Add custom directory in URL
- Using two permalinks for one post
- Custom rewrite rules for a $_GET request
- How to increase the character limit for post name of 200?
- Put post ID on the custom post type URL
- redirect 301 old url to new url
- WordPress 3.4 Permalinks Redirection Problem
- Change permalink for a single post entry
- Remove the Parent category from the permalink but leave the child category
- Apostrophe in permalink results in page not found
- Remove / from www.example.com/ [closed]
- Attachment Page Permalink/URL Rewrite Issue. How to change the actual rewriting?
- wordpress api using rest_route for other pages
- Does changing a post title of a published post automatically change permalink?
- Remove custom taxonomy base from URL
- Rewrite rule intended for CPTs gives 404 for pages
- Unable to get /%postname%/ permalinks working, 404 on all links
- Permalink structure between 2 custom post types and a taxonomy
- How to use all tags in post permalinks
- Disable date based archives for all categories except one
- How to rename ‘Tag Base’ with WPeC 3.8?
- Custom rewrite rule ignored
- add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
- Access or edit custom generated permalinks with WP_Rewrite
- optional parameter in permalink structure
- replacing post ID by custom post name in url
- All in One Seo and Permalinks
- Post with no tag permalink problem
- rewrite based slug standar post wp
- assets aren’t loading on a page but loads on others? slug permalink conflict?
- remove SLASH on single_post but KEEP on categories and parent pages
- Change Project permalink to custom URL
- Add slug to default post permalinks ONLY
- Pretty Filter URL
- Converting WP Page to use full explicit paths?
- Prevent guessing slug
- Customize category permalinks
- Update permalinks
- Losing the original URL when using add_rewrite_rule
- URL to an image in a post is changing when permalink is set to custom. Can I avoid this?
- redirect word-press page with page values
- WordPress keep redirecting me to random URLs
- Blog url disappears
- Standard Htaccess directives disappear by themselves