generate_hooks_capability

generate_hooks_capability

Note: This filter is included in GP Premium.
The generate_hooks_capability filter allows you to specify user access to the Hooks add-on.
For example, if you only want the network admin to have access:
add_filter( 'generate_hooks_capability','tu_network_admin_hooks' );
function tu_network_admin_hooks() {
return 'manage_network';
}
Usage
Please refer to the Using Filters article to learn how to use this filter.

generate_after_entry_title

generate_after_entry_title

The generate_after_entry_title hook appears after the titles of your posts, including the archive and single post templates.
Usage
Please refer to the Using Hooks article to learn how to use this hook.

generate_blog_image_attributes

generate_blog_image_attributes

Note: This filter is included in GP Premium.
The generate_blog_image_attributes filter allows you to adjust the featured image sizes based on different conditions.
See example here.
Usage
Please refer to the Using Filters article to learn how to use this filter.

generate_content_more_link_output

generate_content_more_link_output

The generate_content_more_link_output filter allows you to change the HTML markup of your read more link inside your blog post excerpts when using the more tag.
Default:
sprintf( '

%3$s

',
the_title_attribute( 'echo=0' ),
esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ),
__( 'Read more', 'generatepress' )
);
Usage
For example, if we wanted to change the class of our paragraph surrounding the link, we could do this:
add_filter( 'generate_content_more_link_output','tu_change_content_more_link' );
function tu_change_content_more_link() {
return sprintf( '

%3$s

',
the_title_attribute( 'echo=0' ),
esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ),
__( 'Read more', 'generatepress' )
);
}

generate_woocommerce_menu_cart_icon

generate_woocommerce_menu_cart_icon

The generate_woocommerce_menu_cart_icon filter allows you to change the icon HTML that builds the WooCommerce cart icon in the primary navigation.
Usage
Please refer to the Using Filters article to learn how to use this filter.
Examples
add_filter( 'generate_woocommerce_menu_cart_icon', 'tu_change_wc_menu_cart_icon' );
function tu_change_wc_menu_cart_icon() {
return '';
}

generate_pagination_mid_size

generate_pagination_mid_size

The generate_pagination_mid_size filter allows you to increase the number of page links shown in your post pagination.
Example
add_filter( 'generate_pagination_mid_size','tu_increase_pagination_numbers' );
function tu_increase_pagination_numbers() {
return 3;
}
Usage
Please refer to the Using Filters article to learn how to use this filter.

generate_category_post_navigation

generate_category_post_navigation

The generate_category_post_navigation filter forces the post navigation on single posts to stay within its category instead of pointing to posts in other categories.
Default (boolean): false
Usage
Please refer to the Using Filters article to learn how to use this filter.

generate_premium_beta_tester

generate_premium_beta_tester

Note: This filter is included in GP Premium.
The generate_premium_beta_tester filter allows you to become a beta tester.
Learn how to use this filter here.
Usage
Please refer to the Using Filters article to learn how to use this filter.