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 ?
use pagename= to query by slug. See WP_Query for full list of valid arguments.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
3 years ago