Render page with specific id from functions.php

Question

How can I render a page from functions.php with a specific page id?

I tried something like this:

$template = locate_template('page.php');
if ($template) {
    set_query_var('page', get_post_meta( 200 ) );

    return load_template($template);
}
0
MarcelWeidum 2 months 2021-11-30T04:43:47-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse