if you are referring to the ‘posts page’ as set under dashboard – settings – reading:
<?php
if( get_option( 'page_for_posts' ) ) {
echo get_permalink( get_option( 'page_for_posts' ) );
} else {
echo home_url();
}
?>
Related Posts:
- Is it possible to list post attachments in a sub URL endpoint with a dedicated template?
- How to get full content including template HTML
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Change author slug and functionality
- Avoid WordPress categorizing a permalink request as Not found 404 Page
- All top-level pages are using index.php as template
- WordPress Not Using Template Files After Permalink Update
- Changing permalink name redirects to another template?
- implement separate templates for 1 post type
- Access or edit custom generated permalinks with WP_Rewrite
- optional parameter in permalink structure
- Single.php not loading when permalink only contains date information
- Rewrite single template permalink?
- single.php being ignored, going straight to attachment.php
- Select page/template from the permalink url
- Permalink / sub-template issue
- Text in permalink
- wp_get_attachment_url not working
- Choose template depending on URL
- Image not Showing (Can see image in inspect element)
- Need help with add_rewrite_rule
- Get current URL (permalink) without /page/{pagenum}/
- How to get pretty URLs with add_query_arg in permalinks
- How does wordpress keep track of post id when post id is not used in permalinks?
- Prevent WordPress from abbreviating-long-slugs…-in-the-admin
- Permalinks to Custom does not work (out of box)
- Multi-language permalink in qtranslate
- How to add query parameters to all internal links?
- How to make draft posts or posts in review accessible via full url / slug?
- Modify get_permalink with a specific filter
- Social Media Links on homepage – within posts/post loop
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- How to change the link structure of the homepage?
- WordPress on VirtualBox – no pretty permalinks
- Remove words from permalink when saving post automatically?
- Permalink problem
- WordPress | Convert #038; to &
- How to add category to the permalink and breadcrumb?
- Rewrite my default post URL
- Removing leading zeros from custom permalink structure
- Attachment Page Permalink/URL Rewrite Issue. How to change the actual rewriting?
- How to protect htaccess so it can’t be overwritten?
- How to link to current post in WordPress?
- 301 Redirects Result in 404 for WordPress Search Query Strings
- After updating to 4.8 permalinks will not work (all 404)
- Remove custom taxonomy base from URL
- Editing URL character replacement
- How to make /search/ without parameters not return a 404?
- Get post text (by its URL) from database dump
- WordPress archive permalink with leaf category
- Google webmaster duplicate url issue with /page/01 /page/400
- URL rewriting: removing the site’s basename for a specific category
- Redirect all posts permalinks from “.html” to “/”
- Unable to get /%postname%/ permalinks working, 404 on all links
- Nginx url rewrite rule problem
- How to rename ‘Tag Base’ with WPeC 3.8?
- Custom rewrite rule ignored
- Stop Images Linking to Themselves?
- Make last three words of excerpt a link
- Resolve 404 on posts without category
- Retrieve default permalink while using seo friendly URLs in WordPress
- Inserting a string in the middle of page’s permalink?
- When I click on a single post my browser goes to about:blank#blocked and the page is white
- WordPress Permalinks problem
- Pagination using paginate_links
- Add custom query vars to pretty permalinks
- xammp server permalink by postname not working
- Redirect after permalink changes
- the_permalink() not working
- Permalinks and page store
- All in One Seo and Permalinks
- Already have htaccess but permalink settings not working. Getting 404
- Change pemalink for one single post without redirect
- Add .html permalink to post if specific category
- rewrite based slug standar post wp
- How to update wordpress permalink structure with author role?
- How to turn a custom query string into permalink?
- How can i fix my permalinks?
- Edit Post Permalink option removed, looking for possible causes
- Site Tagline ended up in permalink
- Custom structure permalink preventing 404
- Add slug to default post permalinks ONLY
- Getting 400 Bad request Error when trying to open posts after updating to wordpress 5.0
- Category Base permalinks
- Propper way to set anchor and url param
- Pretty Filter URL
- Add URL to selected post in meta box
- How to change dynamic link to relevant post
- Auto-generated pretty permalink not using title since 4.4 update
- Problems with permalinks after update wordpress 4.2
- Prevent guessing slug
- Pretty permalinks to work for lighttpd webserver?
- Customize category permalinks
- Latin character conversion
- broken permalinks in responsive layout
- permalinks url with woocommerce
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- Not recognizing my custom templates in hierarchy
- Remove parent product category slug from product_cat url woocommerce
- How to make my custom permalink pull up the correct post