Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Long Nguyen 2 months, 1 week ago.

Assisted by: Long Nguyen.

Author Posts
October 15, 2024 at 6:26 am

kimberlyH-5

Background of the issue:
I have crewet the change the course page in program but show show under course please check it. I was trying to update the course page in the program. URL: hidden link

Symptoms:
The updated course page is not displaying as expected under the course section.

Questions:
Why is the updated course page not showing under the course section?

October 15, 2024 at 8:10 am
October 15, 2024 at 9:22 am #16289648

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I can replicate the issue on a clean installation of WordPress. It is a compatibility issue between WPML and Tutor LMS. I'm discussing this with our 2nd tier support and update you here when I have something to share.

Thanks.

October 16, 2024 at 5:17 am #16293145

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

There is a workaround to fix the permalink of the translation Program (course) page in the language switcher. Please follow steps below:

1. Add the code below to the file functions.php in the theme/child theme folder

add_filter( 'post_type_archive_link', 'wssupp_filter_archive_link', 10, 2 );
function wssupp_filter_archive_link( $link, $post_type = '' ){
	
	if ( 'courses' === $post_type ) {
		
		$current_language = apply_filters( 'wpml_current_language', NULL );
		$default_language = apply_filters( 'wpml_default_language', NULL );

		if ( $current_language != $default_language ){
			
			$tutor_options = get_option('tutor_option');
			
			if ( isset($tutor_options['course_archive_page']) && is_numeric($tutor_options['course_archive_page']) ) {
				
				$link = get_permalink( $tutor_options['course_archive_page'] );
			}
		}		
	}
	
	return $link;
}

2. Go to WPML > String Translation > Translate texts in admin screen > Find option "[tutor_option]course_archive_page" > Add it to String Translation.

3. Go to WPML > String Translation > Translate the Program (course) page ID.

Feel free to test this on the sandbox site hidden link

Refer documentation https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

Looking forward to your reply.
Thanks

The topic ‘[Closed] I have crewet the change the course page in program but show show under course please check it.’ is closed to new replies.