

{"id":2568,"date":"2019-03-08T12:24:08","date_gmt":"2019-03-08T11:24:08","guid":{"rendered":"https:\/\/codeermeneer.nl\/?p=2568"},"modified":"2019-03-08T12:24:08","modified_gmt":"2019-03-08T11:24:08","slug":"how-to-use-custom-hooks-in-companion-portfolio","status":"publish","type":"post","link":"https:\/\/wijzijnqreative.nl\/web\/documentation\/how-to-use-custom-hooks-in-companion-portfolio\/","title":{"rendered":"How to use custom hooks in Companion Portfolio"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">If&nbsp; you&#8217;re a plugin or theme developer and would like to extend the features of&nbsp;<a href=\"https:\/\/plugins.wijzijnqreative.nl\/portfolio\/plugin\/companion-portfolio\/\">Companion Portfolio<\/a>&nbsp;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&nbsp;<a href=\"https:\/\/plugins.wijzijnqreative.nl\/contact\/\">reach out to me<\/a>&nbsp;and I&#8217;ll see what I can do.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The hooks<\/h2>\n\n\n\n<p><strong>After the content<\/strong><\/p>\n\n\n\n<p>This function runs after the content on the single page<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">function your_function() {\n   <em>\/\/ Your code goes here<\/em>\n}\nadd_action( 'cp_after_content', 'your_function' );<\/pre>\n\n\n\n<p><strong>Remove website link<\/strong><\/p>\n\n\n\n<p>To remove the link it adds by default<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">remove_action( 'cp_after_content', 'cp_website_button', 10 );<\/pre>\n\n\n\n<p><strong>Add to the thumbnail overlay<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">function your_function() { \n<em>    \/\/ Your code goes here \n<\/em>}\nadd_action( 'cp_portfolio_actions', 'your_function' );<\/pre>\n\n\n\n<p><strong>Remove thumbnail overlay with actions<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">remove_action( 'cp_portfolio_actions', 'cp_actions_overlay', 1 );\nremove_action( 'cp_portfolio_actions', 'cp_portfolio_add_actions', 5 );\nremove_action( 'cp_portfolio_actions', 'cp_actions_overlay_e', 10 );<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If&nbsp; you&#8217;re a plugin or theme developer and would like to extend the features of&nbsp;Companion Portfolio&nbsp;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&nbsp;reach out to me&nbsp;and I&#8217;ll see what I can do. The hooks After the content [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":805,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,33],"tags":[],"class_list":["post-2568","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-portfolio"],"_links":{"self":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/comments?post=2568"}],"version-history":[{"count":0,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2568\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media\/805"}],"wp:attachment":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media?parent=2568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/categories?post=2568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/tags?post=2568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}