?
Solved

Wordpress page question

Posted on 2011-10-26
3
Medium Priority
?
197 Views
Last Modified: 2012-05-12
Hi Experts,

I'd like to test for a particular page i.e. www.helloworld.com/thankyou  so I can execute a particular script if that page is being rendered.

Something like this: <?php if(is_front_page()) { ?>
except it's testing for a particular page

Any ideas?

Thanks,

HNM

0
Comment
Question by:HelpNearMe
3 Comments
 
LVL 19

Expert Comment

by:xterm
ID: 37035600
How about:

if ("$_SERVER["HTTP_HOST"]/$_SERVER["REQUEST_URI"]" = "www.helloworld.com/thankyou") {
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 2000 total points
ID: 37035850
You do this with the is_page() function in WordPress:

http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

So

is_page( 'thankyou' ) {
 do something;
}
0
 

Author Closing Comment

by:HelpNearMe
ID: 37037985
worked thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question