Events for courses

Home Forums Welcome! Pre-Sales Questions Events for courses

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1134653
    Alexis
    Participant

    Hi, I’m using your plugin pro to show my language courses. I’ve just created a recurring event but when I save it I see a new event for every single date. Is there a way to avoid this? I’m selling 30 hour courses that take place twice a week for 2 hours. Ultimately, it’s just ONE event. Thanks!

    #1134663
    Andras
    Keymaster

    Hello Alexis,

    Thanks for going Pro and welcome to the forums!

    I understand your concern. At this moment there is no way to avoid this. Every recurrence is shown as a separate event, though if you want to edit the whole series, it is possible to do that in one place.

    If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.

    Let me know if you have any follow up questions.

    Cheers,
    Andras

    #1134892
    Alexis
    Participant

    Hi Andras,
    That’s quite problematic for me as I have 15 different types of trainings that can take place simultaneously over the course of 10 weeks, several times per week. I don’t see this as being manageable for what I need. Is it possible to obtain a refund as I just purchased the plugin last night? Thanks, Victoria

    #1135256
    Andras
    Keymaster

    Hello again Victoria,

    Yes, it is possible to get a refund. You can find more information about are refund policy here:

    Refund Policy

    Before rushing there though, one of my colleagues (I think he is a magician) whipped up a short snippet, which just might be useful for you. Simply put it hides all recurring events, except for the first occasion / starting date.

    Just paste this snippet in your theme’s functions.php file and see the magic:


    class Events_Admin_List__Remove_Child_Events {
    public function __construct() {
    // Don't kick in unless we're on the edit.php screen
    add_action( 'load-edit.php', array( $this, 'setup' ) );
    }

    public function setup() {
    // Listen out for the main events query
    if ( 'tribe_events' === $GLOBALS[ 'typenow' ] )
    add_action( 'parse_query', array( $this, 'modify' ) );
    }

    function modify( WP_Query $query ) {
    // Run once, only for the main query
    if ( ! $query->is_main_query() ) return;
    remove_action( 'parse_query', array( $this, 'modify') );

    // Only return top level posts as a means of ignoring child posts
    $query->set( 'post_parent', 0 );
    }
    }

    new Events_Admin_List__Remove_Child_Events;

    Please let me know if this helps you or if you have any followup questions.

    Cheers,
    Andras

    #1135307
    Alexis
    Participant

    Hi, I copied the Functions.php file into my childs theme then added the code you gave me. But it showed me an error…
    Could you please show me how to add the code to the following?

    <?php
    /**
    * @package WordPress
    * @subpackage Language School
    * @version 1.0.0
    *
    * Main Theme Functions File
    * Created by CMSMasters
    *
    */

    // Current Theme Constants
    if (!defined(‘CMSMASTERS_SHORTNAME’)) {
    define(‘CMSMASTERS_SHORTNAME’, ‘language-school’);
    }

    if (!defined(‘CMSMASTERS_FULLNAME’)) {
    define(‘CMSMASTERS_FULLNAME’, ‘Language School’);
    }

    /*** START EDIT THEME PARAMETERS HERE ***/

    // Theme Settings System Fonts List
    if (!function_exists(‘language_school_system_fonts_list’)) {
    function language_school_system_fonts_list() {
    $fonts = array(
    “Arial, Helvetica, ‘Nimbus Sans L’, sans-serif” => ‘Arial’,
    “Calibri, ‘AppleGothic’, ‘MgOpen Modata’, sans-serif” => ‘Calibri’,
    “‘Trebuchet MS’, Helvetica, Garuda, sans-serif” => ‘Trebuchet MS’,
    “‘Comic Sans MS’, Monaco, ‘TSCu_Comic’, cursive” => ‘Comic Sans MS’,
    “Georgia, Times, ‘Century Schoolbook L’, serif” => ‘Georgia’,
    “Verdana, Geneva, ‘DejaVu Sans’, sans-serif” => ‘Verdana’,
    “Tahoma, Geneva, Kalimati, sans-serif” => ‘Tahoma’,
    “‘Lucida Sans Unicode’, ‘Lucida Grande’, Garuda, sans-serif” => ‘Lucida Sans’,
    “‘Times New Roman’, Times, ‘Nimbus Roman No9 L’, serif” => ‘Times New Roman’,
    “‘Courier New’, Courier, ‘Nimbus Mono L’, monospace” => ‘Courier New’,
    );

    return $fonts;
    }
    }

    // Theme Settings Google Fonts List
    if (!function_exists(‘language_school_get_google_fonts_list’)) {
    function language_school_get_google_fonts_list() {
    $fonts = array(
    ” => esc_html__(‘None’, ‘language-school’),
    ‘Titillium+Web:300,300italic,400,400italic,600,600italic,700,700italic’ => ‘Titillium Web’,
    ‘Roboto:300,300italic,400,400italic,500,500italic,700,700italic’ => ‘Roboto’,
    ‘Roboto+Condensed:400,400italic,700,700italic’ => ‘Roboto Condensed’,
    ‘Open+Sans:300,300italic,400,400italic,700,700italic’ => ‘Open Sans’,
    ‘Open+Sans+Condensed:300,300italic,700’ => ‘Open Sans Condensed’,
    ‘Droid+Sans:400,700’ => ‘Droid Sans’,
    ‘Droid+Serif:400,400italic,700,700italic’ => ‘Droid Serif’,
    ‘Poppins:300,400,500,600,700’ => ‘Poppins’,
    ‘PT+Sans:400,400italic,700,700italic’ => ‘PT Sans’,
    ‘PT+Sans+Caption:400,700’ => ‘PT Sans Caption’,
    ‘PT+Sans+Narrow:400,700’ => ‘PT Sans Narrow’,
    ‘PT+Serif:400,400italic,700,700italic’ => ‘PT Serif’,
    ‘Ubuntu:400,400italic,700,700italic’ => ‘Ubuntu’,
    ‘Ubuntu+Condensed’ => ‘Ubuntu Condensed’,
    ‘Headland+One’ => ‘Headland One’,
    ‘Source+Sans+Pro:300,300italic,400,400italic,700,700italic’ => ‘Source Sans Pro’,
    ‘Lato:400,400italic,700,700italic’ => ‘Lato’,
    ‘Cuprum:400,400italic,700,700italic’ => ‘Cuprum’,
    ‘Oswald:300,400,700’ => ‘Oswald’,
    ‘Yanone+Kaffeesatz:300,400,700’ => ‘Yanone Kaffeesatz’,
    ‘Lobster’ => ‘Lobster’,
    ‘Lobster+Two:400,400italic,700,700italic’ => ‘Lobster Two’,
    ‘Questrial’ => ‘Questrial’,
    ‘Raleway:300,400,500,600,700’ => ‘Raleway’,
    ‘Dosis:300,400,500,700’ => ‘Dosis’,
    ‘Cutive+Mono’ => ‘Cutive Mono’,
    ‘Quicksand:300,400,700’ => ‘Quicksand’,
    ‘Montserrat:400,700’ => ‘Montserrat’,
    ‘Cookie’ => ‘Cookie’,
    );

    return $fonts;
    }
    }

    // Theme Settings Text Transforms List
    if (!function_exists(‘language_school_text_transform_list’)) {
    function language_school_text_transform_list() {
    $list = array(
    ‘none’ => ‘none’,
    ‘uppercase’ => ‘uppercase’,
    ‘lowercase’ => ‘lowercase’,
    ‘capitalize’ => ‘capitalize’,
    );

    return $list;
    }
    }

    // Theme Settings Text Decorations List
    if (!function_exists(‘language_school_text_decoration_list’)) {
    function language_school_text_decoration_list() {
    $list = array(
    ‘none’ => ‘none’,
    ‘underline’ => ‘underline’,
    ‘overline’ => ‘overline’,
    ‘line-through’ => ‘line-through’,
    );

    return $list;
    }
    }

    // Theme Settings Custom Color Schemes
    if (!function_exists(‘language_school_custom_color_schemes_list’)) {
    function language_school_custom_color_schemes_list() {
    $list = array(
    ‘first’ => esc_html__(‘Custom 1’, ‘language-school’),
    ‘second’ => esc_html__(‘Custom 2’, ‘language-school’),
    ‘third’ => esc_html__(‘Custom 3’, ‘language-school’),
    ‘fourth’ => esc_html__(‘Custom 4’, ‘language-school’)
    );

    return $list;
    }
    }

    /*** STOP EDIT THEME PARAMETERS HERE ***/

    // Theme Plugin Support Constants
    if (!defined(‘CMSMASTERS_WOOCOMMERCE’) && class_exists(‘woocommerce’)) {
    define(‘CMSMASTERS_WOOCOMMERCE’, true);
    } elseif (!defined(‘CMSMASTERS_WOOCOMMERCE’)) {
    define(‘CMSMASTERS_WOOCOMMERCE’, false);
    }

    if (!defined(‘CMSMASTERS_EVENTS_CALENDAR’) && class_exists(‘Tribe__Events__Main’)) {
    define(‘CMSMASTERS_EVENTS_CALENDAR’, true);
    } elseif (!defined(‘CMSMASTERS_EVENTS_CALENDAR’)) {
    define(‘CMSMASTERS_EVENTS_CALENDAR’, false);
    }

    if (!defined(‘CMSMASTERS_PAYPALDONATIONS’) && class_exists(‘PayPalDonations’)) {
    define(‘CMSMASTERS_PAYPALDONATIONS’, true);
    } elseif (!defined(‘CMSMASTERS_PAYPALDONATIONS’)) {
    define(‘CMSMASTERS_PAYPALDONATIONS’, false);
    }

    if (!defined(‘CMSMASTERS_DONATIONS’) && class_exists(‘Cmsmasters_Donations’)) {
    define(‘CMSMASTERS_DONATIONS’, false);
    } elseif (!defined(‘CMSMASTERS_DONATIONS’)) {
    define(‘CMSMASTERS_DONATIONS’, false);
    }

    if (!defined(‘CMSMASTERS_TIMETABLE’) && function_exists(‘timetable_events_init’)) {
    define(‘CMSMASTERS_TIMETABLE’, true);
    } elseif (!defined(‘CMSMASTERS_TIMETABLE’)) {
    define(‘CMSMASTERS_TIMETABLE’, false);
    }

    if (!defined(‘CMSMASTERS_LEARNPRESS’) && class_exists(‘LearnPress’)) {
    define(‘CMSMASTERS_LEARNPRESS’, true);
    } elseif (!defined(‘CMSMASTERS_LEARNPRESS’)) {
    define(‘CMSMASTERS_LEARNPRESS’, false);
    }

    // Theme Colored Categories Constant
    if (!defined(‘CMSMASTERS_COLORED_CATEGORIES’)) {
    define(‘CMSMASTERS_COLORED_CATEGORIES’, false);
    }

    // Theme Projects Compatible
    if (!defined(‘CMSMASTERS_PROJECT_COMPATIBLE’)) {
    define(‘CMSMASTERS_PROJECT_COMPATIBLE’, true);
    }

    // Theme Profiles Compatible
    if (!defined(‘CMSMASTERS_PROFILE_COMPATIBLE’)) {
    define(‘CMSMASTERS_PROFILE_COMPATIBLE’, true);
    }

    // Theme Image Thumbnails Size
    if (!function_exists(‘language_school_get_image_thumbnail_list’)) {
    function language_school_get_image_thumbnail_list() {
    $list = array(
    ‘cmsmasters-small-thumb’ => array(
    ‘width’ => 60,
    ‘height’ => 60,
    ‘crop’ => true
    ),
    ‘cmsmasters-square-thumb’ => array(
    ‘width’ => 300,
    ‘height’ => 300,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Square’, ‘language-school’)
    ),
    ‘cmsmasters-blog-masonry-thumb’ => array(
    ‘width’ => 580,
    ‘height’ => 350,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Masonry Blog’, ‘language-school’)
    ),
    ‘cmsmasters-project-thumb’ => array(
    ‘width’ => 580,
    ‘height’ => 580,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Project’, ‘language-school’)
    ),
    ‘cmsmasters-project-masonry-thumb’ => array(
    ‘width’ => 580,
    ‘height’ => 9999,
    ‘title’ => esc_attr__(‘Masonry Project’, ‘language-school’)
    ),
    ‘post-thumbnail’ => array(
    ‘width’ => 860,
    ‘height’ => 500,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Featured’, ‘language-school’)
    ),
    ‘cmsmasters-masonry-thumb’ => array(
    ‘width’ => 860,
    ‘height’ => 9999,
    ‘title’ => esc_attr__(‘Masonry’, ‘language-school’)
    ),
    ‘cmsmasters-full-thumb’ => array(
    ‘width’ => 1160,
    ‘height’ => 650,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Full’, ‘language-school’)
    ),
    ‘cmsmasters-project-full-thumb’ => array(
    ‘width’ => 1160,
    ‘height’ => 750,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Project Full’, ‘language-school’)
    ),
    ‘cmsmasters-full-masonry-thumb’ => array(
    ‘width’ => 1160,
    ‘height’ => 9999,
    ‘title’ => esc_attr__(‘Masonry Full’, ‘language-school’)
    )
    );

    if (CMSMASTERS_EVENTS_CALENDAR) {
    $list[‘cmsmasters-event-thumb’] = array(
    ‘width’ => 580,
    ‘height’ => 420,
    ‘crop’ => true,
    ‘title’ => esc_attr__(‘Event’, ‘language-school’)
    );
    }

    return $list;
    }
    }

    // Theme Settings All Color Schemes List
    if (!function_exists(‘language_school_all_color_schemes_list’)) {
    function language_school_all_color_schemes_list() {
    $list = array(
    ‘default’ => esc_html__(‘Default’, ‘language-school’),
    ‘header’ => esc_html__(‘Header’, ‘language-school’),
    ‘navigation’ => esc_html__(‘Navigation’, ‘language-school’),
    ‘header_top’ => esc_html__(‘Header Top’, ‘language-school’),
    ‘bottom’ => esc_html__(‘Bottom’, ‘language-school’),
    ‘footer’ => esc_html__(‘Footer’, ‘language-school’)
    );

    $out = array_merge($list, language_school_custom_color_schemes_list());

    return apply_filters(‘cmsmasters_all_color_schemes_list_filter’, $out);
    }
    }

    // Theme Settings Color Schemes Default Colors
    if (!function_exists(‘language_school_color_schemes_defaults’)) {
    function language_school_color_schemes_defaults() {
    $list = array(
    ‘default’ => array( // content default color scheme
    ‘color’ => ‘#909195’,
    ‘link’ => ‘#01a2a6’,
    ‘hover’ => ‘#bcbec1’,
    ‘heading’ => ‘#3d3d47’,
    ‘bg’ => ‘#ffffff’,
    ‘alternate’ => ‘#fcfcfc’,
    ‘border’ => ‘#e0e0e0’,
    ‘secondary’ => ‘#fe5969’
    ),
    ‘header’ => array( // Header color scheme
    ‘mid_color’ => ‘#9f9fa7’,
    ‘mid_link’ => ‘#3d3d47’,
    ‘mid_hover’ => ‘#01a2a6’,
    ‘mid_bg’ => ‘#ffffff’,
    ‘mid_bg_scroll’ => ‘rgba(255,255,255,0.9)’,
    ‘mid_border’ => ‘#e4e4e4’,
    ‘bot_color’ => ‘#9f9fa7’,
    ‘bot_link’ => ‘#3d3d47’,
    ‘bot_hover’ => ‘#01a2a6’,
    ‘bot_bg’ => ‘#ffffff’,
    ‘bot_bg_scroll’ => ‘rgba(255,255,255,0.9)’,
    ‘bot_border’ => ‘#e4e4e4’
    ),
    ‘navigation’ => array( // Navigation color scheme
    ‘title_link’ => ‘#3d3d47’,
    ‘title_link_hover’ => ‘#01a2a6’,
    ‘title_link_current’ => ‘#01a2a6’,
    ‘title_link_subtitle’ => ‘#9f9fa7’,
    ‘title_link_bg’ => ‘rgba(255,255,255,0)’,
    ‘title_link_bg_hover’ => ‘rgba(255,255,255,0)’,
    ‘title_link_bg_current’ => ‘rgba(255,255,255,0)’,
    ‘title_link_border’ => ‘rgba(255,255,255,0)’,
    ‘dropdown_text’ => ‘#9f9fa7’,
    ‘dropdown_bg’ => ‘#ffffff’,
    ‘dropdown_border’ => ‘#e4e4e4’,
    ‘dropdown_link’ => ‘#3d3d47’,
    ‘dropdown_link_hover’ => ‘#fe5969’,
    ‘dropdown_link_subtitle’ => ‘#9f9fa7’,
    ‘dropdown_link_highlight’ => ‘#fe5969’,
    ‘dropdown_link_border’ => ‘#e4e4e4’
    ),
    ‘header_top’ => array( // Header Top color scheme
    ‘color’ => ‘#9f9fa7’,
    ‘link’ => ‘#9f9fa7’,
    ‘hover’ => ‘#01a2a6’,
    ‘bg’ => ‘#ffffff’,
    ‘border’ => ‘#e0e0e0’,
    ‘title_link’ => ‘#3d3d47’,
    ‘title_link_hover’ => ‘#01a2a6’,
    ‘title_link_bg’ => ‘rgba(255,255,255,0)’,
    ‘title_link_bg_hover’ => ‘rgba(255,255,255,0)’,
    ‘title_link_border’ => ‘rgba(255,255,255,0)’,
    ‘dropdown_bg’ => ‘#ffffff’,
    ‘dropdown_border’ => ‘#dcdcdc’,
    ‘dropdown_link’ => ‘#3d3d47’,
    ‘dropdown_link_hover’ => ‘#fe5969’,
    ‘dropdown_link_highlight’ => ‘rgba(255,255,255,0)’,
    ‘dropdown_link_border’ => ‘rgba(255,255,255,0)’
    ),
    ‘bottom’ => array( // Bottom sidebar color scheme
    ‘color’ => ‘rgba(255,255,255,0.3)’,
    ‘link’ => ‘rgba(255,255,255,0.3)’,
    ‘hover’ => ‘#ffffff’,
    ‘heading’ => ‘#ffffff’,
    ‘bg’ => ‘#3d3d47’,
    ‘alternate’ => ‘#43434d’,
    ‘border’ => ‘#4b4b54’,
    ‘secondary’ => ‘#01a2a6’
    ),
    ‘footer’ => array( // Footer color scheme
    ‘color’ => ‘rgba(255,255,255,0.3)’,
    ‘link’ => ‘rgba(255,255,255,0.3)’,
    ‘hover’ => ‘#ffffff’,
    ‘heading’ => ‘#ffffff’,
    ‘bg’ => ‘#3d3d47’,
    ‘alternate’ => ‘#01a2a6’,
    ‘border’ => ‘#4b4b54’,
    ‘secondary’ => ‘#fe5969’
    ),
    ‘first’ => array( // custom color scheme 1
    ‘color’ => ‘#ffffff’,
    ‘link’ => ‘rgba(255,255,255,0.8)’,
    ‘hover’ => ‘#ffffff’,
    ‘heading’ => ‘#ffffff’,
    ‘bg’ => ‘#01a2a6’,
    ‘alternate’ => ‘rgba(255,255,255,0.1)’,
    ‘border’ => ‘rgba(255,255,255,0.25)’,
    ‘secondary’ => ‘#fe5969’
    ),
    ‘second’ => array( // custom color scheme 2
    ‘color’ => ‘#ffffff’,
    ‘link’ => ‘#ffffff’,
    ‘hover’ => ‘#ffffff’,
    ‘heading’ => ‘#ffffff’,
    ‘bg’ => ‘#17aaae’,
    ‘alternate’ => ‘rgba(255,255,255,0.1)’,
    ‘border’ => ‘rgba(255,255,255,0.25)’,
    ‘secondary’ => ‘#fe5969’
    ),
    ‘third’ => array( // custom color scheme 3
    ‘color’ => ‘#909195’,
    ‘link’ => ‘#01a2a6’,
    ‘hover’ => ‘#bcbec1’,
    ‘heading’ => ‘#3d3d47’,
    ‘bg’ => ‘#fcfcfc’,
    ‘alternate’ => ‘#ffffff’,
    ‘border’ => ‘#e0e0e0’,
    ‘secondary’ => ‘#fe5969’
    ),
    ‘fourth’ => array( // custom color scheme 4
    ‘color’ => ‘#ffffff’,
    ‘link’ => ‘#ffffff’,
    ‘hover’ => ‘#ffffff’,
    ‘heading’ => ‘rgba(255,255,255,0.4)’,
    ‘bg’ => ‘#f9b639’,
    ‘alternate’ => ‘rgba(255,255,255,0.1)’,
    ‘border’ => ‘rgba(255,255,255,0.25)’,
    ‘secondary’ => ‘#ffffff’
    )
    );

    return $list;
    }
    }

    // CMSMasters Framework Directories Constants
    if (!defined(‘CMSMASTERS_FRAMEWORK’)) {
    define(‘CMSMASTERS_FRAMEWORK’, get_template_directory() . ‘/framework’);
    }

    if (!defined(‘CMSMASTERS_ADMIN’)) {
    define(‘CMSMASTERS_ADMIN’, CMSMASTERS_FRAMEWORK . ‘/admin’);
    }

    if (!defined(‘CMSMASTERS_SETTINGS’)) {
    define(‘CMSMASTERS_SETTINGS’, CMSMASTERS_ADMIN . ‘/settings’);
    }

    if (!defined(‘CMSMASTERS_OPTIONS’)) {
    define(‘CMSMASTERS_OPTIONS’, CMSMASTERS_ADMIN . ‘/options’);
    }

    if (!defined(‘CMSMASTERS_ADMIN_INC’)) {
    define(‘CMSMASTERS_ADMIN_INC’, CMSMASTERS_ADMIN . ‘/inc’);
    }

    if (!defined(‘CMSMASTERS_CLASS’)) {
    define(‘CMSMASTERS_CLASS’, CMSMASTERS_FRAMEWORK . ‘/class’);
    }

    if (!defined(‘CMSMASTERS_FUNCTION’)) {
    define(‘CMSMASTERS_FUNCTION’, CMSMASTERS_FRAMEWORK . ‘/function’);
    }

    if (!defined(‘CMSMASTERS_COMPOSER’)) {
    define(‘CMSMASTERS_COMPOSER’, get_template_directory() . ‘/cmsmasters-c-c’);
    }

    // Load Framework Parts
    require_once(CMSMASTERS_ADMIN_INC . ‘/config-functions.php’);

    require_once(CMSMASTERS_SETTINGS . ‘/cmsmasters-theme-settings.php’);

    require_once(CMSMASTERS_OPTIONS . ‘/cmsmasters-theme-options.php’);

    require_once(CMSMASTERS_ADMIN_INC . ‘/admin-scripts.php’);

    require_once(CMSMASTERS_ADMIN_INC . ‘/plugin-activator.php’);

    require_once(CMSMASTERS_CLASS . ‘/likes-posttype.php’);

    require_once(CMSMASTERS_CLASS . ‘/twitteroauth.php’);

    require_once(CMSMASTERS_CLASS . ‘/widgets.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/breadcrumbs.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/likes.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/pagination.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/single-comment.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/theme-functions.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/theme-fonts.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/theme-colors-primary.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/theme-colors-secondary.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions-post.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions-project.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions-profile.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions-shortcodes.php’);

    require_once(CMSMASTERS_FUNCTION . ‘/template-functions-widgets.php’);

    // Theme Colored Categories Functions
    if (CMSMASTERS_COLORED_CATEGORIES) {
    require_once(CMSMASTERS_FUNCTION . ‘/theme-colored-categories.php’);
    }

    if (class_exists(‘Cmsmasters_Content_Composer’)) {
    require_once(CMSMASTERS_COMPOSER . ‘/filters/cmsmasters-c-c-atts-filters.php’);

    require_once(CMSMASTERS_COMPOSER . ‘/shortcodes/theme-shortcodes.php’);
    }

    // Events functions
    if (CMSMASTERS_EVENTS_CALENDAR) {
    require_once(get_template_directory() . ‘/tribe-events/cmsmasters-events-functions.php’);
    }

    // Load Theme Local File
    if (!function_exists(‘language_school_load_theme_textdomain’)) {
    function language_school_load_theme_textdomain() {
    load_theme_textdomain(‘language-school’, CMSMASTERS_FRAMEWORK . ‘/languages’);
    }
    }

    // Load Theme Local File Action
    if (!has_action(‘after_setup_theme’, ‘language_school_load_theme_textdomain’)) {
    add_action(‘after_setup_theme’, ‘language_school_load_theme_textdomain’);
    }

    // Framework Activation & Data Import
    if (!function_exists(‘language_school_theme_activation’)) {
    function language_school_theme_activation() {
    if (get_option(‘cmsmasters_active_theme’) != CMSMASTERS_SHORTNAME) {
    add_option(‘cmsmasters_active_theme’, CMSMASTERS_SHORTNAME, ”, ‘yes’);

    language_school_add_global_options();

    language_school_regenerate_styles();

    language_school_add_global_icons();

    flush_rewrite_rules();

    wp_redirect(esc_url(admin_url(‘admin.php?page=cmsmasters-settings&upgraded=true’)));
    }
    }
    }

    add_action(‘after_switch_theme’, ‘language_school_theme_activation’);

    // Framework Deactivation
    if (!function_exists(‘language_school_theme_deactivation’)) {
    function language_school_theme_deactivation() {
    delete_option(‘cmsmasters_active_theme’);
    }
    }

    // Framework Deactivation Action
    if (!has_action(‘switch_theme’, ‘language_school_theme_deactivation’)) {
    add_action(‘switch_theme’, ‘language_school_theme_deactivation’);
    }

    #1135771
    Andras
    Keymaster

    Hi Alexis,

    Thanks for getting back to me on this. I’m more than happy to help you out.

    You don’t need to copy the functions.php file to your child theme’s folder. The advantage of a child theme is, that is uses everything from the parent theme (including the parent’s functions.php file, plus is uses whatever else you add to it.

    So basically you need to create an empty functions.php file in your child theme’s folder and just paste this below code into it:


    <?php
    // Hide recurring event recurrences in back-end, show only first occasion
    class Events_Admin_List__Remove_Child_Events {
    public function __construct() {
    // Don't kick in unless we're on the edit.php screen
    add_action( 'load-edit.php', array( $this, 'setup' ) );
    }

    public function setup() {
    // Listen out for the main events query
    if ( 'tribe_events' === $GLOBALS[ 'typenow' ] )
    add_action( 'parse_query', array( $this, 'modify' ) );
    }

    function modify( WP_Query $query ) {
    // Run once, only for the main query
    if ( ! $query->is_main_query() ) return;
    remove_action( 'parse_query', array( $this, 'modify') );

    // Only return top level posts as a means of ignoring child posts
    $query->set( 'post_parent', 0 );
    }
    }

    new Events_Admin_List__Remove_Child_Events;

    Try it and let me know if it works out.
    Note, you need to have an opening <?php tag at the beginning of the file, but you don’t need a closing ?> tag. Just as in the code above.

    Cheers,
    Andras

    #1135847
    Alexis
    Participant

    Hi Andras, Thanks. It worked. I guess it was a question of the code language. In the e-mail it was <? instead of <?. That solves the issue of the editor. However, when I actually see the calendar on my website it still shows every single lesson as an individual event.

    The problem is that it treats the courses as a recurring event…but it’s actually one event that goes on for a long period of time but doesn’t happen every day…if that makes sense…

    #1135951
    Andras
    Keymaster

    Hello again,

    I’m happy we managed to get the code working! Good job on that Alexis!

    Regarding the front-end, I think I understand where you are coming from, though I’m not sure I understand where you want to get.

    I could shoot some ideas here in the air, but I think it’s better to understand first what you would like to achieve. If at the end you still decide for a refund, you can do that within 30 days of purchase, but I hope we will be able to find a solution for you.

    Could you please explain in a bit more detail what you would like to see on the front-end / what the users should see? What should they be able to do?

    Once I know that I might be able to help you further or point you in the right direction on how you can achieve that.

    Thanks and cheers,
    Andras

    #1142465
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Events for courses’ is closed to new replies.