Courses missing in appearance > menu

Hey guys,

How you doing today ? :slight_smile:

I have 10 courses, but in appearance > menu, only 5 are showing.

Thx

  • Adam Czajczyk

    Hey Mehdi,

    I hope you're well and great to see again!

    I've tested it with my own test setup and it seems like there's a bug of some kind. I've notified the developer about it and hopefully he'll come up with an update soon. Having said that, I've got a "quick fix" for you.

    This is a "fast workaround" so please note down changes and save the backup copy of an original file. This "fix" involves changing the plugin's code so it will be lost after the plugin's update. That said, either the issue will be resolved by then or you'll need to patch the file again.

    To show more than 5 courses you'll have to alter this file:

    /wp-content/plugins/coursepress/includes/classes/class.menumetabox.php

    You'll find this code around line 73:

    $args = array(
    							'order'          => 'ASC',
    							'post_type'      => 'course',
    							'post_mime_type' => '',
    							'post_parent'    => '',
    							'post_status'    => 'publish',
    						);

    Change it please to:

    $args = array(
    							'order'          => 'ASC',
    							'post_type'      => 'course',
    							'post_mime_type' => '',
    							'post_parent'    => '',
    							'post_status'    => 'publish',
    							'posts_per_page' => '20',
    						);

    Of course you may use a higher or lower value for "posts_per_page" :slight_smile:

    I've attached the patched file for the last CoursePress version for you, so you can simply upload it but please note the changes given above for future reference.

    I hope this helps!

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.