Why the ID course on [eb_course] is not set to contain get_the_ID() by default
-
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
- The topic ‘Why the ID course on [eb_course] is not set to contain get_the_ID() by default’ is closed to new replies.