Home » Documentation » Hooks

ACFW comes with a variety of hooks to extend and modify the plugin. If you have any problems, head over to the support forum and drop us a line!




Sets up ACFW to work while included in a theme. Use with the acfw_dir filter. Example:
add_filter('acfw_include', '__return_true');


Set the include directory for the plugin. Required to rewrite URLs necessary for the plugin to work while included in a theme. Example:


This filter will hide all ACFW added fields, menu items, and pages from the admin area. Useful for client sites. Expects a boolean to be returned. Example:
add_filter('acfw_lite', '__return_true' );


This filter is used to add widgets in code on the fly. Useful when including ACFW in a pre packaged theme. Expects a multidimensional array. Example:

show_acfw_titles since 1.4

Show the “Title” Field for widgets created with ACFW by default. The title will be output before your template file’s contents. Example:
add_filter( 'show_acfw_titles', '__return_true' );

acfw_custom_template_dir since 1.4

Set a custom directory where ACFW will look for your template files. By default, the plugin will look in your child theme root, then your parent theme root. Please note: the string returned by the plugin should be a valid path and not URL. Files can only be included from a server level, so including a full URL (http://etc.etc) will result in an error or worse. If you’re unsure of the value of the variable you are returning, use a var_dump() to debug your code before release.