Last active
July 29, 2020 02:39
-
-
Save josecarlospsh/073dbc89e5ce9c708c14899284869829 to your computer and use it in GitHub Desktop.
Revisions
-
josecarlospsh renamed this gist
Jul 29, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
josecarlospsh created this gist
Jul 29, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ <?php function get_page_id_by_slug( $page_slug ) { $page = get_page_by_path( $page_slug ); if ( $page ) { return $page->ID; } else { return null; } } ?>