Just put the code inside functions.php that lives in your theme folder:
wp-content/themes/[your-active-theme-name]/functions.php
Related Posts:
- Allow HTML in excerpt
- How to make a image-size selected by default in Media upload – WP v3.5
- Remove “Insert from URL” link in Media upload – WP 3.5
- How to change the wp-login.php page title?
- adding a filter to a shortcode?
- Hide custom image sizes from media library
- Permanently remove first image from posts
- Change the footer text on the login page
- add_filter to post-gallery and remove all ‘s?
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Filter the blog title displayed in the header
- Limit the Excerpt field in WP-Admin in words
- Display only text to WordPress loop without loosing the text formatting
- append PHP function to the_content
- body_class filter – Is there a better way to write this code?
- How to add Shortcode (font awesome) in widget title?
- How To Change The Html of Products filtration sidebar in Woocommerce?
- How to change / delete product short description in Woocommerce
- Wrap First Character after in a tag
- Get posts with at least one category in common with current post?
- WooCommerce: Add Payment Gateway Field to Webhooks [closed]
- Custom excerpt function re-factoring
- How to call function at the bottom of post using plugin?
- Change the site tagline (or similar) based on current page
- Get_avatar filter?
- Custom filter in admin edit custom post type responding with invalid post type?
- Is it acceptable to treat a filter like an action?
- How to put “Read more” link in Custom Excerpt inside p tag?
- Edit incorrect password message WordPress
- Error when adding excerpt to the content through functions.php
- Add data attribute to each li in menu
- Ajax category filtering products default show all
- Add a specific part of current category page url to shortcode
- Why does my callback function not work with this custom filter hook?
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- Print last modified date only on posts
- How to add an arrow to menu items has submenus
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Unique icons next to each WordPress menu item
- HTML tags not showing in excerpt
- Change tinyMCE editor to allow marked content when pasting from Word
- How to debug this search & replace strings snippet?
- Hide Featured Image Meta Box on Editor Screen
- Add item to top of menu using a filter in functions.php
- How to make modifications only to certain elements of an HTML string on the server-side?
- stripping tags from excerpt in WordPress is not working
- Add meta tags to a custom header
- Ajax filter button display all posts
- How to append to an array and return the results in a filter?
- Custom query vars filters problem with pagination
- Filter by field with array value in ACF on WP REST API
- wrap a span tag around author’s post count
- Remove   from the_excerpt
- Shortcodes showing in excerpt despite using strip_shortcodes
- How to remove the space before the ellipsis in excerpt?
- Must filter functions receive all arguments passed to them?
- Problem in replacing the_content with the_excerpt()
- Filter wordpress posts without searching the keywords in the post content
- Variation prices breakdown only for single product page
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- Remove Author Links
- Apply function.php filter only if url not has /amp/
- Remove span tags from WooCommerce Downloads page
- How to edit post meta data before publishing the post it self wordpress?
- Multiple Tag Filtering
- Find and print first entry from WordPress post in custom excerpt?
- Should I set a page as “No-index” if I include it’s content within the front-Page.php via this method?
- How to change href of a Widget menu item link?
- Reload page with a different shortcode when a user selects from a dropdown
- WordPress Ajax filter: Create two loops for different output styles?
- How to disable sub menu items from being created?
- How to display custom seo title before the loop?
- How can i style “echo apply_filters”
- Adding body class to html tag that already has language attrubutes?
- How to remove title tag with this filter
- Custom theme: adding unwanted tags in the content
- Apply filters when loading post via ajax
- Add custom filter to register data in array
- Get terms of the posts with one query
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Search box background on a different page template
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- How can I add more code to this?
- Merging two excerpt functions to work with conditions
- For each loop will not append to the_content hook
- Excerpt all post content Content Same Size without word cutting off
- Modify meta data before saving to database
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to pass value to add_filter wpcf7_form_tag from another function?
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- How rename wp-content and wp-admin folders correctly
- Unable to logout correctly after wp-login file was modified
- I have issue with decoding json ex. ‘{“a”:”b”}’
- WordPress query_posts with multiple tax_query
- Filtering with Attributes – how to display all non-queried products below query