Use get_post_type()
to check the correct post type and in_category( 'blog' )
to check the category:
function get_author_bio ($content=""){
if ( 'post' !== get_post_type() or ! in_category( 'blog' ) )
return $content;
Related Posts:
- Set posts of a custom post type to be private by default?
- How can I add dropdown widget/box to admin post page?
- Limit Authors to their Own Posts on front-end excluding admins
- Multiple Content Block
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How can I show a custom post type for users in the authors.php file?
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Notice: Undefined index: suppress_filters
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Allow users to create posts without logging in?
- How to assign classes to all elements?
- Display an authors post on a single page only when they are logged in
- Showing custom post type categories in the menu
- WordPress notification if new post published
- Restrict category access to specific users/groups. Author always has access
- Get post format
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Custom post type title of each author in his own post
- Display custom post counts for author , not default posts
- redirect after submiting post for review
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- how to display author name in custom post type
- Limit custom post type to the authors only on front-end!
- Why is wp_list_authors not picking up Authors from CPT’s?
- subtracting the current post form then whole loop, which is generating all CPT titles
- Need to display author’s email id in the “Edit post” field in wp dashboard. How do I do this?
- Delete Post by User
- When post is Published, insert into custom table a number – custom post type
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Work and Display a Custom Post Type as a normal Post
- Featured image in custom post is being disabled
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- How to make a non-public post on wordpress approval?
- How to get post content by calling ajax?
- Display a query with multiple post types and same relationship on a single page
- how to group custom post types
- echo value from ‘select’ field type into page template using cmb2?
- Limit widget to a specific registered sidebar
- WP_List_Table Inside Metabox Not Working on Submit
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Add metabox with media uploader in a custom post type [duplicate]
- Exclude add_filter from the admin
- automatically create taxonomy with same name as post title
- Custom user role not working as expected
- Wp-query causing problems with the_content();
- saving custom post type data to different table in wordpress
- Display “Post 2 of 4” on single post page?
- Query post types with multiple keys
- Remove Post Page “View Post” Link
- How to make post sticky in the admin page?
- How to only show posts assigned to current user, only in certain post types
- How to customize a permalink (URL) structure?
- Disable block with taxonomies at post page
- Can’t edit custom post type
- Which post does a taxonomy term belongs to?
- PHP variable not regenerating when publishing multiple posts at the same time
- Add custom field to Posts and sort by it
- Best way to style first post differently?
- How to rewrite url for any specific taxonomy?
- help
- Add an Outside Wrapper to my Header and Make it Full Width
- How to Display Posts From Category Within a Custom Taxonomy?
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- post body class for current user only if they are the post author
- Automatically update slug with latest title within custom post type [duplicate]
- How to Query in WordPress which shows Alphabetic Posts?
- Function to erase every post from a taxonomy
- Sorting custom post types in edit.php : Post disappear
- Function to allow single post template based on custom taxonomy?
- How set template for “custom post type” individual post
- A sports wordpress website
- Custom Form / Search with Custom Post Type Data
- Settings -> Reading -> Posts Page ->Blog — is not working in my website
- Is it possible to get the specific content on the search page?
- How to create additional rendering for custom post types?
- SELECT custom post type and its meta in SQL
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- CPT tags not showing when editing post
- How do I insert a custom post type query after a certain number of recent posts and then resume recent posts?
- Persist meta box choices throughout all posts of same post type
- How to create editable sections in wordpress?
- Custom Function to redirect singular post if specific meta field is empty
- Assign for all post of a post type a specific single-post template
- Widget area for individual posts (custom post type)?
- Author archive custom posts only?
- update a posts of other custom post type
- Show custom post type under last posts configuration
- How can i call a custom method on submission of a custom plugin post type?
- How to Associate Posts with Pages
- delete custom post type using a submit form
- Styling first post using Advanced Custom Fields
- How do I display the index position of a post from a custom post type?
- how to show Author post type count
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- How to change post cpt with submit button?