do_action( 'learndash-focus-sidebar-nav-before', int $course_id, int $user_id )
Fires before the sidebar nav in the focus template.
Description #
Parameters #
- $course_id
-
(int) Course ID.
- $user_id
-
(int) User ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash-focus-sidebar-nav-before action.
*/
add_action( 'learndash-focus-sidebar-nav-before', 'ld_add_forum_widget', 10, 3 );
function ld_add_forum_widget( $course_id, $user_id ) {
?>
<style>
/* You can modify the widget styling here */
.ld-focus .widget_ldcourseprogress {
padding: .75em 3.125em .75em 1em;
background-color: #eee;
margin-bottom: 0.75em;
}
.ld-focus .widgettitle {
font-size: 1em;
}
</style>
<?php
// Modify the widget title here
$widget_title = 'Discussion Boards';
the_widget( 'LearnDash_Course_Forum_Widget', array( 'title' => $widget_title ) );
};
Changelog #
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |