Answers for "wp get post by category slug"

PHP
1

wordpress get post slug

<?php
    global $post;
    $post_slug = $post->post_name;
?>
Posted by: Guest on August-17-2021
0

wp get post id by slug

url_to_postid( site_url('the_slug') );
Posted by: Guest on June-29-2021

Browse Popular Code Answers by Language