Developer FAQ
Quick answers for developers and advanced customization.
Child Theme
Section titled “Child Theme”When should I use a child theme?
Section titled “When should I use a child theme?”Use child theme for:
- Custom PHP functions
- Template overrides
- Extensive CSS changes
- Custom page templates
Don’t need child theme for:
- Customizer settings (saved in database)
- Additional CSS panel
- Basic usage
How do I create a child theme?
Section titled “How do I create a child theme?”1. Create folder: /wp-content/themes/buddyxpro-child/
2. Create style.css:
/*Theme Name: BuddyxPro ChildTemplate: buddyxproVersion: 1.0.0*/3. Create functions.php:
<?phpadd_action( 'wp_enqueue_scripts', function() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );});4. Activate at Appearance > Themes
Template Overrides
Section titled “Template Overrides”How do I override a template?
Section titled “How do I override a template?”- Find template in parent theme:
/buddyxpro/template-parts/ - Copy to child theme with same path
- Edit child theme copy
- WordPress automatically uses child version
Common templates to override
Section titled “Common templates to override”| Template | Purpose |
|---|---|
header.php |
Site header |
footer.php |
Site footer |
single.php |
Single post |
archive.php |
Blog archive |
buddypress/*.php |
BuddyPress templates |
Hooks & Filters
Section titled “Hooks & Filters”Where can I add custom code?
Section titled “Where can I add custom code?”Quick: Use Code Snippets plugin
Proper: Child theme functions.php
Common hooks
Section titled “Common hooks”// Before main contentadd_action( 'buddyx_before_content', 'my_function' );
// After main contentadd_action( 'buddyx_after_content', 'my_function' );
// In headeradd_action( 'buddyx_header', 'my_function', 15 );
// Before footeradd_action( 'buddyx_footer_before', 'my_function' );Common filters
Section titled “Common filters”// Add body classadd_filter( 'body_class', function( $classes ) { $classes[] = 'my-custom-class'; return $classes;});
// Change excerpt lengthadd_filter( 'excerpt_length', function() { return 30;});
// Disable dark modeadd_filter( 'buddyx_enable_dark_mode', '__return_false' );See Hooks Reference for complete list.
Custom Post Types
Section titled “Custom Post Types”Does BuddyX Pro style custom post types?
Section titled “Does BuddyX Pro style custom post types?”Yes. Register your CPT normally - theme uses WordPress defaults.
For custom templates, create in child theme:
single-{post-type}.phparchive-{post-type}.phpGutenberg / Block Editor
Section titled “Gutenberg / Block Editor”Does it support Gutenberg?
Section titled “Does it support Gutenberg?”Yes, fully:
- All core blocks styled
- Wide and full-width alignment
- Theme color palette in editor
- Editor styles match frontend
Does it support Full Site Editing?
Section titled “Does it support Full Site Editing?”BuddyX Pro is a classic theme with Customizer. Full Site Editing themes use a different architecture.
JavaScript
Section titled “JavaScript”How do I add custom JavaScript?
Section titled “How do I add custom JavaScript?”Child theme method:
add_action( 'wp_enqueue_scripts', function() { wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0', true );});Common JavaScript conflicts
Section titled “Common JavaScript conflicts”- Multiple jQuery versions
- JS minification breaking code
- Plugin load order issues
Debug: Check browser console (F12) for errors.
Related
Section titled “Related”Got a question? We’re a friendly team - happy to help. Email support@wbcomdesigns.com

