wp-includes/functions.php
is never a file you should modify. Any mention of adding something to functions.php
is never referring to this file.
Functions related to front-end display or theme behavior should go in your theme’s functions.php
. If the theme may potentially be updated, then you should be using a Child Theme to add functionality, and they should go in your child theme’s functions.php
. Child themes are update-safe – a core update will not overwrite a child theme.
For any code that should persist regardless of active theme, those functions should go in your own plugin. Your own plugins are update-safe.
Regardless of what option you choose, you should always have a local recent backup in case you need to restore things.
Related Posts:
- How do I get the current edit page ID in the admin?
- Does hooking into the same action multiple times drain memory?
- Apply custom role capabilities to administrator (without plugin)
- Different wp_mail_from and wp_mail_from_name for specific situations
- register_post_type for Pages?
- Linking thumbnail to full size image
- is_front_page not working in functions.php
- VERY new to coding – keep breaking site trying to add to functions.php
- Restrict user registration to emails on a single domain
- Call to undefined add_action() in theme’s functions.php
- How to enqueue JavaScript for specific WordPress pages only?
- Passing HTML in WordPress Shortcode arguments
- Can I use require() function in a template file?
- What is the most efficient method for loading widgets in functions.php
- Enqueue script o style only if a template part is loaded
- Exclude Empty Child Categories in Menu
- Can I pass two roles to the function get_users?
- Convert User ID’s to User Names in a single.php file
- Custom roles can’t access to wp-admin
- How to specify which Gutenberg blocks are available in the editor for a page template
- password protected post policy
- Custom Shortcode, functions PHP WP_Query loop
- How to filter out shortcode when displaying the_excerpt() in the loop?
- wpautop – disable tags, keep tags
- Logout hyperlink within a sub-menu
- How do I pass arguments for multiple functions hooked to a single action?
- Manipulate Permalink
- Change the HTML of the comment form that is generating somewhere from the core WordPress
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Theme functions.php file auto delete everyday [closed]
- How to get the index number of the posts?
- Removing wp_login_viewport_meta
- Two Types of settings in WP – The Doubt
- Custom Attachment Caption Fields
- Generating dynamic css into custom file [closed]
- How to call particular funcion when the check box is checked in plugin options page
- Call WordPress function outside of WordPress
- Events: Check for other event with same start date and category [closed]
- Remove adjacent_posts_rel_link under 3.2?
- enqueue_script with filemtime javascript not working
- WP function won’t work on 404 template page
- How to obtain the recent posts without their content in an efficient way?
- Function coding error concatenating quotes I think
- Need print logo without any ID & class
- Can we create our own theme’s function.php?
- Not all CSS elements transferring via parent to child?
- Limit dimensions of “Full” size images
- Unable to return values from function
- Function not working inside of a function in functions.php
- Show some menu sub items as dropdown under a menu item
- Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- How to remove some item from WordPress Dashboard for user Author
- processing form data with ajax
- Check from functions.php if function exists in footer.php
- Disabling Author Page only for subscribers
- Showing user profile data on front-end
- How to register a menu based on a ACF condition
- How to convert raw url to hyperlink?
- Split single-review.php to two parts
- Breaking up multiple words and inserting an image after first word
- get content from page through AJAX
- colorbox not loading in
- The work of WordPress Function update_post
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- how can I change all wordpress media file url to custom cdn url?
- Changing the HTML of notices in WooCommerce [closed]
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- How Can I Create a Friendly Slug for a Dynamic Page?
- Modify content inside post before first publish
- Pass an argument into a function to extract from array
- function class doesnt work
- how to remove a tag in the_category function
- Load CSS file conditionally
- my wordpress doesn’t save items to customized widget area
- Remove all video attachment, both files and post/postmeta from database?
- Copying a widget class to functions.php results on a blank page
- save_post doesn’t correctly process function call with php class
- No compression occurs on my jpegs after adding jpeg_quality hook to my functions.php file
- Changing the register url is not working
- Newest comments first not working
- Pass arguments to function class with do_action()
- How to a override parent theme page that has been included with require_once?
- Display most popular posts
- Can I use a function to return HTML and the result of another function?
- Dynamically generated Navigation Diagram using Custom Fields
- Excerpt length: get 2 paragraphs
- Remove heading tags on line break
- Full size image option removing problem
- Add custom fields after post/page title
- Ajax call does not work for this custom code
- Force resize for all video content
- Sort results by name & asc order on homepage
- Add the title of a widget as an ID – for anchor links
- I want to add the alt attribute to all the photos!
- Creating mixture of shortcodes to use in the visual/text editor
- Correct php syntax to add an image in wp functions.php
- Is storing in a variable the result of a fonction a most powerful way to code an if structures in WordPress?
- woocommerce_sort_product_tabs() expects an array