Available filters for Custom post types

To change the text of the Enroll now button both for Classes and Events add the code below to the themes/shelly/function.php.

function filter_enroll_caption( $string ) {
// Modify $string in some way.
return "Your button text here";
}
add_filter( 'shelly-enroll-caption', 'filter_enroll_caption' );

To change the URL of the Enroll now button both for Classes and Events, add the code below to the themes/shelly/function.php.

function shelly_enroll_url( $string ) {
// Modify $string in some way.
return "https://...";
}
add_filter( 'shelly-enroll-url', 'shelly_enroll_url' );

To change the URL Field type for Enroll Now button both for Classes and Events, add the code below to the themes/shelly/function.php. This is useful if you need to use relative links for Enroll Now buttons.

function shelly_url_type_link( $string ) {
// Modify $string in some way.
    return "Text";
}
add_filter( 'shelly_metabox_type_link', 'shelly_url_type_link' );

Classes post type

List of available filters available for Classes posts.

FilterDescription
shelly-enroll-caption--classesFilter for changing the text of the Enroll now button for Classes post type only.
shelly-enroll-url--classesFilter for changing the URL of the Enroll now button for Classes post type only.
shelly_class_title_education_programsFilter for changing the title of the Education Programs section
shelly_class_title_activities_involvedFilter for changing the title of the Activities Involved section
List of Classes filters

Below is an example of using the filter for changing the text of the Enroll now on the Class page that should be added to the themes/shelly/function.php.

function filter_enroll_caption_class( $string ) {
// Modify $string in some way.
    return "New text classes";
}
add_filter( 'shelly-enroll-caption--classes', 'filter_enroll_caption_class' );

Events post type

List of available filters available for Events posts.

FilterDescription
shelly-enroll-caption--eventsFilter for changing the text of the Enroll now button for Events post type only.
shelly-enroll-url--eventsFilter for changing the URL of the Enroll now button for Events post type only.
shelly_event_title_activities_involvedFilter for changing the title of the Activities Involved section
List of Events filters

Below is an example of using the filter for changing the text of the Enroll now on the Event page that should be added to the themes/shelly/function.php.

function filter_enroll_caption_events( $string ) {
// Modify $string in some way.
    return "New text classes";
}
add_filter( 'shelly-enroll-caption--events', 'filter_enroll_caption_events' );

Teachers post type

List of available filters available for Teacher posts.

FilterDescription
shelly_teacher_title_personal_skillsFilter for changing the title of the Personal Skills section
shelly_teacher_title_graduation_degreesFilter for changing the title of the Graduation and degrees section
List of Teacher filters

Below is an example of using the filter for changing the title of the Personal Skills section on the Teacher page that should be added to the themes/shelly/function.php.

function filter_teacher_personal_skills( $string ) {
// Modify $string in some way.
    return "New skill text";
}
add_filter( 'shelly_teacher_title_personal_skills', 'filter_teacher_personal_skills' );

Was this article helpful to you?