• Resolved East1

    (@east1)


    My project would like to be able to disable the options for producer and dj pages?

    Because we don’t follow that model it causes too mane links and clutter.

    I disabled them by editing the right file.

    I hope the edits are not overwritten by the updates?

    MTA, East1

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tony Zeoli

    (@tonyzeoli)

    Any time you modify a core WordPress file or a file that persists in a theme or plugin, a new update may overwrite it. You should always create a child theme and then move the file into the child theme, modify it, and any new updates will not overwrite the code in the child theme. But, I think this only works for theming and not for plugins. There may be a filter we can pass you to filter out the feature. I’ll ask our lead developer, Tony Hayes, to take a look at your request and see if we can’t help you do that. We don’t necessarily have to because a plugin comes how it comes, but we’ll do our best.

    Plugin Contributor Tony Hayes

    (@majick)

    @east1 Here’s a filter for the host and producer post type registration to remove the public profile pages:

    /* disable public host and producer profile pages */
    add_filter( 'radio_station_post_type_host', 'custom_disable_profile_pages' );
    add_filter( 'radio_station_post_type_producer', 'custom_disable_profile_pages' );
    function custom_disable_profile_pages( $post_type ) {
    	$post_type['public'] = false;
    	$post_type['has_archive'] = false;
    	return $post_type;
    }

    You’ll probably want to disable the redirection of author pages to profile pages also:

    /* do not redirect links to profile pages */
    remove_filter( 'radio_station_host_url', 'radio_station_pro_host_url', 10, 2 );
    remove_filter( 'radio_station_producer_url', 'radio_station_pro_producer_url', 10, 2 );
    

    And maybe filter shortcodes/widgets to not link there either:

    /* do not link to host profiles from widgets */
    add_filter( 'shortcode_atts_current_show', 'custom_disable_profile_links', 10, 4 );
    add_filter( 'shortcode_atts_upcoming_shows', 'custom_disable_profile_links', 10, 4 );
    function custom_disable_profile_links( $out, $pairs, $atts, $shortcode ) {
    	$out['link_hosts'] = 0;
    	return $out;
    }

    Not sure if you are wanting to remove the Host/Producer/Team tab from the Show page also? I might just make this one an option as there is already a setting for combining them.

    Plugin Author Tony Zeoli

    (@tonyzeoli)

    Will consider this issue closed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Producer/DJ pages optional’ is closed to new replies.