Answers for "WordPress get page url by slug"

PHP
0

get wordpress page link by id

echo get_page_link($page_id);
Posted by: Guest on May-13-2020
1

wordpress get page slug

// Get the queried object and sanitize it
$current_page = sanitize_post( $GLOBALS['wp_the_query']->get_queried_object() );
// Get the page slug
$slug = $current_page->post_name;
Posted by: Guest on March-02-2021
0

wordpress get link

<a href="<?php the_permalink(); ?>">
Posted by: Guest on May-21-2020

Code answers related to "WordPress get page url by slug"

Browse Popular Code Answers by Language