get_the_block_template_html()wp-includes/block-template.php | Returns the markup for the current template.
|
rest_get_queried_resource_route()wp-includes/rest-api.php | Gets the REST route for the currently queried object.
|
WP_Widget_Text::_filter_gallery_shortcode_attrs()wp-includes/widgets/class-wp-widget-text.php | Filters gallery shortcode attributes.
|
WP_Widget_Custom_HTML::_filter_gallery_shortcode_attrs()wp-includes/widgets/class-wp-widget-custom-html.php | Filters gallery shortcode attributes.
|
WP_Widget_Custom_HTML::widget()wp-includes/widgets/class-wp-widget-custom-html.php | Outputs the content for the current Custom HTML widget instance.
|
wp_oembed_add_discovery_links()wp-includes/embed.php | Adds oEmbed discovery links in the head element of the website.
|
wp_get_document_title()wp-includes/general-template.php | Returns document title for the current page.
|
feed_links_extra()wp-includes/general-template.php | Displays the links to the extra feeds such as category feeds.
|
WP::handle_404()wp-includes/class-wp.php | Set the Headers for 404, if nothing is found for requested URL.
|
WP::send_headers()wp-includes/class-wp.php | Sends additional HTTP headers for caching, content type, etc.
|
WP_Widget_Text::widget()wp-includes/widgets/class-wp-widget-text.php | Outputs the content for the current Text widget instance.
|
rel_canonical()wp-includes/link-template.php | Outputs rel=canonical for singular queries.
|
wp_get_shortlink()wp-includes/link-template.php | Returns a shortlink for a post, page, attachment, or site.
|
get_next_comments_link()wp-includes/link-template.php | Retrieves the link to the next comments page.
|
get_previous_comments_link()wp-includes/link-template.php | Retrieves the link to the previous comments page.
|
paginate_comments_links()wp-includes/link-template.php | Displays or retrieves pagination links for the comments on the current post.
|
get_posts_nav_link()wp-includes/link-template.php | Retrieves the post pages link navigation for previous and next pages.
|
is_page_template()wp-includes/post-template.php | Determines whether the current post uses a page template.
|
wp_list_pages()wp-includes/post-template.php | Retrieves or displays a list of pages (or hierarchical post type items) in list (li) format.
|
get_body_class()wp-includes/post-template.php | Retrieves an array of the class names for the body element.
|
redirect_canonical()wp-includes/canonical.php | Redirects incoming links to the proper URL based on the site url.
|
Default Post Type
True when viewing a regular post.
Custom Post Types
When any of the following return true: is_single() , is_page() or is_attachment() .
True when viewing a post of the Custom Post Type book.
True when viewing a post of the Custom Post Type newspaper or book.
Different Sidebar Ads in Singular Page
To test for a single post:
Usage With Hook in Custom Function
You can use the conditional tag in a custom function with a WordPress or theme specific hook in your functions file.
In homepage:
and
will return true if you are using a static page is a homepage (reading settings).
They will return false in blog page.
This is has been noticed in WP v5.7.2