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
- 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
- How to change the wp-login.php page title?
- adding a filter to a shortcode?
- Hide custom image sizes from media library
- Set media upload attachment link to none and hide it in WP v3.5
- How to set custom cookies before output
- Permanently remove first image from posts
- Change the footer text on the login page
- How to return the_excerpt (without echo)?
- How can I hook into and edit the text of a wp_nav_menu tag?
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- add_filter to post-gallery and remove all ‘s?
- Rename image uploads with width in filename
- How to make an meta_query optional?
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Check if page parent has certain template
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Change comments form title on a page by page basis
- Filter the blog title displayed in the header
- Limit the Excerpt field in WP-Admin in words
- Filter portforlio with librairie isotop
- Cannot figure out how to add a read more link to a manual excerpt. Please help
- WordPress Ajax filter: Create two loops for different output styles?
- add_filter() inside another add_filter()
- How to filter specific element of an array in wordpress/php?
- How to disable sub menu items from being created?
- Trying to modify content.php
- Redirecting the lost password page request when using a custon login page
- 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?
- Custom Bulk Actions handler not firing
- How to generate customized filtered output for the gallery
- dynamically change content of div with php
- Add class to all meta boxes for a custom post type
- Add a leading zero to pagination
- How to remove title tag with this filter
- How to trim content AND retain HTML?
- str_replace not preserving whitespace
- Add point on excerpt post
- 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
- Archive page if else not working for post_excerpt and post_content
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Select All not working in a WordPress search filter
- Custom field in title
- WordPress – show all posts + ones with specific tag
- Search box background on a different page template
- Creating a function that sanitizes the custom metabox excerpt
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- WXR XML import is stripping php tags that I need to keep
- How can I add more code to this?
- How to add custom checkout field in user details mail template
- Merging two excerpt functions to work with conditions
- Keeping the previous get value and add another value when submitted
- I can’t seem to get excerpts showing inside get_pages and don’t know why?
- AJAX: WordPress filters inside $html do not work as intended
- Why not showing all post by default in my jquery filter
- For each loop will not append to the_content hook
- Excerpt all post content Content Same Size without word cutting off
- Assign new post author IF another user in custom field on post transition
- Blog Posts not sorted and pagination not adjusted after filtering some category
- Modify meta data before saving to database
- Remove post image caption from post_excerpt();
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to change wp-admin and wp-login urls
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- generate excerpt from the part of big text dump that contains keyword
- Custom Filtering date with newsletter
- 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
- Strip and print only the numbers found in current’s post excerpt (even if they are without space)
- how to append ACF field data using one of the following filter/ hooks
- Changing upload directory temporarily
- Add an attribute on WP images attachment link
- Show post in elementor based on views and specific category with query id feature in elementor
- Display featured posts first, then display all others within a specific category in WordPress
- Edit password change email text or disable it
- Adding Author Filter to CPTs
- How can I display formatted content using the_content filter?
- I have issue with decoding json ex. ‘{“a”:”b”}’
- Using send_password_email filter after wp_update_user
- Prevent publishing of uncategorized posts
- WordPress query_posts with multiple tax_query
- Ajax Filters with Multiple tax_query args
- How do I ensure that the URL parameters are updated correctly when multiple filters are applied
- Filtered queries not responeding to page path