Get the page ID from a specific template name
-
Hi, i’m trying to figure out how can i get the page ID from a template name? for example:
i’ve a page with template name ‘News’ that show the posts, when i click on a post i call the single.php page.
In single.php how can i retrive the ID of the page with template name ‘News’?
Like this:
$Pages = get_page_template(‘News’) ;
$Pages->ID;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get the page ID from a specific template name’ is closed to new replies.