Home Forums Free Themes Education Hub Quick Links Text & Notice URL

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4519
    minxshoals
    Participant

    Hello. Very nice theme. I have two questions.
    1. Is there any way to change the text for the “Quick Links” menu? I would like the menu to be show different text if possible. i.e., About Us

    2. Is it possible to have the Notice URL open in a new page/tab? I would like my link to go off-site.

    Thank you!

    #4541
    wensolutions
    Keymaster

    Hello @minxhoals,
    You can use a WordPress function which translates texts (https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext). For example:
    Inorder to change Quick Links to About Us, add the below codes in ‘functions.php’ of child theme.

    add_filter( 'gettext', 'theme_change_field_names', 20, 3 );
    function theme_change_field_names( $translated_text, $text, $domain ) {
    
        if ( is_page() ) {
    
            switch ( $translated_text ) {
    
                case 'Quick Links' :
    
                    $translated_text = __( 'About Us', 'education-hub' ); 
                    break;
            }
    
        }
    
        return $translated_text;
    }

    Next, in child theme, to have the Notice URL open in a new page/tab Go to inc > hook > custom.php line 55 and and replace the following code
    <a href="<?php echo esc_url( education_hub_get_option

    by <a target="_blank" href="<?php echo esc_url( education_hub_get_option

    Note: If you haven’t created child theme before here’s a guide:
    https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.