Replace "Detail" text on a CourseList page

Please advise, how to replace "Details" text with another custom page

  • Nastia
    • Support Rock Star

    Hello morfjord

    Hope all is well!

    Please add the following code to teh functions.php of your theme. Please make sure that you have created a child theme and add the code in there. Otherwise, the changes will be lost after an update.

    function change_translate_text( $translated_text, $untranslated_text, $domain ) {
    	// if ( $domain ==  'cp'){
    		if ( trim($untranslated_text) == 'Start Learning' ) {
    			$translated_text = 'Enroll Now';
    		} else if ( trim($untranslated_text) == 'Details' ) {
    			$translated_text = 'Enroll Now';
    		}
    	// }
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20, 3 );

    This will chnage the "Deatils" text to "Enroll Now"

    Let us know how it went!

    Kind regards,
    Nastia

  • Majid
    • Syntax Hero

    Hello morfjord

    You can try using an mu-plugin, instead of inserting the codes inside functions.php create a folder inside /wp-content and call it mu-plugins, then put the codes Nastia provided in a php file and upload them to mu-plugins folder.
    Just one minor change that should be done in the code, is adding the php tag before the code starts.

    <?php
    function change_translate_text( $translated_text, $untranslated_text, $domain ) {
    	// if ( $domain ==  'cp'){
    		if ( trim($untranslated_text) == 'Start Learning' ) {
    			$translated_text = 'Enroll Now';
    		} else if ( trim($untranslated_text) == 'Details' ) {
    			$translated_text = 'Enroll Now';
    		}
    	// }
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20, 3 );

    And make sure you save the file with a .php extension.

    I hope this helps,
    Majid

  • Dimitris
    • Support Star

    Hello there morfjord

    We don't provide any special child-theme for Divi. You can create it just like any other child-theme and add any other templates (coming from plugins, like CoursePress) you need to customize.
    We already made this older version to work for you:
    https://premium.wpmudev.org/forums/topic/using-coursepress-pro-with-the-divi-theme#post-1322882
    I'm not 100% sure about current issue you have though.

    I need a Child theme for Divi builder that works with CoursePress. Divi is the theme that wpmudev is self-recommend, but the newest Divi builder CoursePress child does not work.

    It's not that we recommend Divi, any theme should work with CoursePress.
    Could you please enlighten me here, about the issue you're dealing with, so we can see how to carry on? (most probably this should happen in another thread)
    :slight_smile:

    Warm regards,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.