rgb-green.net

get_page_by_path()

スラッグ名をもつ固定ページのIDを取得する方法

[php]
$slug_name = $category;
$page = get_page_by_path($slug_name);
$page_ID = $page->ID;
[/php]


© 2023

© 2023 Study of Reason, Inc. All rights reserved.