Add the code to your comment template file or your functions.php with a page conditional. The comments file depends on your theme, by default it is comments.php
, but it could be named anything, you need to look at your theme’s code.
For example if it’s the contact page,
if (is_page('Contact'))
// do something
Related Posts:
- Alter required message using comment form api
- Create page template via functions.php?
- Display a list of users with avatar filterable with alphabets
- Function to return true if current page has child pages
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- Cleaning up WordPress to improve performance?
- List of all theme customizer control types?
- Set media upload attachment link to none and hide it in WP v3.5
- How to preserve PHP modifications while upgrading WordPress?
- How to overwrite youtube embed?
- Check if page parent has certain template
- How do I create comment-reply-button using element not
- delete an array element when its date expires
- How to add default images into theme customizer image control?
- Why do filters/actions require an argument count?
- Overriding a theme redux file in child theme
- How to use return in my custom function instead of echo
- PHP can I add line numbers to file_get_contents()
- How do I fetch all comments per post via WP REST API?
- Change the site tagline (or similar) based on current page
- Setting custom canonical urls
- Handling Body class based on Template
- Add a class to the anchor tag on HTML5 gallery
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- add_action shortcut?
- Converting HTML Template to WordPress Theme
- How to control WordPress image metadata (using Imagick)?
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- How to check if a meta value has already been assigned to any user?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Removing “wpautop” (auto tags) only on certain pages?
- How to pick the default selected value in wordpress dropdown?
- Print last modified date only on posts
- WordPress Gravatar filter is removing my custom attributes
- Ajax load more button for comments wordpress
- Unique icons next to each WordPress menu item
- Limit 1 global comment per minute
- Modify custom field input data before creating a new post
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- php function to display commenter username or login
- Need help enqueueing webfonts
- Redirect to another page using contact form 7? [closed]
- Add item to top of menu using a filter in functions.php
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to make modifications only to certain elements of an HTML string on the server-side?
- Filtering a function’ output for a new continued function
- Deleting Certain terms from appearing on the front end as links
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Add meta tags to a custom header
- How to create a field in customize and show that in header.php?
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- How to have different site identity logos on each page on Astra Theme [closed]
- List post by title length
- Custom query vars filters problem with pagination
- Get the name of menu item with wp_nav_menu
- How do i wrap woocomerce attribute in list?
- How to add aria role and schema markup to custom walker container
- Is there a hack for using is_page() within the function.php file?
- Must filter functions receive all arguments passed to them?
- Customize field names in backend profile edit page through function.php [duplicate]
- WP insert post Redirect after function has executed
- User filter posts by year
- WP-Bakery – Add custom colors to buttons with template colors
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Show all people who commented on all posts by an author
- Trying to update Woocommerce meta values
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Apply function.php filter only if url not has /amp/
- Change lost password url to a mailto URL in WordPress
- Remove span tags from WooCommerce Downloads page
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Reload page with a different shortcode when a user selects from a dropdown
- WordPress Ajax filter: Create two loops for different output styles?
- Remove node from multisites?
- Automatically refresh page if widget is added to page?
- How to generate customized filtered output for the gallery
- How to remove title tag with this filter
- Real time notification on user profile after new comment
- str_replace not preserving whitespace
- Where can I find the declaration of `$_wp_theme_features`?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- How to get the rating value of each comment
- Select area and checkbox data is not saving?
- Trouble figuring out how to get my button to submit comment
- AJAX: WordPress filters inside $html do not work as intended
- Assign new post author IF another user in custom field on post transition
- Add multiple HTML attributes to an Elementor button
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Is there a hook that I can use when a fatal error occurs?