I’ll assume by “first” you mean “newest”, since if it’s the oldest, then all you’d need would be the url of that post.
$latest = get_posts(array('numberposts' => 1));
$url = get_permalink($latest[0]->ID);
echo "<a href="" . $url . "">Go to first post</a>";
This should give you a link that always goes to whatever is the latest post on your site. Where you add the code is dependant on your theme, as well as your personal preferences.
Related Posts:
- How do I check if I linked to a post before I delete it?
- How to use “Add link” pop up for a WordPress widget
- Portable Post Links
- WordPress: How to get the current logged in author page URL?
- Keep getting same permalink with WP_Query?
- Is it possible to add a first and latest posts link?
- Get current users post URL?
- Navigation link to specific user page
- how to grab first link in post… and of course call it
- Load post content into div with ajax
- wp_list_categories link to first post of category instead of calling taxonomy template
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- Linking to page with all posts
- Link button is not working while editing a post in Firefox [closed]
- Adding a text link under the post title in the lists of posts
- if I create ‘front-page.php’, then how do I link to post index?
- Setting up navigation links for posts (first, prev, next, last)
- Direct link to “New post” in specific category?
- Removing rel=”nofollow” from links posted in Post Content
- Delete post by giving its link
- How should I add links to other pages/posts from my post?
- Custom loop pagination links not working
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- get_adjacent_post by language
- How to handle broken links created by permalink/slug changes?
- Is it possible to paste a link without tags and make it directly a link in a post?
- How to add a class to edit_post_link?
- Can’t get full post title if there a spaces in title
- Adding a user’s ID behind the tag ref link address
- All Posts Linking to Author Posts directly
- How to generate/create link automatically on every word of post in wordpress
- Link to date_query results in WordPress
- Exists filter or action that change Add New Post link?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Authors’ Links on Homepage Not Going to Author Post Pages
- Short link to read complete post
- Delete all Tag Links from Posts
- Link from Post to Another Post Via Clicking on Words within Original Post
- Link to older links
- How to link post titles on page A to its posts on page B?
- How to create several Post pages
- Remove all external links from posts
- Edit post & page option does not display on latest wordpress
- Add data attribute of post_id for Internal links
- Prevent the automatic URL linking added in last update
- WordPress 5: prevent link from displaying page title instead of URL
- Some custom post types did not return an object
- How do I remove all links from all my posts at once?
- Creating a link to the first post in a category
- Post Category link is same with Page link
- Post List Widget with custom posts and editing the Read More Link
- How to add a class to links inside posts text
- Featured Images link to post parent
- My posts section for logged in user
- External link not showing on post but showing on comment
- How to change link with broken link?
- Modifying the permalink href for posts with jquery
- Automatically add class to link based on link text
- Read more link not working [closed]
- After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?
- How to automatically convert a form with HTML link into post
- Automatically search and replace link in content (pages/posts)?
- How to remove category and other tags from posts page
- I want the Title of page/post to show up topmost when reading the post/page
- Permalink issue with new blog posts > getting 301 redirect
- Disable WordPress’ blogging functionality and disable ‘posts’
- Trying to put an array into ‘post__in’ => array() query not working
- How to search only by post title and category?
- Phantom 302 status code when sending a POST requests on pages
- How to change what the post creation page looks like?
- How do I allow users to follow a post and then allow admins to email all users who have followed that post?
- How to start with post number x?
- Posts page only shows one post
- How can i sort the categories by ID
- Sidebar links for different pages
- Display tag image in post using Taxonomy Images plugin index.php
- Blog page not working
- Words must be included and restricted words in new posts
- Pausing and Resuming WP_Query results
- Can’t get buddypress notifications in front-end; why do I get this error?
- How to disable WordPress blog folder
- Automatically add date to the auto generation of post slug
- sql select for post_title and a term name
- Removing Extra Caption tag around image on post of WordPress
- the_content() Not Grabbing All Content
- How to check if there are posts with the same tag
- Can i have more than one form for front end posting in one template [closed]
- How to make blog posts have their own urls?
- How to add content above footer in posts from specific category
- Show posts from two specific category in WP_Query
- How to pull latest posts from a specific category
- Not able to post data through wp-admin
- Admin is showing all posts on page 1
- 3rd Party Login in wordpress
- How to mix pages and sub-categories in a url
- Overwrite URL on blog posts
- post content includes and seo vs. duplicate content
- 301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
- Display draft posts on single pages [duplicate]
- Why does ‘get_the_ID’ work outside of the loop?