• Resolved drazon

    (@drazon)


    I’m using the filter ‘ocean_main_metaboxes_post_types’ to add the oceanwp settings in my custom post types. This works perfectly fine, except that it doesn’t show the ‘post’ tab where I can place the oEmbed URL, link, link target etc… This happens because of

    // Return if it is not Post post type
    	if ( 'post' != $post_type ) {
    		return;
    	}

    in includes/metabox/metabox.php#L1667 https://github.com/oceanwp/ocean-extra/blob/master/includes/metabox/metabox.php#L1667

    Can you add an apply_filters somewhere there so that we can override this behavior in a similar way like ‘ocean_main_metaboxes_post_types’?

    Thank you in advance,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Abhishek

    (@abhikr781)

    Hello,

    The post tab is only for the post type, For custom post type it will not work. But if you want to do it, you have to edit the ocean extra plugin files and this is not an ideal solution.

    Thread Starter drazon

    (@drazon)

    I’m just saying that an apply_filters() at that point would allow users to bypass this behavior and it won’t cause any problems anywhere else. I’m using the post tab for my custom post types so far and it works perfectly fine. consider it as a suggestion.

    Plugin Support Abhishek

    (@abhikr781)

    Hello,

    I have passed this to the concerned dev team and we will try to add it in our upcoming updates.

    Thread Starter drazon

    (@drazon)

    Hi thank you, you can also consider something like a flag in the oceanwp customizer settings because I have seen the same code in various oceanwp templates as well. Sometimes I create custom templates at the child theme just to remove that if

    // Return if it is not Post post type or if oceanwp_extend_posts_custom_post_types == false
    	if ( 'post' != $post_type || $oceanwp_extend_posts_custom_post_types == false   ) {
    		return;
    	} 

    So this would make it easier for anybody who wants to extend some of the oceanwp functionality into custom post types without needing to create custom templates at the child theme

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter to allow ‘post’ tab in ocean wp settings’ is closed to new replies.