• Resolved Nugroho

    (@nuggix)


    I’m trying to use your plugin to sync Moodle to WordPress.

    I find you don’t set the width of the container for the archive and the single course page.

    Therefore, I use Divi Builder to adjust the layout of the single course pages to make them look neat, but when I use the [eb_course] shortcode the result is blank. I tried to look at your code and found the id course, you set it blank.

    The code is like this in “edwiser-bridge/public/shortcodes/class-eb-shortcode-course.php”

    extract($atts = shortcode_atts(apply_filters('eb_output_course_defaults', array(
      'id' => ''
    )), $atts));
    
    //Course id required.
    if (!isset($atts['id']) || !is_numeric($atts['id'])) {
       return;
    }

    Why not just make it like this?

    'id' => get_the_ID()

    So that the shortcode will not display blank when the id is not filled.

    My question is, will there be a fix for the problem? If not, how can I do the repair myself (the best step I can do)?

    I am currently changing the code in your plugin, I know this is not good because the changes that I made can be lost if there is a plugin update, so please advise.

    thank you

    • This topic was modified 4 years, 8 months ago by Nugroho. Reason: penambahan di kalimat terakhir
Viewing 1 replies (of 1 total)
  • Plugin Author WisdmLabs

    (@wisdmlabs)

    Hello @nuggix

    I hope you are doing well.

    get_the_ID this will return the page id in which the shortcode is added. So to get the course id whose information we are going to display on the page, should be provided from somewhere and this is what this shortcode does.

    We can surely assist you. Could you tell me more about this? You can drop an email at [email protected]

    Regards,
    Vrushabh Mudhale
    Team Edwiser

Viewing 1 replies (of 1 total)
  • The topic ‘Why the ID course on [eb_course] is not set to contain get_the_ID() by default’ is closed to new replies.