Answers for "taxonomy permalink page in wordpress"

PHP
4

wordpress get_permalink

// Get post permalink (you can use it inside a wp_query loop)
<?php the_permalink(); ?>
// or
<?php $link = get_the_permalink(); ?>
// outside the loop:
<?php echo get_permalink( $post->ID ); ?>
Posted by: Guest on February-25-2021
0

get permalink by id wordpress

<?php
if(count($related)) {
    echo "<div>Read More<ul>";
    foreach($related as $id) {
        echo '<li><a href="'.get_permalink( $id ).'">'.get_the_title( $id ).'</a></li>';
    }
    echo "</ul></div>";
  }
?>
Posted by: Guest on January-04-2022

Browse Popular Code Answers by Language