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
Please login or Register to submit your answer