Top Poster
#1 ramon fincken 400
#2 Site admin 3
#3 Ber|Art 2
#4 braddmark 1
#5 accentmedia 1
#6 Xarzu 1
#7 pEcosespedex 1
#8 khadish 1
#9 moxxx 1
#10 nistelrock 1
[wordpress] Templates and the “is” Functions



Rating : 3 / 5

Tags:

 
Post new topic   Reply to topic    Ramonfincken.com Forum Index -> CMS-ses (Joomla, WordPress, etc..)
Beta
Want to be notified by email when this topic gets a reply?  
View previous topic :: View next topic  
Author Message
ramon fincken
Site's programmer

Get a free globally recognized avatar
It's free!


Joined: 03 Aug 2007
Posts: 400
Location: A'dam/Diemen, The Netherlands

PostPosted: Sun Oct 19, 2008 12:23 pm    Post subject: [wordpress] Templates and the “is” Functions Reply with quote

WordPress 1.3 introduces the “is” series of template functions. These tell you what type of page is being requested. For example, is_home() is true if the home page is being requested. is_category() is true if a category is being requested. Here is the full list of “is” functions and the requests for which they are true.


  • is_home() - The front page
  • is_single() - A single post
  • is_page() - A static/standalone page
  • is_category() - A category
  • is_author() - An author
  • is_date() - A year, month, or day
  • is_year() - A year
  • is_month() - A month
  • is_day() - A day
  • is_time() - An hour, minute, or second
  • is_archive() - A category, author, or date
  • is_search() - A search
  • is_404() - A 404 page
  • is_feed() - A syndication feed



Further, is_single(), is_page(), is_category(), and is_author() can accept an id, name, or nicename. Here are some examples using is_page().

  • is_page() - True if a page is being served.
  • is_page(3) - True if a page with the ID of 3 is being served.
  • is_page(’About Me’) - True if the page title is ‘About Me’.
  • is_page(’about-me’) - True if the page nicename is ‘about-me’.


Read on / Source:
http://boren.nu/archives/2004/11/10/ana...ess-theme/
Back to top
View user's profile Send private message Visit poster's website
Google adsense
Advertisement





PostPosted: Sun Oct 19, 2008 12:23 pm    Post subject: [wordpress] Templates and the “is” Functions

Advertisement
Back to top
GravityForms
Advertisement





PostPosted: Sun Oct 19, 2008 12:23 pm    Post subject: [wordpress] Templates and the “is” Functions

Advertisement
Gravity Forms Plugin for WordPress
Back to top
Post new topic   Reply to topic    Ramonfincken.com Forum Index -> CMS-ses (Joomla, WordPress, etc..) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
General forums
The world of freelance
Programming
Other projects
Poll
I love gifts

Yes goodies and presents! [3]
No but I love polls ! [1]

Related google ads