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)
- How to change the case of all post titles to “Title Case”
- Apply the_title() filter in post & page title, but not in menu title
- Update post counts (published, draft, unattached) in admin interface
- Code to auto expire posts after 30 days
- List only child categories a post is in, of a specific parent category
- how to display post content without post image?
- Exclude category on blog list page
- How to remove_filter that filters iframes in posts? [duplicate]
- Filter posts by author and category simultaneously
- How to change post status from publish to draft using hook in wordpress?
- Custom colors for post rows based on post meta value
- Custom wp_trim_words() function not trimming right
- Allow role to delete posts but block him the wp-admin
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- WP_Query in functions.php overrides global $post object, even with wp_reset_query()
- Delete Post From Front-End and attachment permanently
- Limit function to specific post category
- If specific user role then sticky post
- Function to show random posts from a category
- the_posts filter been called multiple time
- Only display posts after current date
- Action hook for new pending posts?
- Filter Custom Post Type by Category with Ajax
- Uppercase first sentence in every post
- How to add Tags Filter in wordpress admin dashboard
- Prepend or add an Image to the content of a Post
- Why content_arr[‘extended’] removes paragraph tags?
- pre_get_posts query between 2 dates (date stored in custom post meta)
- how to remove dash (-) post status from post title on posts listing page wordpress
- Get latest posts from WordPress site without header, menu and sidebar
- How to hide html tags on revision comparison pages?
- Ajax post filters not working
- Force the “Choose from the most used tags” meta box section to always be expanded
- Display Meta Values in Custom Filter – Admin Custom Posts
- More then one menu items are assigned with “current-menu-item” class
- How to do set post permalinks using 6 digit random unique function?
- Display post x of y within category
- WordPress Automatic Filename Changer
- Redirect to another page using contact form 7? [closed]
- add to end of post in the loop with plugin
- Add custom text automatically on each post
- Change the default blog post post attribute template name from “default template” to something else
- Is it possible to add a shortcode below post title?
- 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]
- Add code to a specific post’s content
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Related Posts: Changing Function For Posts Per Page
- Optimize CPT-function with a loop
- Same post appears in related Posts?
- Making a wordpress page print friendly
- Trying to exclude custom posts based on date, while sorting by custom field
- Set Default Post as Parent Child (Nested) Relation
- 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 to show comments only author which send own posts in wordpress
- get category in list of posts // shortcode for custom related posts
- Filter posts by month (dropdown)
- Alt text attributes not showing over portfolio images
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Function is printing twice – any suggestions?
- Set a post expiration and delete a post when expirate
- How to add a block to a category page?
- Add view to admin menu to filter for specific criteria ( If post is child of specific Parent )
- I want to change the WordPress comments file
- Add id attribute to h1 element of wordpress post
- Excluding tag Link from html tags in Post content
- Changing a users posts to drafts upon role change
- Get post id outside loop : Notice: Trying to get property of non-object
- Override wp_link_pages pagebreak with filter
- How to create frontend Post filter using meta query
- Show all posts from the tags without having to set all of them
- Trim excerpt to first paragraph
- im trying make a function to auto correct posts when i open the posts in the backoffice
- How to test if user is filtering post list in dashboard
- Extracting a TLD from the content and assign to custom field
- Show only top 3 posts from 3 categories in order on home page
- How to edit label_submit styling?
- How to modify specific parts of a post content in WordPress
- How to get posts from network blog
- How to limit the number of results for all query_posts on mysite
- User driven content problems
- How *not* to show the last post on the latest posts list
- the_content() not displaying the full post
- How do we display a certain category type on a page while hiding all others?
- Insert Shortcode exactly at the end of the content
- display last post modified date in genesis child themes
- What function does the loop of displaying posts?
- Show Next/Previous without Link
- WordPress current post functions inside loop doesn’t work anymore, are they incompatible with php 8.0?
- Modify upload directory to use post category slug in file path on multisite installation