Papin Schipper

Plugin documentation View more plugins

How to use custom hooks in Companion Portfolio

If  you’re a plugin or theme developer and would like to extend the features of Companion Portfolio you can do so by using custom hooks and filters. If you have any idea on new hooks that should be added to this plugin please reach out to me and I’ll see what I can do.

The hooks

After the content

This function runs after the content on the single page

function your_function() {
   // Your code goes here
}
add_action( 'cp_after_content', 'your_function' );

Remove website link

To remove the link it adds by default

remove_action( 'cp_after_content', 'cp_website_button', 10 );

Add to the thumbnail overlay

function your_function() { 
    // Your code goes here 
}
add_action( 'cp_portfolio_actions', 'your_function' );

Remove thumbnail overlay with actions

remove_action( 'cp_portfolio_actions', 'cp_actions_overlay', 1 );
remove_action( 'cp_portfolio_actions', 'cp_portfolio_add_actions', 5 );
remove_action( 'cp_portfolio_actions', 'cp_actions_overlay_e', 10 );