Wordpress is TemplateWorldpress is a template
With this structure, all views can look completely different.
Use this template tag to find out if you are in a page template. As an option, you can specify a template name or an array of template name, and then the validation is unique to that template. This is the name of the template or the set of template (s) you want to use. Standard value:'''' (bool) Wahr bei Erfolg, falsch bei Fehserfolg. returnvalue false; $page_template = get_page_template_temug( get_queried_object_id() ) ); returnv alue (bool) $page_template; returnvalue true; returnvalue true; returnvalue ('default' ==== $template &&& ! $page_template ); 4.7.0Now works with any mail types, not only with pages.
4.2.0The $template argument has been modified to allow an arrangement of page styles. When the page template is in a sub-directory of the topic (since WP 3.4), prefix the template file name with the directory name and a forward slur, e.g.: is_page_template('templates/about.php'); due to certain hot variable overwriting during the loop, is_page_template() does not work.
Because the page template schlug is saved in mail_meta for each contribution associated with a page template, it is possible to directly retrieve mail_meta to see if a particular page has been associated with a page template. Returns the current page template slot (or an empty character if no template has been allocated - or incorrect if the $post_id does not match a current page).
Simply use this anywhere (in The Loop or outside) to see if a page has been given a page template.
Conditional tags can be used in your template file to modify what appears and how that appears on a particular page, based on the terms that that page meets. Test all conditional tags to see if a particular requirement is satisfied, and then return either TRUE or FINAL.
Below are the requirements under which different tag types print TRUE. So if you have defined a page for the title page that is statically active (see below), then this is only the page that you have selected as the "Posts page" in Administration > Settings > Read. is_front_page() When the front page of the website is shown, whether it is a post or a page.
Delivers truer if the blogs home page is shown and the option'Settings > Reading ->Front page displays' is checked to "Your latest posts", or if'Settings > Reading ->Front page displays' is checked to "A static page" and the value "Front Page" is the actual page shown. With is_home( ) it gives back real even if it is not the homepage.
This is what a users can define: If you use is_home() and is_front_page(), you must use them in the correct order to prevent errors and test any given users configuration: is_admin() If the dashboard or admin panel is shown. is_network_admin() If the network dashboard or admin panel is shown for multi-site.
In order to verify that this page is shown, use the globale administration variable `$pagenow'. is_admin_bar_showing() Return value correct when the administration toolbar is on. Hint: To view this panel or not, use show_admin_bar(), this feature should be invoked immediately after loading plugins or inserted into the theme's features. php archive. is_single() If a posting of any arbitrary contribution style (except attachments and page mail types) is shown, is_single('17' ) If posting 17 is shown as a posting.
when the post with the title "Irish Stew" is shown as a separate post. ×single( 'beef-stew' ) × when the post with the title "beef-stew" is shown as a separate post. ×single( array( 17, 'beef-stew', 'Irish Stew') ) ) )
Delivers truely if the individual contribution shown is either the Post-ID 17, or the Postname is "beef-stew", or the Mail_title is "Irish Stew". Delivers real if the individual contribution shown is either Mail ID = 17, Mail ID = 19, Mail ID = 1 or Mail ID = 11. is_single( 'beef-stew', 'pea-soup', 'chili' ) ) ) )
Delivers a true result if the individual contribution shown is either the postal_title "Beef Stew", postal_title "Pea Soup" or postal_title "Chili".
Please note: This feature does not differentiate between postal ID, postal name and postal name. You will see a message with the name "17" when a mail ID of 17 is queried. Probably the same is valid for a posting with the slot "17". ic_sticky() will return true if the checkbox "Put this posting on the cover page" has been activated for the actual posting.
h×× × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × ×
Return value if the pages shown are either Post-ID = 42 or Post-ID = 54 or Post-ID = 6. See also is_page() for more details, such as is_subpage, is_tree.
i_category('Stinky Cheeses' ) When the category page with the name'Stinky Cheeses' is shown. × ×_category( ×'blue-cheese') ) When the category page with the name'Stinky Cheeses' is shown. ×_category( array( 9, ×'blue-cheese', ×'Stinky Cheeses' ) ) )
Delivers truely if the actual contribution is in one of the categories 1, 2 or 3 ! ! ! in_category( array( 4,5,6) ) ) Delivers truth if the actual contribution is NOT in one of the categories 4, 5 or 6. Also see is_archive() and templates for categories. is_tag() If any day archives page is shown. is_tag('mild') If the archives page for day is shown with the slot of 'mild' × is_tag( array( 'sharp', 'mild', 'extreme') ) )
Delivers a true if the shown tags file has a slot of either "sharp", "mild" or "extreme". has_tag() If the actual posting has a flag.
This is when the actual contribution has one of the tag in the queue. Also see is_archive() and Tag Templates. is_tax() When any page of the taxionomy archives is shown. is_tax('flavor' ) When a page of the taxionomy archives for the flag tag is shown. if_tax('flavor','mild') When the page for the flag taxi is shown with the slot of 'mild'. ×_tax( 'flavor', array( 'sharp', 'mild', 'extreme') ) ) ) )
Delivers truer if the shown flag syntax file has a slope of either "sharp", "mild" or "extreme". has_term() Checks if the actual contribution contains one of the given words.
Provides the actual contribution has one of the items in the matrix. term_exists( $term, $taxonomy, $parent) x Return returns true if $term is in a taxi. Third argument $parent is also optionally, if specified, the item must be a kid of that parentage, the item must be taxonomic hierachical. is_taxonomy_hierarchical( $taxonomy) Return value correct if item $taxonomy is hierachical.
Also see is_archive(). is_author() When any authors page is shown. is_author('4' ) When the archives page for the ID number is 4.
vivian' ) When the archives page for the creator is shown with the nick name "Vivian". × is_author( 'john-jones' ) × When the archives page for the creator is shown with the nick name "john-jones". × is_author( array( 4, 'john-jones', ×'Vivian'))) For example, if the archives page for the writer is either username ID 4, username "john-jones", or nick name "Vivian".
Also see is_archive() and templates. is_multi_author( ) If more than one writer has posted articles for a website. Version 3.2 available. is_date() When any date-based archives page is shown (i.e., a month, year, day, or time-based archive) is_year() When an annual archives page is shown.
To be used within the loops. Also see is_archive(). ic_archive() When any kind of archives page is shown.
The " Not found " fault appears. is_paged() If the page shown is "paged". That is, an archives or the home page which is spread over several pages and is returned truthfully on the 2. and following pages of contributions. It does not apply to a post or a page whose contents have been modified using the QuickTag, see section. QuickTag section. is_attachment() When an attachments page for a posting or page is view. Attachments are images or other files that are submitted via the posting editor's FTP program.
Appendices can be viewed on a separate page or template. Also see Using Picture and Files Appendices. wp_attachment_is_image( $post_id) x Return' true if the appended filename to the contribution with the ID equals $post_id is an picture. jpg, . jpeg, . gif, et . png. ic_local_attachment( $url) x Return returns True if the given hyperlink in $url is a genuine attachement from this page.
is_singular( ) Supplies false for each is_single(), is_page(), or is_attachment(). is_singular('foo' ) Supplies false if the mail type is "foo". is_singular( array( 'foo', 'bar', 'baz') ) ) Delivers True if the post_type is "foo", "bar" or "baz".
else is_new_day() Supplies false if today is a new tag. is_feed() If the page is a syndication. Also see register_nav_menu(). in_the_loop() Verify that you are inside the queue. Helpful for plug-in writers, this condition is returned as valid when you are inside the loops.
q If the design does support dynamical side bars, return real. q If the design does support dynamical side bars, return real. q If a particular side bar is currently in use, verify that it is enabled. Delivers a true if the side bar (identified by name or ID) is used. Hint: To view the contents of a side bar, use dynamic_sidebar( $sidebar). is_active_widget( $widget_callback, $widget_id) x Returned true if the front end displays the broad with callback $widget_callback or its ID $widget_id.
Hint: To be efficient, this feature must be executed after the widget has been initiated, at the Aktion'init' or later, see Aktionreference. is_blog_installed() Return value correct if the actual subscriber is correctly setup. is_user_logged_in() Return value correct if a subscriber is currently signed in, all rolls. email_exists( $email) Verify that the specified e-mail addresses are already signed up for a subscriber name or not and return the subscriber ID or incorrect if they are signed in.
Use the following commands to verify that the specified filename $username is already enrolled for a filename or not, and return this user's ID, or return it incorrect if it does not exist.
It should feature images, see above. wp_script_is( $handle, $list ) x return a true if the scripts with handle is $handle 'registered', 'enqueue/queue', 'done', ou 'to_do' were dependent on $list.
When it is not listed, the filenames are indexed and listed. is_customize_preview() will return truthful if the page is displayed in the preview in the customizer, otherwise not.
add_action( 'loop_start', 'add_to_single_posts' ); echo'Your text or HTML'; You can also use: add_action( 'loop_start', 'wpsites_add_to_single_posts' ); echo'Your text or HTML'; Another example of using conditional tags in the loop. Select whether you want to show contents or excerpts in the index. If it is a question of a singular contribution or the start page, select it.
They can use PHP operations to analyze several conditions in a singular if instruction. That' s convenient when you need to verify whether a combination of conditions is evaluated truthfully or falsely.
Dynamic Menue Highlighting describes how to use conditioned tag to highlight the page in a menue. Sometimes, requests executed in other template files, such as the side bar, can occur. php can damage certain conditional tags.