Welcome to WPSE and developing for WordPress!
Many times functionality is placed in custom plugins, so that if you change your theme, the functionality remains. However, if you already have everything built in a custom theme, you may wish to include the code in that theme so that everything is in the same place. If that’s the case, typically filters and actions are added to your theme’s functions.php
file.
Either way, make sure you add code to a custom place – not an out-of-the-box theme or plugin or especially Core itself – because whenever you update those files, it’ll overwrite your changes. This is not the case with plugins or themes you write yourself since there’s nothing on wordpress.org to tell them to “update” anything.
Related Posts:
- Create a custom plugin with dynamic child pages listing database records
- Dynamic URL to reference custom PHP files
- How to use $_GET function WordPress backend
- Extend PHP regex to cover “srcset” and “style” attributes
- Redirect to another page using contact form 7? [closed]
- Allow two posts (from different categories) to have the same slug
- Get nice name of category from slug (remove dashes of category)
- Rewrite rule not working, but only when parameter is text
- How does one make a URL return dynamic JSON with custom Content Type?
- wp_loaded hook block script enquequing
- WP nonce invalid
- woocommerce subscriptions – get expiration date [closed]
- Same log message keeps on printing to debug.log file thousand of times
- WordPress custom slug (endpoint) and compare all links
- Adding Default Settings to Theme My Login plugin
- Global variable $post returning incorrect object
- Custom filter in admin edit custom post type responding with invalid post type?
- WordPress Scheduled Event Request Blocking
- How can i upload images in an admin page?
- Append HTML Using Shortcode
- Delete a WordPress transient from a shortcode on Page/Post update
- How do you use WP slugs for PDF files / media?
- Plugin CSS not enqueing
- Create onClick Event to Re-load a Widget
- Swapping wp_dropdown_categories function with wp_category_checklist
- Accessing the database from a plugin outside of action hooks
- Adding subdomain to home_url for “add_menu_page”
- How to show phpinfo() only in a new tab?
- How to find error in my code when the error message is pointing to WP core file?
- How to select the contents in the text view textrea in wp_editor?
- How to access global variable $menu inside a class function
- WordPress plugin for nicer looking slugs? Have multiple pages named the same but they get different slugs
- Hide categories that are not used in the post type
- What is an equivalent of single_cat_title for getting the slug of the category?
- Automated Cart Update With Alert Box Each Time
- How can I remove a function that has been added to wordpress with add_filter?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- What query string parameter is available for index.php, that works for both pages and blog articles?
- How to sanitize any integer input field in wordpress?
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- WordPress ajax doesn’t display object method on jQuery .change() function
- Custom user login page by creating a plugin
- php script to change slug in post automatically
- Singelton class does not work, multiple initialization on page reload
- Saving an array of dynamic repeater data as post_meta
- what is the best practice to add new field to an api route
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- WordPress wpform plugin submit and get multiple checked value from checkbox [closed]
- How to upload a file to a folder named after the user_id via plugin
- Reprinting tags with all attributes
- Dynamic content based on a URL parameter
- Use custom post type for a store locator
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- Improve page speed loading using CDN and async or defer attribute
- Colon is Missing In My Website Url in WordPress
- How do I programmatically set a user as spam in BuddyPress? [closed]
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Whitelisting items from custom options page
- Add_menu_page not displaying the menu in class based plugin
- How to call plugin function per site in a multisite?
- Update results, Before deleting the related category [closed]
- How to make my custom widget appear within WordPress widgets? Plugin development
- Script to browser problem PHP
- adjust section according to country?
- How to auto fetch customer details in Woocommerce in checkout page
- Can’t upload image using media_sideload_image
- Store a default value for a transient on plugin activation
- Adding widgets to my plugin page instead of WordPress dashboard
- WP CRON duplicate wp_insert_post with has < and > tag
- How wp-cron can run in background if PHP is single threaded?
- How to insert data into database using wp cron job
- How to send Ajax request from my plugin in admin dashboard?
- I want to add custom add to cart link [closed]
- Options API get_option() and update_option() Not Correctly Updating or Returning
- Execute long and heavy processes
- wp_head function not outputting
- wp query foreach deleting record returning only first or last item
- Adding function to Genesis genesis_header [closed]
- AJAX success response is not working but it’s saving my changes
- My php header() function is not working [closed]
- Access Child Class of Plugin Main Class Instance
- PHP > Scheduled Tasks > Sending daily email with dynamic API variables
- Scrape external webpage for first image and add it to new post
- How to make own crop image function for WordPress plugin
- Create custom permalinks to show Custom Post Type’s relationship?
- WordPress Custom field Colors
- Search Query: how to construct a search string from two select elements?
- Best practice for show data to one specific user?
- Get URL Parameters from referer
- Need help enqueueing webfonts
- How can I hide that I Use WordPress (with W3 Total Cache)
- how to update and display an option without reloading the page
- Font Awesome changing default WordPress Font
- Saving plugin settings – ERROR: options page not found
- Custom plugin settings link doesn’t append current class to menu item when visited? Why?
- class_exists returns different values [closed]
- “Undefined index” error when saving empty array with checkboxes
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]