Title: launchinteractive's Replies - page 38 | WordPress.org

---

# launchinteractive

  [  ](https://wordpress.org/support/users/launchinteractive/)

 *   [Profile](https://wordpress.org/support/users/launchinteractive/)
 *   [Topics Started](https://wordpress.org/support/users/launchinteractive/topics/)
 *   [Replies Created](https://wordpress.org/support/users/launchinteractive/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/launchinteractive/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/launchinteractive/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/launchinteractive/engagements/)
 *   [Favorites](https://wordpress.org/support/users/launchinteractive/favorites/)

 Search replies:

## Forum Replies Created

Viewing 556 replies (of 556 total)

[←](https://wordpress.org/support/users/launchinteractive/replies/page/37/?output_format=md)
[1](https://wordpress.org/support/users/launchinteractive/replies/?output_format=md)
[2](https://wordpress.org/support/users/launchinteractive/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/launchinteractive/replies/page/3/?output_format=md)…
[36](https://wordpress.org/support/users/launchinteractive/replies/page/36/?output_format=md)
[37](https://wordpress.org/support/users/launchinteractive/replies/page/37/?output_format=md)
38

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [disable plugin for post type without a view page](https://wordpress.org/support/topic/disable-plugin-for-post-type-without-a-view-page/)
 *  Thread Starter [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/disable-plugin-for-post-type-without-a-view-page/#post-4855904)
 * My plugin is now live here: [http://wordpress.org/plugins/publish-view/](http://wordpress.org/plugins/publish-view/)
 * However I’m not currently checking for the existence of a view page. I just added
   an if statement so that ACF worked. This is my code:
 *     ```
       function publish_view_submitbox_start(){
       	global $post;
       	global $wp_version;
   
       	if($post->post_type != 'acf') {
   
       		if($post->post_status == 'auto-draft' || $post->post_status == 'draft') {
       			submit_button('','primary','publish',false, array('onclick'=>"jQuery(this).after('<input type=\"hidden\" name=\"publishview\" value=\"Y\" />')",'title'=>'Publish & View','id'=>'publishview'));
       		} else if($post->post_status == 'publish') {
       			submit_button('','primary','publish',false, array('onclick'=>"jQuery(this).after('<input type=\"hidden\" name=\"publishview\" value=\"Y\" />')",'title'=>'Update & View','id'=>'publishview'));
       		}
       	}
       }
       ```
   
 * Note the ACF if statement. I would like to avoid being so specific and detect
   if I should output anything. Any help would be appreciated!

Viewing 556 replies (of 556 total)

[←](https://wordpress.org/support/users/launchinteractive/replies/page/37/?output_format=md)
[1](https://wordpress.org/support/users/launchinteractive/replies/?output_format=md)
[2](https://wordpress.org/support/users/launchinteractive/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/launchinteractive/replies/page/3/?output_format=md)…
[36](https://wordpress.org/support/users/launchinteractive/replies/page/36/?output_format=md)
[37](https://wordpress.org/support/users/launchinteractive/replies/page/37/?output_format=md)
38