Guest User

Untitled

a guest
Nov 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. global $post; $post->ID();
  2.  
  3. function is_specific_pages(){
  4. $current_path = $_SERVER['REQUEST_URI'];//returns page path with leading slash
  5.  
  6. //check if page path is one of the specific pages
  7. if( $current_path == '/page-1'){
  8. return true;
  9. }elseif( $current_path == '/page-2'){
  10. return true;
  11. }else{
  12. return false;
  13. }
  14. }
Add Comment
Please, Sign In to add comment