What are Hooks in WordPress? How to use Hooks in WordPress ?

please click here for more wordpress cource

In WordPress theme and development, Hooks are functions or object that hat can be applied to an Action or a Filter in WordPress theme functionality .. Actions and Filters in WordPress are functions that can be modified out of wordpress  by theme and plugin 

Functions used to change hooks/filter WordPress can be guided into WordPress. In any case, note that activities and channels are not something very similar. Activities are capacities performed when a specific occasion happens in WordPress. Channels permit you to adjust certain capacities. Contentions used to snare the two channels and activities appear to be identical. Be that as it may, they are distinctive in usefulness and how they carry on.

Hooks Examples

in this example we can add the link at the end of post discription

function wpac_custom_excerpt( $output ) {
  if ( has_excerpt() && ! is_attachment() ) {
    $output .= wpac_continue_reading_link();
  return $output;
add_filter( 'get_the_excerpt', 'wpac_custom_excerpt' );

You may also like...

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *