A child theme may have declared these functions already with a slightly different inner logic. The functions.php
from the child theme is loaded before the file from the parent theme. Without this check you would get the Cannot redeclare … error.
Plugins can create functions too, so this problem is not restricted to the themes that are written with child themes in mind.
Related Posts:
- Why max-width:97.5% on content images?
- why does twenty eleven theme mix up the css measurement units?
- How to determine which custom header image is being shown
- How to Edit the style of header title of Twenty Eleven Theme?
- How to remove header image in Twenty Eleven theme?
- How to properly create a child theme
- do_shortcode() in twentyeleven theme
- Extending Twenty Eleven Theme
- How to reverse engineer the Twenty Eleven background image uploader?
- What is the difference between Twenty eleven & roots framework?
- .current_page_ancestor broken in Twenty Eleven
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- Bestway To Define Theme and Plugin path and url
- enqueue script for specific shortcode
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- WordPress twentytwenty theme inline css overriding css body
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- How to force Media manager to overwrite files of same name?
- What is a good way to pass a variable from add_action to a Theme?
- Why does my short code get executed before other content?
- Featured Image in 4.4 should be larger on mobile device
- Enabling Widgets By Default in Custom Theme Development
- What are WooCommerce starter themes? [closed]
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Modifying JS files in Child-theme
- How can you determine whether an image is merely attached or has actually been inserted into a post?
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- Where is the correct place(s) in twentysixteen’s header.php to add a Google webfont?
- Flexible WordPress theme creation using themes
- How to support Lazy Loading Assets in a WordPress Theme?
- How can one update a theme on a live site without interruption?
- Wysiwyg editor for P2 theme
- Toggle Sidebar Display
- How to move the the_excerpt’s read more link to another div
- How to create a custom template to admin dashboard
- Change The Meta-Description Of Home-Page?
- Limit Loop to 5 Posts?
- Add, edit specific CPT with custom role
- how to display search term in the template full site editor
- Table of Contents Before first heading
- How to add new page to wordpress theme through coding?
- comment form args are not translatable (customized comment form)
- Zoom on custom theme without child
- Dynamically generated wordpress customizer options?
- Changing a slider to a grid [closed]
- What do with the index.php … [duplicate]
- Code to determine WP version check
- “Theme without sidebar.php is deprecated”
- Is it acceptable for a WordPress theme to not accept widgets?
- get_term_link is Ending to single.php
- wp e-commerce – theme problem – why won’t it load wpsc-single_product.php? [closed]
- my excerpts lack the ‘more’ link
- Simple child theme modification but links are broken
- how to retrieve the image title for image Post Format
- Iris color picker in custom theme option page not saving value
- Is functions.php in themes applied to all templates?
- Want to add cart and a search bar in the right of logo line
- how do i develop a global nav and local nav to be wordpress dynamic?
- Why Tags don’t appear in my page?
- First post full width without Sidebar
- How to make a theme unable to be used on a multisite network?
- Default PHP document / names needed for a WordPress theme?
- How to modify theme content in Thematic?
- How to determine when my theme is deactivated?
- 1 post per category on homepage and counting those posts
- if (has_custom_menu())?
- Exclude parent categories from the_category() within the loop
- Ensure SQL changes carry over
- only the first post is shown
- wordpress can’t find single-project page
- How can I set multi archive page template on same time for only one custom post type?
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- How to show some of category in wordpress
- using themename_the_custom_logo() in template-tags?
- How to make the media library searchable by image title
- WordPress doesn’t load css, image and js files after moving local installation folder
- Custom page template not showing on page creation
- How to get url image page the right way?
- Mobile view logo background colour in wordpress
- Undefined index: custom_sidebars
- How To Customise WordPress Comment Submit Button?
- Next/Previous post navigation
- page.php is not called when I load a Page
- Single Featured Image Repeating
- Main Menu Theme Different Output Print
- How do I move menu to the bottom in Custom Community theme?
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- IS there any reason not to include javascript in my own post’s embeds?
- How to create more templates to the same theme?
- A problem in loading index.php
- .submenu class missing in output from wp_nav_menu
- Bootstrap 4 mobile menu not working for WordPress Development
- Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles
- Cart button not working on mobile version [closed]