The best place for you is probably going to be in your Theme’s functions.php file. Navigate to /wp-content/themes/your-theme-name/functions.php. Paste it above/below any of the other code there, making sure to stay between any < ?php or ?> tags.
Related Posts:
- Return $post_id when DOING_AUTOSAVE?
- Including Angle Brackets In Pre Sections
- Anchor Text code string is automatically modified by WordPress
- WordPress is converting & to & inbetween [code] brackets
- Notice: Undefined property: wpdb::$current_post What can be wrong?
- Where to save common libraries?
- source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php
- Sublime Video: Playlist which gets all attached videos
- Code Friendly Block Quotes
- Remove line breaks from ?
- How to fix a “globals” issue to avoid a rejected theme?
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- I want to remove the home page header image from all other pages
- Proper implementation/use of code/syntax highlighting
- How to remove all comments from JS, HTML, CSS files?
- What data validation we must use in different contexts?
- Need To Post Unformated Code
- Sidebar login: How do I get the username to show after “Welcome”?
- How to manage multiple wordpress project with shared code base
- Block IP Addresses using Code [closed]
- Find Total Authors
- Why does HTML entities are still encoded in Code Block?
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]
- how to display google maps with javascript
- How to pass https://achecker.ca/ validator? [closed]
- How to write custom code on WordPress?
- Remove Metaboxes
- Google analytics won’t work in wordpress
- How do I reset my footer.php to its original state? (theme: Origami)
- Commenting out in HTML editor breaks template
- wordpress prepare error
- Adding code to send referrer on login page
- Table styles disappear when updating content
- Manage recurring event time
- wp_editor save all content
- Need an elegant solution to declare the value of two variables based on the count of the post
- How to insert integration code for CRM?
- A good way to include snippets of code in both posts, pages and Event Manager Template files?
- Anchor Text code string is automatically modified by WordPress
- Return $post_id when DOING_AUTOSAVE?
- Changes in code only show after changing theme
- Code Highlighting in BlockQuote
- feed url problem
- Where do I go to add a tag before the closing body tag?
- WordPress Internal @ Mentions
- What is this code in my theme’s functions.php? if (isset($_REQUEST[‘action’]) && isset($_REQUEST[‘password’])
- Copyright info change in Theme Child PHP
- Add footer.php to WordPress child theme
- How to link to a alternative page in CSS
- Which theme foundry has clean coded themes, where code is poetry [closed]
- Admin Notices coding standard issue
- Don’t understand why theming is so strange and twisted [closed]
- WordPress redirect all 404 pages to the Homepage
- WP-Markdown treating java generics like HTML tags
- The custom logo, site title, and description doesn’t appear at the same time
- My scripts-bundle.js file is getting sent to the browser as a stylesheet css file. Help!
- How to avoid loading wp-load.php from external php scripts?
- get_page_template returning nothing
- stats_get_csv (WordPress Stats) to only display top posts (not pages)
- Adding custom styles to dropdown in editor
- How to get the POST TITLE using the POST ID?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Why does this snippet in a blog post make WordPress crash?
- Adding custom field in all widgets, but at the top of the form, in admin area
- Is there a way to create embed codes from wordpress/buddypress content?
- Why namespaces are rarely used in WordPress plugins?
- Insert custom PHP head above in WP pages
- Code is providing a row of data but not formatting it as table
- How to do a code in php and have text before it? [closed]
- How can i share codes on my blog?
- Disable File Editing function
- Where do you add code in custom fuctions so it works on a specific page?
- Numbering lines of code with the tag?
- advanced custom fields and contact form 7
- WordPress code problem [closed]
- Automate configuration after new/hosted installation
- How do I get access to the CSS Editor
- random reason on refresh
- Insert PHP code in Text
- Looking for a good way to include php code in posts, but using special include markup rather than direct php code
- what code to add to search.php
- Copying and pasting to WordPress “code editor” code via the front end and clipboard
- CSS properties in textarea in the Customizer
- Problem with MEMCACHE and Redis with wp_options
- out of nowhere
- How To Export User’s Custom Fields in CSV or XLSX
- Client on iPad accidentally adding tag to posts while writing
- admin-ajax.php 400 bad request – whats wrong with my code?
- Some code is added automatically to my site’s header – what is it?
- How do you find the logo code on theme file or where can I find the header theme file?
- It possible to implement an adhoc php web application with wordpress?
- WordPress editor, change code wrap (bbpress?)
- Show page title just from the first child-page in template
- Where to put include php file?
- Code snippet plugin not working correctly with Windows live writer and WordPress
- Can you not edit the HTML and PHP of your WordPress without paying?
- Attachement title in wpallimport
- I want create woocommerec match products columns
- Developing an IP lookup function using an API