the_ID for use in the page, not display?
-
The templating engine of WP seems to be mighty inconsistent.
- the_title() has a parameter that allows me to use it as a variable in my PHP:
the_title('', '', FALSE)
. - the_ID() is equally useful if not more (for doing some custom SQL in the page) but doesn’t have this feature to send parameters and get the ID as a value instead of displaying it.
- the_content() also doesn’t have any parameter for returning the html-stripped (text only) to use in PHP instead of simply displaying it.
Any ideas on how I can get the value of the current post’s ID and content? I want to use this in my Single Post template to run a query (to show related posts).
Thanks!
- the_title() has a parameter that allows me to use it as a variable in my PHP:
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘the_ID for use in the page, not display?’ is closed to new replies.