Support » Plugin: Hypothesis » enable use on custom post types

  • I installed the plugin and it works for blog posts, however, I’d like to also enable it for custom post types. Is that an option? If so, how can I do that?

Viewing 1 replies (of 1 total)
  • Hi there,

    I’m just a user (not a dev), but I was able to figure this out. Do you have access to your functions.php file, or some other file where you’re managing theme functions?

    Try adding this to it. I’ve included two examples, one showing my own implementation (e.g. http://scholia.com/poem/pmg-348/) and one showing the abstracted version of it:

    
    function add_cpt_to_hypothesis($value){
        return array(
        	'post' => _x( 'posts', 'plural post type', 'hypothesis' ),
    	'page' => _x( 'pages', 'plural post type', 'hypothesis' ),
    	'poem' => _x( 'poems', 'plural post type', 'hypothesis' ),
    	'[my_cpt_name]' => _x( '[my_cpt_name_plural]', 'plural post type', 'hypothesis' )
        );
    }
    

    Then, go into Settings => Hypothesis and turn it on for the CPT. That ought to do it.

    Hope that helps.

    • This reply was modified 2 years, 3 months ago by scallemang.
    • This reply was modified 2 years, 3 months ago by scallemang.
Viewing 1 replies (of 1 total)
  • The topic ‘enable use on custom post types’ is closed to new replies.