Skip to content

Developer FAQ

Quick answers for developers and advanced customization.


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

1. Create folder: /wp-content/themes/buddyxpro-child/

2. Create style.css:

/*
Theme Name: BuddyxPro Child
Template: buddyxpro
Version: 1.0.0
*/

3. Create functions.php:

<?php
add_action( 'wp_enqueue_scripts', function() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
});

4. Activate at Appearance > Themes


  1. Find template in parent theme: /buddyxpro/template-parts/
  2. Copy to child theme with same path
  3. Edit child theme copy
  4. WordPress automatically uses child version
Template Purpose
header.php Site header
footer.php Site footer
single.php Single post
archive.php Blog archive
buddypress/*.php BuddyPress templates

Quick: Use Code Snippets plugin

Proper: Child theme functions.php

// Before main content
add_action( 'buddyx_before_content', 'my_function' );
// After main content
add_action( 'buddyx_after_content', 'my_function' );
// In header
add_action( 'buddyx_header', 'my_function', 15 );
// Before footer
add_action( 'buddyx_footer_before', 'my_function' );
// Add body class
add_filter( 'body_class', function( $classes ) {
$classes[] = 'my-custom-class';
return $classes;
});
// Change excerpt length
add_filter( 'excerpt_length', function() {
return 30;
});
// Disable dark mode
add_filter( 'buddyx_enable_dark_mode', '__return_false' );

See Hooks Reference for complete list.


Yes. Register your CPT normally - theme uses WordPress defaults.

For custom templates, create in child theme:

single-{post-type}.php
archive-{post-type}.php

Yes, fully:

  • All core blocks styled
  • Wide and full-width alignment
  • Theme color palette in editor
  • Editor styles match frontend

BuddyX Pro is a classic theme with Customizer. Full Site Editing themes use a different architecture.


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
);
});
  • Multiple jQuery versions
  • JS minification breaking code
  • Plugin load order issues

Debug: Check browser console (F12) for errors.



Got a question? We’re a friendly team - happy to help. Email support@wbcomdesigns.com