I’m doing some custom loops that I initialize with a query like this
$the_query = new WP_Query('page_id=266');
It works fine. It’s just I’ld to call my page with its slug and not its ID.
Would it be possible ?
I’m doing some custom loops that I initialize with a query like this
$the_query = new WP_Query('page_id=266');
It works fine. It’s just I’ld to call my page with its slug and not its ID.
Would it be possible ?
You must be logged in to post a comment.
use
pagename=
to query by slug. See WP_Query for full list of valid arguments.