Title: John's Replies | WordPress.org

---

# John

  [  ](https://wordpress.org/support/users/artoftech/)

 *   [Profile](https://wordpress.org/support/users/artoftech/)
 *   [Topics Started](https://wordpress.org/support/users/artoftech/topics/)
 *   [Replies Created](https://wordpress.org/support/users/artoftech/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/artoftech/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/artoftech/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/artoftech/engagements/)
 *   [Favorites](https://wordpress.org/support/users/artoftech/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 47 total)

1 [2](https://wordpress.org/support/users/artoftech/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/artoftech/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/artoftech/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/artoftech/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Two separate course archives?](https://wordpress.org/support/topic/two-separate-course-archives/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/two-separate-course-archives/#post-18410112)
 * Thank you for the follow-up Brianvu-tp.
 * After having purchased the Collections add-on, I have discovered a better way
   to do this via the List Courses Widget. It actually simulates the all courses
   archive perfectly if using Elementor, can be customized much easier than the 
   Collections.
 * If someone else is considering this, my advise is to take a look at the widget
   first…
 * Best,
   John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Two separate course archives?](https://wordpress.org/support/topic/two-separate-course-archives/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/two-separate-course-archives/#post-18399813)
 * Hi Brianvu-tp,
   This was one thought, but after experimenting we have decided 
   on using a combination of the collections and course archive with filtering.
 * Best,
   John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Two separate course archives?](https://wordpress.org/support/topic/two-separate-course-archives/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/two-separate-course-archives/#post-18397697)
 * Hello Brianvu-tp,
 * Thanks for the response. Given that we cant have 2 course archives for the same
   site, that was my first thought, but I am experimenting with separating the 2
   collections and just having one use filters. The other set is smaller and we 
   may be able to get away without. In any case; If that doesn’t work out, we might
   consider 2 distinct sites under separate subdomains.
 * As always, your support is appreciated!
 * John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Two separate course archives?](https://wordpress.org/support/topic/two-separate-course-archives/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/two-separate-course-archives/#post-18395824)
 * Thank you Brianvu-tp,
   Then I’m guessing maybe a subdomain each with it’s own 
   LP installation is the only way at this point:[https://mydomain/collection1](https://mydomain/collection1)(
   with all-courses archive/filters)[https://mydomain/collection2](https://mydomain/collection2)(
   with separate all-courses archive and filters)
 * Let me know if this isn’t reasonable.
 * Best,
   John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Mobile filter](https://wordpress.org/support/topic/mobile-filter-3/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/mobile-filter-3/#post-18346440)
 * Ok, thanks to you both I got this working now. Had to do a Google Translate but
   got the gist giann3464.
 * Gracias!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Duplicate course – one unreg, one registered w/cert](https://wordpress.org/support/topic/duplicate-course-one-unreg-one-registered-w-cert/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/duplicate-course-one-unreg-one-registered-w-cert/#post-18325863)
 * Now that I unassigned my self from a course I see that if I am logged in, it 
   defaults to this behavior already. Slick!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Appending text (instructions) under the filter](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/#post-18313803)
 * Minor thing after updating to **4.2.7.8**
 * The filter loads this correctly the first time, and then clicking on any filter
   item, adds it a second time as another div. Subsequent clicks don’t add it again
   however. Checking for existence doesn’t seem to help, but I’m not sure I’m doing
   the check correctly:
 *     ```wp-block-code
       if (!isset($wrapper['attribution'])) { ... }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Appending text (instructions) under the filter](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/#post-18307266)
 * Please note: 
   Before this update the hook name for apply_filters was: learn-press/
   filter-courses/sections/wrapper
 * this is now: lp/filter-courses/sections/wrapper
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Appending text (instructions) under the filter](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/#post-18307192)
 * All good after updating to **4.2.7.7**
 * Thanks as always!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Appending text (instructions) under the filter](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/#post-18304672)
 * Much appreciated. I will set up a test instance and check…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Appending text (instructions) under the filter](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/appending-text-instructions-under-the-filter/#post-18301958)
 * Hi Brianvu-tp,
   Thanks for the quick response! This does work, however it adds
   a piece of text: “attribution” at the top of the filter in this case. This comes
   from the wrapper array defined on the first line b/c I can change it and it displays
   whatever is in the bracket notation. Here is the code structure from an inspect:
 *     ```wp-block-code
       <form class="lp-form-course-filter">    "attribution"    <div class="lp-form-course-filter__item">        <div class="lp-form-course-filter__title">Search</div>	...lots omitted...    <button type="submit" class="course-filter-submit">Filter</button>    <button class="course-filter-reset">Reset</button>    <div class="attribution-notice">       "*Authored in part by the attributed..."    </div></form>	
       ```
   
 * Appreciate any additional clarification.
   John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Course Archive – section top mods](https://wordpress.org/support/topic/course-archive-section-top-mods/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/course-archive-section-top-mods/#post-18275555)
 * Hi, I corrected a few things and got this to work:
 *     ```wp-block-code
       add_filter('learn-press/layout/list-courses/item/section/bottom', function($section_bottom, $course, $settings) {    $html_tags = $course->tags[0]->name; //since we only have one tag don't need to loop the array    if ( ! empty( $html_tags ) ) {    	$html_tags = sprintf(        	'<div>%s</div>',        	$html_tags     	);    }    $custom_field = get_post_meta( $course->get_id(), 'lp_alt_title', true);    if($custom_field != '') {        $alt_title =  sprintf(        	'<div class="all-courses-alt-title">%s%s%s</div>',        	"(",        	$custom_field,        	")"        );    }    array_splice($section_bottom, 2, 0, $alt_title);    array_splice($section_bottom, 6, 0, $html_tags);    return $section_bottom;}, 10, 3); 
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Course Arhive default sort](https://wordpress.org/support/topic/course-arhive-default-sort/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/course-arhive-default-sort/#post-18261362)
 * Thanks Brianvu-tp, 
   Works a charm!Best,John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Add to archive sorting](https://wordpress.org/support/topic/add-to-archive-sorting/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/add-to-archive-sorting/page/2/#post-18256752)
 * Hello,
   Again for anyone following along I’m posting the final solution that support
   from ThimPress helped me craft:
 *     ```wp-block-code
       /* Add new Tag sorting option */function oht_create_new_tag_sort_option( $order_by ) {   $order_by = array(        //New sort option        'course_tag'      => esc_html__( 'Page Number', 'learnpress' ),        //Remaining used sort options    	'post_date'       => esc_html__( 'Newly published', 'learnpress' ),    	'post_title'      => esc_html__( 'Title a-z', 'learnpress' ),    	'post_title_desc' => esc_html__( 'Title z-a', 'learnpress' ),    	'popular'         => esc_html__( 'Popular', 'learnpress' )   );   return $order_by;}/* Handle the query to sort by course tag */add_filter('lp/courses/filter/order_by/course_tag', 'query_order_by_tag');function query_order_by_tag(LP_Course_Filter $filter): LP_Course_Filter {    $lp_course_db = LP_Course_DB::getInstance();    $filter->join[] = "INNER JOIN $lp_course_db->tb_term_relationships rel ON p.ID = rel.object_id";    $filter->join[] = "INNER JOIN $lp_course_db->tb_terms terms ON rel.term_taxonomy_id = terms.term_id";    $filter->where[] = "AND terms.slug LIKE 'page-%'";    $filter->group_by = "p.ID";    $filter->order_by = "SUBSTR(terms.slug,6,2)+0";    $filter->order = "ASC";    return $filter;}
       ```
   
 * Thanks again for your stellar support!
 * Best,
   John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[LearnPress - WordPress LMS Plugin for Create and Sell Online Courses] Add to archive sorting](https://wordpress.org/support/topic/add-to-archive-sorting/)
 *  Thread Starter [John](https://wordpress.org/support/users/artoftech/)
 * (@artoftech)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/add-to-archive-sorting/page/2/#post-18254387)
 * Do you mean this site? [https://help.thimpress.com/](https://help.thimpress.com/)

Viewing 15 replies - 1 through 15 (of 47 total)

1 [2](https://wordpress.org/support/users/artoftech/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/artoftech/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/artoftech/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/artoftech/replies/page/2/?output_format=md)