Course type taxonomy

Home Forums Chit Chat WPLMS customizations Course type taxonomy

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #28392
    ulyssesw
    Spectator
    Hi, I would like to know what is the Taxonomy Slug and Taxonomy Term Name, that i can enter into the post grid settings. I want to show a block of online courses, and also a separate block of offline courses. I tried the following but it didn't work. Taxonomy Slug: course-type Taxonomy Term Name: online-course-type Regards.
    #28764
    Anshuman Sahu
    Keymaster
    Well you can create a category for this . You can add teh offline courses to offline category and online to online category  . Then you have to put :

    Taxonomy Slug: course-cat

     

    Taxonomy Term Name: offline Fo offline courses and same for teh online except the Taxonomy Term Name: online

    #28793
    ulyssesw
    Spectator
    Hi Alex, This is technically possible, but not feasible as a solution. This is because for most of us, the Course Categories are used for topics, such as Business, Finance, Engineering etc. If we are to add in Online and Offline as course categories, it will confuse our instructors. They will need to select online/offline in course category, and select online/offline again in course type. Am i correct in the above? Regards.
    #29016
    Anshuman Sahu
    Keymaster
    Well you can also create a new taxonomy course type if you do not want to use the category for online and offline courses . Then use the related taxonomy slug and term in the post grid settings .
    #29034
    Anshuman Sahu
    Keymaster
    Please use this code to add a custom taxonomy in courses : add_action( 'admin_menu', 'course_type_tax' ); function course_type_tax(){   register_taxonomy( 'course-type', array( 'course'),     array(       'labels' => array(         'name' => __('Course Type','vibe-customtypes'),         'menu_name' => __('Type','vibe-customtypes'),         'singular_name' => __('Type','vibe-customtypes'),         'add_new_item' => __('Add New Course Type','vibe-customtypes'),         'all_items' => __('All course Types','vibe-customtypes')       ),       'public' => true,       'hierarchical' => true,       'show_ui' => true,       'show_in_menu' => 'lms',       'show_admin_column' => true,         'show_in_admin_bar' => true,         'show_in_nav_menus' => true,       'query_var' => 'course-type',                  'show_in_nav_menus' => true,       'rewrite' => array( 'slug' => 'course-type' ,         'hierarchical' => true,          'with_front' => false )     )   );   } Then use the taxonomy slug : course-type Term : offline/online
    #29053
    ulyssesw
    Spectator
    Hi Alex, I added the code in wplms customizer. I entered the taxonomy slug as course-type. And term as offline, or online. But it doesn't show up. Its a error. Please see attached. Regards.
    #29057
    ulyssesw
    Spectator
    site: wedemic.com login: wedemicc password: tampines123???
    #29493
    Anshuman Sahu
    Keymaster
    I have made a mistake in above code . Please remove the previous one and add this in place of it :

    add_action( 'init', 'course_type_tax' );

    function course_type_tax(){

      register_taxonomy( 'course-type', array( 'course'),

        array(

          'labels' => array(

            'name' => __('Course Type','vibe-customtypes'),

            'menu_name' => __('Type','vibe-customtypes'),

            'singular_name' => __('Type','vibe-customtypes'),

            'add_new_item' => __('Add New Course Type','vibe-customtypes'),

            'all_items' => __('All course Types','vibe-customtypes')

          ),

          'public' => true,

          'hierarchical' => true,

          'show_ui' => true,

          'show_in_menu' => 'lms',

          'show_admin_column' => true,

            'show_in_admin_bar' => true,

            'show_in_nav_menus' => true,

          'query_var' => 'course-type',           

          'show_in_nav_menus' => true,

          'rewrite' => array( 'slug' => 'course-type' ,

            'hierarchical' => true, 

            'with_front' => false )

        )

      );

     

    }

    #29499
    Anshuman Sahu
    Keymaster
    I changed the code in your site ,please check and confirm . Please do not forget to update the course after adding the course type taxonomy .
    #29911
    ulyssesw
    Spectator
    Hi Alex, I saw the code you input in the wplms customiser, thanks. Its still showing an error. Please see attached. I used taxonomy slug as course-type, and online or offline for the term. Regards.
    #30315
    H.K. Latiyan
    Participant
    Please check the error message. It says the Term in the taxonomy does not exist. Which means if you've created a taxonomy course-type and a term "Type1", however the settings are "type2" and "course-type" and the error message says, your taxonomy - term combination should be "Type1" - "course-type".   Hope this explains.   p.s : You can try this plugin for easy creation of custom taxonomies :  https://wordpress.org/plugins/mb-custom-taxonomy/ p.s : It would be great if you can hire freelancer for customisations, because customisations are not a part of theme support and slow down the support process.
    #30337
    ulyssesw
    Spectator
    Hi Latiyan, Thanks for the feedback. I will consider to use a freelancer for such customisations. As for this issue, Alex provided a code, and said the taxonomy slug is course-type, and the term is offline or online. So the code is added to wplms customiser, and the taxonomy slug and term is also entered into the grid settings, please see attached screenshot. Im not sure which is the part that i did not follow correctly. Regards.
    #30898
    ulyssesw
    Spectator
    Hi, Any updates on this? Regards.
    #31427
    I had the same problem a while back while working on a client's site, I feel like it should be easier than creting a new taxonomy but since I didn't get any replies from Vibe Team, I decided to go with a custom taxonomy. Just scroll down the page to see a working version, for free courses (gratuitos) and recommended (recomendados): http://beta.kursaronline.com.br/ And also the archive: http://beta.kursaronline.com.br/cursos/gratuitos/ I haven't tested Alex' code, but it's a fairly basic implementation and it should work. 1 - Make sure your text editor is not messing up the code (special attention to single quotes). 2 - Make sure you have,in fact, created the custom taxonomy. Also the wordpress codex is a great resource to get started: https://codex.wordpress.org/Function_Reference/register_taxonomy I hope it helps you
    #31459
    ulyssesw
    Spectator
    Hi urdek, Thanks for the message and info. Im not sure what is the issue im facing, im following exactly what admin has provided. First, i input the code into wplms customiser. The code is 'copied and paste' from what Alex given here. Please see below. And in the post grid settings, i chose courses for the custom post type, and use course-type as the taxonomy slug, and online for the taxonomy term. Please see screen shot 1. These are followed exactly how Alex described. And the result i got, is a Taxonomy mismatch. Screenshot 2. Latiyan said the term i have created, and entered, are different, thus the error. But where is the error?   add_action( 'init', 'course_type_tax' ); function course_type_tax(){ register_taxonomy( 'course-type', array( 'course'), array( 'labels' => array( 'name' => __('Course Type','vibe-customtypes'), 'menu_name' => __('Type','vibe-customtypes'), 'singular_name' => __('Type','vibe-customtypes'), 'add_new_item' => __('Add New Course Type','vibe-customtypes'), 'all_items' => __('All course Types','vibe-customtypes') ), 'public' => true, 'hierarchical' => true, 'show_ui' => true, 'show_in_menu' => 'lms', 'show_admin_column' => true, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'query_var' => 'course-type', 'show_in_nav_menus' => true, 'rewrite' => array( 'slug' => 'course-type' , 'hierarchical' => true, 'with_front' => false ) ) ); }
Viewing 15 posts - 1 through 15 (of 20 total)
  • The topic ‘Course type taxonomy’ is closed to new replies.