If it is a single page: is_single()
returns TRUE
.
If a $post
is in a specific category: in_category( $cat )
returns TRUE
. It needs $cat
as ID, name or (string) slug.
Anyway: Searching for a list of conditional tags isn´t that hard.
Related Posts:
- Customizing gallery shortcode in 3.5
- What is true chmod for WordPress?
- Can You Export Theme Settings From WordPress Multisite?
- Adding Custom Fields to WordPress Comment Forms?
- Gallery Shortcode: using link attribute to link to a specific image size
- How do you add pages on a staging server, and then move them over to production
- Any Hook Called When Post Becomes Published?
- Automatically wrap post image in div
- How Can A Widget With Only One Instance Be Defined?
- Getting $comments outside the comment template
- get_theme_mod(); returns nothing
- Limit comments displayed on basis of user_id
- Find and replace domain name on the fly?
- What is the most idiomatic way to let clients edit phrases in HTML?
- How to Register and Display Widget for Custom taxonomy
- Is it possible to set default values for custom fields in a custom post type while my plugin is being activated?
- How to change “Dashboard” text in wordpress
- WordPress Template not affecting the working, keeps defaulting to the index.php template
- Custom Widget form function common elements
- Image Editor does not affect custom sizes!
- How to display post title & excerpt when mouse hovers on an image?
- How to fix the IE9/WordPress Twenty Ten Header Image Display Problem?
- Reinstall WordPress Without Losing Data
- Automatically add image caption with values from a post parent field?
- WP Northwind for Theme Development?
- list/consult Taxonomy only for the respective author/creator in dashbboard
- How to insert a sitemap within a subsite when using WordPress multisite
- Enabling Additional CSS / custom-css
- Child Theme – how to add new widget on a specific place?
- Modify Gallery Output to render differently on a PAGE and a POST
- @font-face is not working in WordPress
- Add google org chart to wordpress page
- I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box
- How-To add Custom field in WordPress wp-ecommerce Categories?
- What changes we need to make to a theme so it can be installed as a MU Theme?
- Get Custom Logo Alt Text
- The function can not create a table on MariaDB server
- Child theme .css files are not overriding their parent .css files
- One WordPress Installation for 2 Domains
- result from custom filter admin table list backend does not work
- How can I get the custom post type assigned to a current custom taxonomy for query?
- $wpdb->replace: WHERE?
- Set Title from Custom Template
- For a specific theme, how do I build a list of all the possible theme modification names?
- Unable to edit the “customize” section and the “widget” section is populating unknown code
- Blog page problems
- Installing new theme on running site
- Switch between WordPress websites easy for an end user
- I’d like to be able to programatically setup a site to discourage crawling by search engines
- Is there a way to add a new value into a stored custom field value?
- dbDelta not creating tables with composite keys
- Customizing Users in Admin Area
- Good way to customize admin CSS?
- Divi theme: change overlay color from default blue to back [closed]
- Add table to WordPress database
- get_delete_post_link( $post->ID ) is blank when logged in as “subscriber”
- Menu not appearing in custom theme
- failing to display a custom font [closed]
- How to redirect the home page to a custom page?
- Dynamic Sidebars based on page name
- How can I create a basic PHP that can lives outside WP?
- Make a difficult page editable
- Overstand theme set up issue
- Make the home page template my archive/category page template without code duplication
- How to create multipage form and redirect to specific URL based on inpput?
- Simple custom attributes on posts
- Add producthunt badge to wordpress menu
- Polylang will not allow changing of language without translation
- WordPress 5: including larger thumbnail image sizes in srcset than I have set
- remove screenshot.png via dashboard
- Custom query pagination with php parameter as arg problem
- Perform javascript when an input in Customizer is selected/focused?
- Problems with running a 2nd installation of WordPress on my domain?
- Change the WordPress > Error title?
- How to add a static text at end of a wordpress permalink
- Send default WooCommerce email when switching from custom order status
- How do I enable the text editer in my WordPress theme? [closed]
- Style Radio Buttons inside Edit Page (Custom Fields)
- How to display all post from the same current usermeta
- Having a forum in a subfolder
- How to echo custom styles in css format?
- Accept HTML in custom function
- How to access my WP site locally and publicly? [closed]
- Why, when it comes to custom background and image, does ‘The first value registered’ win?
- Add date under slider/grid featured content
- Unable to retrieve data from multiple WordPress websites on same server
- Apply `the_content’ filter to theme customisation live preview
- How to customize the gallery shortcode in WordPress?
- Unable to show messages using ‘admin_notices’
- Using Custom Fields in post, need to put into the_content
- Upload files in wordpress
- Custom Query for Taxonomy
- What is Global WordPress Objects?
- Using str_replace on wp-admin
- Single page template
- Why should I keep my personal WordPress separate from my “professional” one? [closed]
- How do I include the sidebar (with Widgets) in a custom theme?
- Edit image alignment in WordPress twentysixteen child theme on attachment page [closed]
- how to add a page
- Custom Post want button to add image and save in Postmeta