Categories

Get Post or Page by Name

$post_title = 'my-post-name';
$post = get_page_by_title($post_title, OBJECT);
var_dump($post);

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

IMPORTANT! To be able to proceed, you need to solve the following simple math (so I know that you are a human) :-)

What is 14 + 8 ?
Please leave these two fields as-is: