Add the check for a single post:
if ( is_single() && 'post' == get_post_type() ) {
add_action( 'presscore_after_content', 'insert_cp_banner' );
}
See this for details: https://developer.wordpress.org/reference/functions/is_single/
Related Posts:
- How to publish a post with empty title and empty content?
- Ajax posts filter by date, comments, top views, top likes
- Change post order random through out the entire WordPress
- Adding bootstrap classes to video shortcodes
- How to add a custom class attribute into code wrapper? [duplicate]
- Filters do not work when there are multiple (one works)
- Send post id through ajax and get the post content back
- Display post x of y within category
- Force authors to Preview a post before publishing
- WordPress Automatic Filename Changer
- How to allow visitors to filter posts by multiple taxonomies
- Redirect to another page using contact form 7? [closed]
- Order posts alphabetically: how to set order=asc in mysql query?
- Trying to alter the post_content through the_post
- add to end of post in the loop with plugin
- Add filter to the end of the post
- Get post content with all filters applied, knowing post id
- Change all author links in Blog roll
- disable Tab post on nav-menus page (Admin)
- Is it possible to filter the main loop to exclude posts from a specific category?
- Every second post different class in blog view
- Format latest/newest post differently
- is_page Funtion for Posts ?
- query post limits
- Post type no single page
- Get post meta retrieving wrong value
- Adding a user’s ID behind the tag ref link address
- The_excerpt() doesn’t parse – how to change that?
- How to only publish posts with image in it
- Modify posts listing at back end
- Isn’t the way posts are displayed very unefficient?
- Filtering posts on Post Administration Page by Week Number instead of by Month
- Prevent posts with certain post_meta to be edited
- Add custom text automatically on each post
- How to check in functions.php if there is data in a WP_Query?
- Change the default blog post post attribute template name from “default template” to something else
- Hook for changing excerpt content when excerpt not set
- Is it possible to add a shortcode below post title?
- restrict incrementation of post vies count when refreshing the page
- Post filtering is returning blank page
- Defined function isn’t showed on page
- WordPress 302 Redirect to Random Product/Post/Page
- Updating permalink structure using ‘post_link’ filter results in 404 error for posts
- Getting Whitescreen when publishing a post [closed]
- Using system date format
- How include css class based on post ( in loop ) slug?
- Get post by tag
- Add code to a specific post’s content
- Related Posts function not working
- the_content() Not Grabbing All Content
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- Restrict displaying posts to the poster itself (in Back-end)
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Related Posts: Changing Function For Posts Per Page
- Exists filter or action that change Add New Post link?
- Query function not executed between element [closed]
- Optimize CPT-function with a loop
- saving/reading custom field value does not work – no value gets POSTed
- Same post appears in related Posts?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Have h2 tag not show up if there are no blog posts
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- changing parent_id on post
- Making a wordpress page print friendly
- wp_list_categories() Exclude All Categories Except One
- Get current taxonomy and display query accordingly
- Trying to exclude custom posts based on date, while sorting by custom field
- Help on conditional statement to accompany wp_insert_post function please?
- How to implement a WordPress comments function?
- How to add content above footer in posts from specific category
- Set Default Post as Parent Child (Nested) Relation
- can’t modify post title using the_posts filter
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Show only posts with titles/permalinks that do not contain certain words
- How do I display main query posts in random order using add_filter
- Rewrite image links from attachment id to attachment link
- user_has_cap filter allows “edit_others_posts” but not is not allowing updating/publishing
- how to show comments only author which send own posts in wordpress
- get category in list of posts // shortcode for custom related posts
- shortcode // get posts by ids
- Using AJAX to filter posts without refreshing page
- How to put the author of the post in the comments?
- Filter posts by month (dropdown)
- Restricting displayed posts to posts from only select authors
- Check if almost 10 year old – working code is up to date
- Alt text attributes not showing over portfolio images
- the wp_post_update isn’t working all the time
- Find most used words in post titles
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- $post->post_content empty while all other properties are correct
- Function is printing twice – any suggestions?
- Display/Filter post using if else statement
- Filtering private Posts
- how to filter posts by category without page load (ajax) in wordpress?
- Remove pagination if search returns empty
- Remove status ‘archived’ from the default post and page view
- Remove HTML tags from all posts
- Set a post expiration and delete a post when expirate
- Dropdown Select Post Filter
- long-title posts do not want published