Summary of Hooks in the Kadence WordPress Theme

Blog- WpScriptly

Kadence WordPress theme offers a variety of hooks to customize its functionality and layout. These hooks are organized into different sections including general hooks, header, footer, content, sidebar, post/page, archive, WooCommerce, miscellaneous, and post widget hooks. Each hook allows developers to insert custom content or modify existing elements at specific points throughout the theme. This flexibility enables extensive customization and enhancement of the theme’s features.

Summary of Hooks in the Kadence WordPress Theme

General Hooks

  • kadence_before_wrapper
  • kadence_after_wrapper

Header Hooks

  • kadence_before_header
  • kadence_header
  • kadence_after_header
  • kadence_header_bottom
  • kadence_before_site_branding
  • kadence_after_site_branding
  • kadence_header_container_before
  • kadence_header_container_after
  • kadence_before_footer
  • kadence_footer
  • kadence_after_footer
  • kadence_footer_bottom

Content Hooks

  • kadence_before_content
  • kadence_after_content
  • kadence_before_content_container
  • kadence_after_content_container
  • kadence_before_sidebar
  • kadence_after_sidebar
  • kadence_sidebar

Post/Page Hooks

  • kadence_before_post
  • kadence_after_post
  • kadence_before_post_title
  • kadence_after_post_title
  • kadence_post_header
  • kadence_post_footer
  • kadence_before_page
  • kadence_after_page

WooCommerce Hooks

  • kadence_before_shop
  • kadence_after_shop
  • kadence_before_product
  • kadence_after_product
  • kadence_before_product_title
  • kadence_after_product_title
  • kadence_before_product_image
  • kadence_after_product_image
  • kadence_before_product_summary
  • kadence_after_product_summary
  • kadence_before_shop_loop
  • kadence_after_shop_loop

Miscellaneous Hooks

  • kadence_before_comments
  • kadence_after_comments
  • kadence_before_comment
  • kadence_after_comment
  • kadence_before_comment_form
  • kadence_after_comment_form

Archive Hooks

  • kadence_before_archive
    • Fires before the archive content begins.
    • Useful for adding custom content or elements before the main archive loop starts.
  • kadence_after_archive
    • Fires after the archive content ends.
    • Useful for adding custom content or elements after the main archive loop ends.
  • kadence_before_archive_header
    • Fires before the archive header.
    • Can be used to add content or elements before the archive title and description.
  • kadence_after_archive_header
    • Fires after the archive header.
    • Can be used to add content or elements after the archive title and description.
  • kadence_before_archive_loop
    • Fires before the archive loop starts.
    • Useful for adding content or elements right before the loop begins.
  • kadence_after_archive_loop
    • Fires after the archive loop ends.
    • Useful for adding content or elements right after the loop ends.
  • kadence_archive_loop_item_before
    • Fires before each item in the archive loop.
    • Useful for adding custom content before each archive item.
  • kadence_archive_loop_item_after
    • Fires after each item in the archive loop.
    • Useful for adding custom content after each archive item.

Post Widget Hooks

  • kadence_post_widget_before
    • Fires before the post widget content starts.
    • Useful for adding custom elements or content before the widget content begins.
  • kadence_post_widget_after
    • Fires after the post widget content ends.
    • Useful for adding custom elements or content after the widget content ends.
  • kadence_post_widget_title_before
    • Fires before the title of the post widget.
    • Can be used to add custom elements or content before the widget title.
  • kadence_post_widget_title_after
    • Fires after the title of the post widget.
    • Can be used to add custom elements or content after the widget title.
  • kadence_post_widget_content_before
    • Fires before the main content of the post widget.
    • Useful for adding custom elements or content before the main widget content.
  • kadence_post_widget_content_after
    • Fires after the main content of the post widget.
    • Useful for adding custom elements or content after the main widget content.
  • kadence_post_widget_excerpt_before
    • Fires before the excerpt in the post widget.
    • Can be used to add custom elements or content before the excerpt.
  • kadence_post_widget_excerpt_after
    • Fires after the excerpt in the post widget.
    • Can be used to add custom elements or content after the excerpt.
  • kadence_post_widget_meta_before
    • Fires before the meta information in the post widget.
    • Useful for adding custom elements or content before the meta information.
  • kadence_post_widget_meta_after
    • Fires after the meta information in the post widget.
    • Useful for adding custom elements or content after the meta information.
  • kadence_post_widget_image_before
    • Fires before the image in the post widget.
    • Can be used to add custom elements or content before the image.
  • kadence_post_widget_image_after
    • Fires after the image in the post widget.
    • Can be used to add custom elements or content after the image.

Here are some common hooks for the Kadence Post Grid/Carousel Widget:

Filters

  1. kadence_post_grid_carousel_query_args:
    • Description: Allows modification of the query arguments for the post grid/carousel.
    • Parameters:
      • $args (array): The query arguments.
      • $attributes (array): The block attributes.
  2. kadence_post_grid_carousel_post_classes:
    • Description: Allows adding custom classes to the post grid/carousel items.
    • Parameters:
      • $classes (array): The existing classes.
      • $post (WP_Post): The current post object.
      • $attributes (array): The block attributes.
  3. kadence_post_grid_carousel_container_classes:
    • Description: Allows adding custom classes to the container of the post grid/carousel.
    • Parameters:
      • $classes (array): The existing classes.
      • $attributes (array): The block attributes.
  4. kadence_post_grid_carousel_image_attributes:
    • Description: Allows modification of the image attributes in the post grid/carousel.
    • Parameters:
      • $attributes (array): The image attributes.
      • $post (WP_Post): The current post object.
      • $attributes (array): The block attributes.

Actions

  1. kadence_post_grid_carousel_before_loop:
    • Description: Fires before the post grid/carousel loop starts.
    • Parameters:
      • $attributes (array): The block attributes.
  2. kadence_post_grid_carousel_after_loop:
    • Description: Fires after the post grid/carousel loop ends.
    • Parameters:
      • $attributes (array): The block attributes.
  3. kadence_post_grid_carousel_before_post:
    • Description: Fires before each post in the post grid/carousel.
    • Parameters:
      • $post (WP_Post): The current post object.
      • $attributes (array): The block attributes.
  4. kadence_post_grid_carousel_after_post:
    • Description: Fires after each post in the post grid/carousel.
    • Parameters:
      • $post (WP_Post): The current post object.
      • $attributes (array): The block attributes.

These hooks allow you to customize various aspects of the Kadence Post Grid/Carousel Widget. For more specific hooks and detailed usage, you might want to check the Kadence Blocks documentation or source code, as the available hooks can vary between versions.


I use fluent snippet plugin for all my functions, js, and CSS:

Example:

I want to move the entry_meta data( author name, date, category, and comments) below the excerpt on the archive page. Here is the code that you will need to apply to the functions.php or use FluentSnippet plugin.

Code:
add_action('kadence_loop_entry', function(){
  remove_action( 'kadence_loop_entry_header', 'Kadence\loop_entry_meta', 30 );
  add_action( 'kadence_loop_entry_content', 'Kadence\loop_entry_meta', 21 );
});
Example

Notes:

Wp Scriptly

This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.

Wp Scriptly

Newsletter signup

WpScriptly

Subscribe to my WpScriptly newsletter for WordPress tips, plugin tutorials, and exclusive updates—delivered straight to your inbox!

2 Comments