Get post title with link

Did you use it like that??

<a href="https://wordpress.stackexchange.com/questions/141318/<?php get_permalink($id); ?>"><?php the_title($id); ?></a>

for use to that

foreach($ids as $id){
  $link = get_permalink($id);
  $title = get_the_title($id);
  $links .= '<a href="'.$link.'">'.$title.'</a>'.'<br/>' ;
  //$links .= $link . ' <br>';
}

get_permalink

get_the_title

Try to use that while I’m coding your code.

Leave a Comment