WordPress get page by slug

Docs : https://developer.wordpress.org/reference/functions/get_page_by_path/

由頁面的 slug (名稱、代稱、路徑 ) 之字串取得,頁面的物件

example :

參考

https://stackoverflow.com/a/29770273
https://gist.github.com/lcdsantos/b25d21a0afb85bd89a41fc48afb6b609
https://developer.wordpress.org/reference/functions/get_page_by_path/

[……]

Read more