Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在下面的代码中传递帖子 ID。我怎样才能在那里添加它?我想我需要在$post->ID某处添加。
$post->ID
$wp_query->query( 'post_type=movies&p=' . $_GET['pid']);
也许:
$wp_query->query( 'post_type=movies&p=' . $post->ID);
会做的?
你回答了你的问题。
I am trying to pass the post ID in the code below.
如果是发帖。 $_GET['pid']应该$_POST['pid']
$_GET['pid']
$_POST['pid']