bcoussens
asked on
insert page specific content into widget area in wordpress (for about 20 diferent pages)
I have about 20 pages (not posts) in my wordpress deployment I need to add some html (for a calendar) in the top sidebar that is specific for each page. how can i do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Have put the below code in a text widget, I guess i need to start with something to let it know to read the php
if is_page('269') {
[booking nummonths=1 type=5 form_type='standard']
} else if is_page('270'){
hello page 270
}
else{
}
You need to be using a text widget that supports php
you should just use the numbers
Here are some good samples on conditional tags
http://codex.wordpress.org/Conditional_Tags
But lets go for a plugin solution
This will allow you to display custom fields
http://wordpress.org/extend/plugins/get-custom-field-values/
Now we need a way to add an interface for adding the data to each page
http://wordpress.org/extend/plugins/custom-fields/
you should just use the numbers
Here are some good samples on conditional tags
http://codex.wordpress.org/Conditional_Tags
But lets go for a plugin solution
This will allow you to display custom fields
http://wordpress.org/extend/plugins/get-custom-field-values/
Now we need a way to add an interface for adding the data to each page
http://wordpress.org/extend/plugins/custom-fields/
ASKER
did not respond with any further confirmation
ASKER
I am trying your "if" code,
not sure how to specify the page?
Url is: http://bookings.australianluxurystays.com.au/?page_id=269
would i use '269'
or 'page_id=269'