shortcode request
-
I was trying to create an assignment link that brings the student to the assignment page (that is unique to them and their submission) from the course page
The assignment page requires the student_ID and lesson_ID to generate the URL:
/wp-admin/admin.php?page=namaste_lesson_homeworks&lesson_id=525&student_id=3
I was curious if you could write a shortcode that could display an action event:
a href=” assignment_URL”> “Name of assignment” </a
and could be called similarly to: [assignment 303] where 303 is entered by the author and is the lesson_id for the assignment.
I believe if the author passes the lesson_ID in using the shortcode, then the only other variable needed to create this navigation to an assignment is user_ID which can be accessed by $user_ID.
I believe the action event would look similar to the following (if the 303 was saved as $user_input):
a href=”/wp-admin/admin.php?page=namaste_lesson_homeworks&lesson_id=<?php echo $user_input?>&student_id=<?php echo $user_ID?>”> “assignment name </a
This would be extremely helpful for me if this type of shortcode could be created!
- The topic ‘shortcode request’ is closed to new replies.