Content Types, Forms, And AJAX
This theme has several runtime content surfaces beyond normal pages.
FAQs:
- Runtime module: wp-content/themes/balinot/modules/21-faqs.php
- Post type: balinot_faq
- Purpose: store reusable FAQ items that can be matched to pages or product categories.
- Public rendering usually flows through templates/partials/general/faqs.php and then into templates/components/faqs-*.php.
Reviews:
- Runtime module: wp-content/themes/balinot/modules/22-reviews.php
- Post type: balinot_review
- Purpose: store reusable review items that can be matched to pages or product categories.
- Public rendering usually flows through templates/partials/general/reviews.php and then into templates/components/reviews-*.php.
Forms inbox:
- Runtime module: wp-content/themes/balinot/modules/20-forms.php
- Post type: balinot_inbox_msg
- Purpose: optionally store Contact Form 7 submissions in the WordPress admin.
Form behavior to know:
- Contact form CSS and JS are loaded only when needed.
- The forms module checks the contacto page slug, page content shortcodes, and the ACF field shortcode_cf7.
- Stored fields are sanitized and filtered before creating the inbox record.
Popups:
- Runtime module: wp-content/themes/balinot/modules/23-popups.php
- Purpose: popup runtime behavior controlled by the theme module layer.
AJAX endpoints already in the project:
- balinot_add_to_cart
- balinot_product_search
- balinot_search_result_click
- gpc_update_mini_cart_item
- gpc_add_variable_to_cart
- gp_toggle_favorite
Admin post actions already in use:
- balinot_save_theme_options
- balinot_export_panel_config
- balinot_import_panel_config
- balinot_apply_theme_preset
- balinot_apply_performance_fix
- balinot_duplicate_post
- balinot_save_content_order
- email_setup_test
Where to look when something breaks:
- Search and add-to-cart endpoints often start in functions.php or the Woo module.
- Contact form storage starts in modules/20-forms.php.
- FAQ and review public matching starts in modules/21-faqs.php and modules/22-reviews.php.
Good maintenance rules:
- Keep public section routing in templates/partials/general/.
- Keep low-level markup in templates/components/.
- Keep new AJAX endpoints close to the module that owns the feature.
- If a feature needs settings, also wire its flags into balinot_theme_settings instead of using scattered options.
Last updated on