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
- How to make a image-size selected by default in Media upload – WP v3.5
- 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?
- adding a filter to a shortcode?
- Set media upload attachment link to none and hide it in WP v3.5
- How to preserve PHP modifications while upgrading WordPress?
- Change the footer text on the login page
- add_filter to post-gallery and remove all ‘s?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Check if page parent has certain template
- Remove class that has been added by parent theme
- Setting up the child theme so as to enable right-to-left WordPress?
- 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?
- How do I know what variables are passed in a filter/action and what their meaning is?
- Why do filters/actions require an argument count?
- Overriding a theme redux file in child theme
- How to break down importing of feeds
- Adding ads code between comments
- Wrap First Character after in a tag
- 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?
- Run a filter when a walker runs
- comments_number display outside specified span
- Change the site tagline (or similar) based on current page
- Setting custom canonical urls
- Handling Body class based on Template
- Get_avatar filter?
- 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 can I remove a function that has been added to wordpress with add_filter?
- 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?
- Why does my callback function not work with this custom filter hook?
- 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
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Ajax load more button for comments wordpress
- Unique icons next to each WordPress menu item
- Limit 1 global comment per minute
- Create Page To Count Comments For Each Post In WordPress Site
- 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
- wp-comments-post.php file returns a blank page
- 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?
- Override a function defined in wp-includes/comment-template.php
- Apply function.php filter only if url not has /amp/
- update_user_meta as multiple value but with same meta key
- 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
- Delete post meta by serialized meta value
- How to bind each “the_content” elements to a custom variables
- Reload page with a different shortcode when a user selects from a dropdown
- WordPress Ajax filter: Create two loops for different output styles?
- Redirecting the lost password page request when using a custon login page
- Custom Bulk Actions handler not firing
- 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`?
- How do I routinely extract the thumbnail of the most recent post?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Check if values exists DB
- Search box background on a different page template
- 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 can I clear the theme mod settings?