• I bought the oceanwp hooks plugin but it appears that it doesn’t hook code into SPECIFIC wordpress categories which is a mega shame (and kinda the reason why I bought it)

    So, my question is, is it possible, perhaps using functions.php to manipulate where the hook/ shortcode is injected?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @conciseac,

    Please use the code below. Make sure you use child theme:

    add_action('wp_head', 'prefix_hook_add');
    function prefix_hook_add(){
    	if( is_single() && has_category('11') ){
    		// your code here
    	}
    }

    Change the 11 to category ID you want to show the code.

    Thread Starter conciseac

    (@conciseac)

    That’s great thanks very much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Inserting shortcodes into specific places in OceanWP’ is closed to new replies.