function latest_post_button() { // Get the most recent post $recent_post = wp_get_recent_posts(array( 'numberposts' => 1, 'post_status' => 'publish' ))[0]; // Get the post URL and title $post_url = get_permalink($recent_post['ID']); $post_title = $recent_post['post_title']; // Create button HTML $button_html = 'Read Latest Post'; return $button_html; } add_shortcode('latest_post_button', 'latest_post_button'); [latest_post_button]
WE ARE
  • EFFICIENT
  • RELIABLE
  • ADAPTABLE
  • RESOURCEFUL
  • INNOVATIVE
  • RESPONSIVE
  • SUPPORTIVE
Pop your info in the box below to join the Hey V.A community. 
Stay up to date with my latest work, news and upcoming offers!
Thanks! Keep an eye on your inbox for updates.