• Hi.
    I want to remove course page in learnpress and creat my own landing page.
    How can i do this?
    after that i want to replace my own landing page to all of my courses and disable to automatically creation course page by learnpress.

    and do this tgings on Event creation.

    Everybody can help me?

    thanks a lot

Viewing 7 replies - 1 through 7 (of 7 total)
  • For your first question, you have to grab the learnpress folder inside de plugin that has all the templates and copy it to you theme or child theme. Then you can modify the landing page for the courses. You can use the plugin called “show current template” to which one you have to modify. At least, that is how I did it.

    Thread Starter asayesh2005

    (@asayesh2005)

    thank you so much.
    I use eduma theme and when i want to create a online course in learnpress, the learnpress automatically creat a link of course in this link:
    https://www.*.com/course/
    for example when i want creat 3 online course, learnpress do this:
    https://www.*.com/course/course1
    https://www.*.com/course/course2
    https://www.*.com/course/course3

    I dont want to use this page https://www.*.com/course/ to show as an landing page of my whole course.
    I want creat my own landing page to replace this page:
    https://www.*.com/course/
    and after that creat my own landing page to replace these pages:
    https://www.*.com/course/course1

    https://www.*.com/course/course2

    https://www.*.com/course/course3

    how can i do that?

    Hi,

    If I’m not mistaken, the pages you want to replace are the pages on which students can enroll? (Curriculum, review, enroll,…)?

    I don’t think it’s possible, you can’t change the structure of the plugin.
    However, you can add your own landing page ‘in between’
    I have removed the courses menu page (because that template suddenly didn’t work anymore and this forum couldn’t bring a solution) and use my own page with a foogallery in it (as a courses menu). In foogallery, every course has its own link to the course.
    In the foogallery, you can add links to landingpages you’ve created. However, to enroll, you still have to forward to the LP template.

    Could this be answering your question?

    Thread Starter asayesh2005

    (@asayesh2005)

    Hi… thank you.

    but some person replace his own template in course page.
    How can I do this?

    Yes the plugin includes the template files in the /learnpress folder, however you need basic skills in php for changing some stuff. If you want to completely modify it, advanced skills are needed for you to accomplish it.

    I only managed to modify stuff, for example, removing price tag from the courses page, and removing tabs in the course landing page… stuff like that.

    • This reply was modified 5 years, 12 months ago by marbaque.

    Hello every body

    I have a problem in learn press. I cant see courses in my page. I checked erro and it was:

    ” otice: Undefined variable: layout in /home2/transla6/public_html/wp-content/themes/eduma/inc/widgets/courses/courses.phpon line 289( $layout .= ‘-v3’;)


    <?php

    /**
    * Class Courses_Widget
    *
    * Widget Name: Courses
    *
    * Author: Ken
    */
    if (!class_exists(‘Thim_Courses_Widget’)) {
    class Thim_Courses_Widget extends Thim_Widget {
    function __construct() {
    $list_cat = $this->thim_get_course_categories();
    $list_all_cat = array( ‘all’ => esc_html__( ‘All’, ‘eduma’ ) ) + $list_cat;
    parent::__construct(
    ‘courses’,
    esc_html__( ‘Thim: Courses’, ‘eduma’ ),
    array(
    ‘description’ => esc_html__( ‘Display courses’, ‘eduma’ ),
    ‘help’ => ”,
    ‘panels_groups’ => array( ‘thim_widget_group’ ),
    ‘panels_icon’ => ‘thim-widget-icon thim-widget-icon-courses’
    ),
    array(),
    array(
    ‘title’ => array(
    ‘type’ => ‘text’,
    ‘label’ => esc_html__( ‘Heading Text’, ‘eduma’ ),
    ‘default’ => esc_html__( ‘Latest Courses’, ‘eduma’ ),
    ‘allow_html_formatting’ => true
    ),

    ‘order’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Order By’, ‘eduma’ ),
    ‘options’ => array(
    ‘popular’ => esc_html__( ‘Popular’, ‘eduma’ ),
    ‘latest’ => esc_html__( ‘Latest’, ‘eduma’ ),
    ‘category’ => esc_html__( ‘Category’, ‘eduma’ )
    ),
    ‘default’ => ‘latest’,
    ‘state_emitter’ => array(
    ‘callback’ => ‘select’,
    ‘args’ => array( ‘order’ )
    ),
    ),
    ‘cat_id’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Select Category’, ‘eduma’ ),
    ‘default’ => ‘all’,
    ‘hide’ => true,
    ‘options’ => $list_all_cat,
    ‘state_handler’ => array(
    ‘order[category]’ => array( ‘show’ ),
    ‘order[popular]’ => array( ‘hide’ ),
    ‘order[latest]’ => array( ‘hide’ ),
    ),
    ),
    ‘layout’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Widget Layout’, ‘eduma’ ),
    ‘options’ => array(
    ‘slider’ => esc_html__( ‘Slider’, ‘eduma’ ),
    ‘grid’ => esc_html__( ‘Grid’, ‘eduma’ ),
    ‘grid1’ => esc_html__( ‘Grid New’, ‘eduma’ ),
    ‘list-sidebar’ => esc_html__( ‘List Sidebar’, ‘eduma’ ),
    ‘megamenu’ => esc_html__( ‘Mega Menu’, ‘eduma’ ),
    ‘tabs’ => esc_html__( ‘Category Tabs’, ‘eduma’ ),
    ‘tabs-slider’ => esc_html__( ‘Category Tabs Slider’, ‘eduma’ ),
    ),
    ‘default’ => ‘slider’,
    ‘state_emitter’ => array(
    ‘callback’ => ‘select’,
    ‘args’ => array( ‘layout_type’ )
    ),
    ),
    ‘thumbnail_width’ => array(
    ‘type’ => ‘slider’,
    ‘label’ => esc_html__( ‘Thumbnail Width’, ‘eduma’ ),
    ‘default’ => 400,
    ‘min’ => 100,
    ‘max’ => 800,
    ‘integer’ => true,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘show’ ),
    ‘layout_type[grid]’ => array( ‘show’ ),
    ‘layout_type[grid1]’ => array( ‘show’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘show’ ),
    ‘layout_type[tabs-slider]’ => array( ‘show’ ),
    ‘layout_type[megamenu]’ => array( ‘hide’ ),
    ),
    ),
    ‘thumbnail_height’ => array(
    ‘type’ => ‘slider’,
    ‘label’ => esc_html__( ‘Thumbnail Height’, ‘eduma’ ),
    ‘default’ => 300,
    ‘min’ => 100,
    ‘max’ => 800,
    ‘integer’ => true,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘show’ ),
    ‘layout_type[grid]’ => array( ‘show’ ),
    ‘layout_type[grid1]’ => array( ‘show’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘show’ ),
    ‘layout_type[tabs-slider]’ => array( ‘show’ ),
    ‘layout_type[megamenu]’ => array( ‘hide’ ),
    ),
    ),
    ‘limit’ => array(
    ‘type’ => ‘number’,
    ‘label’ => esc_html__( ‘Limit number course’, ‘eduma’ ),
    ‘default’ => ‘8’
    ),
    ‘featured’ => array(
    ‘type’ => ‘checkbox’,
    ‘label’ => esc_html__( ‘Featured’, ‘eduma’ ),
    ‘description’ => esc_html__( ‘Only display featured courses’, ‘eduma’ ),
    ‘default’ => false
    ),
    ‘view_all_courses’ => array(
    ‘type’ => ‘text’,
    ‘label’ => esc_html__( ‘Text View All Courses’, ‘eduma’ ),
    ‘default’ => ”,
    ‘hide’ => true,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘hide’ ),
    ‘layout_type[grid]’ => array( ‘show’ ),
    ‘layout_type[grid1]’ => array( ‘show’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘hide’ ),
    ‘layout_type[tabs-slider]’ => array( ‘show’ ),
    ),
    ),
    ‘view_all_position’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘View All Position’, ‘eduma’ ),
    ‘options’ => array(
    ‘top’ => esc_html__( ‘Top’, ‘eduma’ ),
    ‘bottom’ => esc_html__( ‘Bottom’, ‘eduma’ ),
    ),
    ‘default’ => ‘top’,
    ‘hide’ => true,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘hide’ ),
    ‘layout_type[grid]’ => array( ‘show’ ),
    ‘layout_type[grid1]’ => array( ‘show’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘hide’ ),
    ‘layout_type[tabs-slider]’ => array( ‘show’ ),
    ‘layout_type[megamenu]’ => array( ‘hide’ ),
    ),
    ),
    ‘slider-options’ => array(
    ‘type’ => ‘section’,
    ‘label’ => esc_html__( ‘Slider Layout Options’, ‘eduma’ ),
    ‘hide’ => true,
    “class” => “clear-both”,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘show’ ),
    ‘layout_type[grid]’ => array( ‘hide’ ),
    ‘layout_type[grid1]’ => array( ‘hide’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘hide’ ),
    ‘layout_type[tabs-slider]’ => array( ‘hide’ ),
    ‘layout_type[megamenu]’ => array( ‘hide’ ),
    ),
    ‘state_emitter’ => array(
    ‘callback’ => ‘select’,
    ‘args’ => array( ‘courses_slider_opt’ )
    ),
    ‘fields’ => array(
    ‘show_pagination’ => array(
    ‘type’ => ‘checkbox’,
    ‘label’ => esc_html__( ‘Show Pagination’, ‘eduma’ ),
    ‘default’ => false
    ),
    ‘show_navigation’ => array(
    ‘type’ => ‘checkbox’,
    ‘label’ => esc_html__( ‘Show Navigation’, ‘eduma’ ),
    ‘default’ => true
    ),
    ‘item_visible’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Items Visible’, ‘eduma’ ),
    ‘options’ => array(
    ‘1’ => ‘1’,
    ‘2’ => ‘2’,
    ‘3’ => ‘3’,
    ‘4’ => ‘4’,
    ‘5’ => ‘5’,
    ‘6’ => ‘6’,
    ),
    ‘default’ => ‘4’
    ),
    ‘auto_play’ => array(
    ‘type’ => ‘number’,
    ‘label’ => esc_html__( ‘Auto Play Speed (in ms)’, ‘eduma’ ),
    ‘description’ => esc_html__( ‘Set 0 to disable auto play.’, ‘eduma’ ),
    ‘default’ => ‘0’
    ),
    ),

    ),

    ‘grid-options’ => array(
    ‘type’ => ‘section’,
    ‘label’ => esc_html__( ‘Grid Layout Options’, ‘eduma’ ),
    ‘hide’ => true,
    “class” => “clear-both”,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘hide’ ),
    ‘layout_type[grid]’ => array( ‘show’ ),
    ‘layout_type[grid1]’ => array( ‘show’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[megamenu]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘hide’ ),
    ‘layout_type[tabs-slider]’ => array( ‘hide’ ),
    ),
    ‘state_emitter’ => array(
    ‘callback’ => ‘select’,
    ‘args’ => array( ‘courses_grid_opt’ )
    ),
    ‘fields’ => array(
    ‘columns’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Columns’, ‘eduma’ ),
    ‘options’ => array(
    ‘1’ => ‘1’,
    ‘2’ => ‘2’,
    ‘3’ => ‘3’,
    ‘4’ => ‘4’,
    ‘5’ => ‘5’,
    ‘6’ => ‘6’,
    ),
    ‘default’ => ‘4’
    ),

    ),

    ),

    ‘tabs-options’ => array(
    ‘type’ => ‘section’,
    ‘label’ => esc_html__( ‘Tabs Options’, ‘eduma’ ),
    ‘hide’ => true,
    “class” => “clear-both”,
    ‘state_handler’ => array(
    ‘layout_type[slider]’ => array( ‘hide’ ),
    ‘layout_type[grid]’ => array( ‘hide’ ),
    ‘layout_type[grid1]’ => array( ‘hide’ ),
    ‘layout_type[list-sidebar]’ => array( ‘hide’ ),
    ‘layout_type[tabs]’ => array( ‘show’ ),
    ‘layout_type[tabs-slider]’ => array( ‘show’ ),
    ),
    ‘state_emitter’ => array(
    ‘callback’ => ‘select’,
    ‘args’ => array( ‘courses_tabs_opt’ )
    ),
    ‘fields’ => array(
    ‘limit_tab’ => array(
    ‘type’ => ‘number’,
    ‘label’ => esc_html__( ‘Limit Items Per Tab’, ‘eduma’ ),
    ‘default’ => ‘4’
    ),
    ‘cat_id_tab’ => array(
    ‘type’ => ‘select’,
    ‘label’ => esc_html__( ‘Select Category Tabs’, ‘eduma’ ),
    ‘default’ => ‘all’,
    ‘multiple’ => true,
    ‘hide’ => true,
    ‘options’ => $list_cat,
    ),
    ),

    ),

    )
    );
    }

    function get_template_name( $instance ) {
    if ( $instance[‘layout’] && ” != $instance[‘layout’] ) {
    $layout = $instance[‘layout’];
    }
    if ( thim_is_new_learnpress( ‘3.0’ ) ) {
    $layout .= ‘-v3’;
    } else if ( thim_is_new_learnpress( ‘2.0’ ) ) {
    $layout .= ‘-v2’;
    } else if ( thim_is_new_learnpress( ‘1.0’ ) ) {
    $layout .= ‘-v1’;
    }
    return $layout;
    }

    function get_style_name( $instance ) {
    return false;
    }

    // Get list category
    function thim_get_course_categories( $cats = false ) {
    global $wpdb;
    $query = $wpdb->get_results( $wpdb->prepare(

    SELECT t1.term_id, t2.name
    FROM $wpdb->term_taxonomy AS t1
    INNER JOIN $wpdb->terms AS t2 ON t1.term_id = t2.term_id
    WHERE t1.taxonomy = %s
    AND t1.count > %d
    “,
    ‘course_category’, 0
    ) );

    if ( empty( $cats ) ) {
    $cats = array();
    }
    if ( !empty( $query ) ) {
    foreach ( $query as $key => $value ) {
    $cats[$value->term_id] = $value->name;
    }
    }

    return $cats;
    }

    }
    }

    function thim_courses_register_widget() {
    register_widget( ‘Thim_Courses_Widget’ );
    }

    add_action( ‘widgets_init’, ‘thim_courses_register_widget’ );

    I am confused, after finishing up my courses, my courses are only displayed on course page. I tried to display it on the homepage, but it was not working and I also tried the short code to display the courses on homepage but it still did not work. But I tried another LMS shortcode and it displayed on my homepage.
    I am using Astra theme and my website is frabizacademy.com
    Please, it’s so urgent

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘remove courses page in learnpress’ is closed to new replies.