Circle progress bar in my own theme

Hello I use my own theme, but how can I use the style in the circle progress bar in units?

I mean now with my theme just appears the number but not the circle style and effect, so how can I used the same style with my own theme?

  • Sajid

    Hi @lea4,

    Hope you are doing good today :slight_smile:

    It uses jQuery knob utility to create circle effect of progress. If you wish to use the same effect then copy the archive-unit.php file in your theme and edit the html to match with your theme.

    This is the code that is responsible to generate the progress bar in archive-unit.php

    $unit_progress = do_shortcode( '[course_unit_percent course_id="' . $course_id . '" unit_id="' . $unit_id . '" format="true" style="extended"]' );

    You can also find more details about jquery knob here.
    http://anthonyterrien.com/knob/

    Feel free to post a reply if you need further assistance :slight_smile:
    Cheers, Sajid

  • lea

    Hi, I'm going to add the shortcode for my theme to not add another library, but know I add the shortcode in the archive-unit, but nothing change, I test the file adding a class on a element html but nothing change, I add all the permission to the file but still nothing, I try modifing the shortcode in class.shortcodes but nothing change, what can i do? I user the virtual page in that page because in settings I can select my own page, so What is the file that I need to modify? or why if I made changes doesn't appear any change?

  • Sajid

    Hi @lea4,
    Hope you are doing good today :slight_smile:

    I tested again and archive-unit.php file is being loaded for units archive page. To make sure its exactly the same file just copy archive-unit.php file from wp-content/plugins/coursepress/themes/coursepress.

    The reason I am asking to use the template from your theme and not edit the plugin files directly is your changes will be safe when you will update the plugin. In this case you have to keep that file safe some where before updating the plugin and make those changes again.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:
    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.