Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP How to get page ID
#1
Is there some simple php code snippet to get page id?
Reply
#2
For the current page, get_page_slug() (to display) or return_page_slug()
http://get-simple.info/wiki/themes:template_tags
Reply
#3
(2015-03-12, 07:15:16)Carlos Wrote: For the current page, get_page_slug() (to display) or return_page_slug()
http://get-simple.info/wiki/themes:template_tags

Of course .. my bad Blush. How about get all pages? like if i want to show all pages (and all new pages also) in one page? Rolleyes
Reply
#4
As of GS 3.3.x, a way to do something like that could be accessing global $pagesArray and using caching functions, like in this script:
http://get-simple.info/forums/showthread.php?tid=3083
(if you know a bit of php you can use some of the code - ignore the custom permalink stuff)
Reply
#5
(2015-03-15, 19:22:20)Carlos Wrote: As of GS 3.3.x, a way to do something like that could be accessing global $pagesArray and using caching functions, like in this script:
http://get-simple.info/forums/showthread.php?tid=3083
(if you know a bit of php you can use some of the code - ignore the custom permalink stuff)

Thanx, that works fine Big Grin. Jus t playing with bootstrap scrollby Big Grin.
Reply




Users browsing this thread: 1 Guest(s)