Post: The list of posts, link directly to page

By: Kryshana Hicks | Asked: 08/15/2024
ForumsCategory: Code SnippetsPost: The list of posts, link directly to page
Kryshana Hicks asked 2 months ago
Hi, In WordPress, I created a page that lists all the posts.  By default, the post titles are linked to the single post page.  In the single post page, the title then links to the actual content. Is there a code snippet I can use to allow the post titles, from the lists, to link directly to the actual content?  I would like the process to bypass the single post page. Currently, I use this code snippet for the title to contain the direct link (on the single post page): add_filter( 'frm_new_post', 'change_my_post_title', 10, 2 );
function change_my_post_title( $post, $args ) {
   if ( $args['form']->id == 9 ) { 
       $full_url = "https://company.com/reports/?entry=".$args['entry']->id;
       $title = '<a href="'.$full_url.'" class="report_links">'.$_POST['item_meta'][269].'</a>';
       $post['post_title'] = $title;
   }
   return $post;
}   Any help is greatly appreciated. Thanks

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right