Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #568931

    I was wondering if there is an option to translate the theme. I am using the magazine feature and the links say “read more” instead of “LEER MÁS”.

    Thanks,
    Brad

    #568932

    Sure, you can use https://poedit.net/ to get po/mo files and upload them to /enfold/lang folder.

    #568940

    Hi!

    Please refer to @motylanogha’s post above


    @motylanogha
    Thanks :)

    Regards,
    Yigit

    #610076

    Good morning.
    I was wondering if you could help me troubleshoot an issue I am seeing as it relates to the title of pages in our Learn Dash courses. I am using the functions.php file below but am seeing the title show “Últimas entradas” for course pages instead of the title of the page. This translates to latest entries.

    This code was added to my functions.php file to remove that from articles which worked great. That said, it is still present on course pages inside of our LMS.

    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( $args['title'] == 'Últimas entradas' )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    Thanks so much for your help.

    #610239

    Hi!

    Can you please post the link to your page where you would like to edit your title?

    Best regards,
    Yigit

    #610256

    Please see the link to the page below. Since this is a course you won’t see content unless you are logged in. It still shows the same message though. Thanks for your help.

    #610280

    Hi!

    Can you please try adding following code to Functions.php

    add_filter('avf_title_args', 'fix_single_post_title_cpt', 10, 2);
    function fix_single_post_title_cpt($args,$id)
    {
        if ( $args['title'] == 'Últimas entradas' && is_singular( 'sfwd-courses' ) )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    and replace “sfwd-courses” with your post type

    Regards,
    Yigit

    #611180

    Hi Yigit,
    Thanks for your help. I have tried updating the functions.php file and replaced “sfwd-courses” with “courses”. I believe that is the custom post type for the “courses” feature but can’t be sure.

    In making those changes the title was not updated though.

    Thanks

    #613423

    Hey!

    Please update the code to something like this:

    add_filter('avf_title_args', 'fix_single_post_title_cpt', 10, 2);
    function fix_single_post_title_cpt($args,$id)
    {
        if ( $args['title'] == 'Últimas entradas' || is_singular( 'courses' ) )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    We changed “&&” to “||” . If “courses” is not working, use “sfwd-courses”.

    Best regards,
    Ismael

    #616196

    Unfortunately that didn’t work for me. I tried ‘courses’ and sfwd-courses but neither option changed the page title in the top bar.

    #617502

    Hi!

    can you provide us admin access, so we can check your functions.php, please? post login details here as private reply.

    Regards,
    Andy

    #622841

    Hi Andy,

    Unfortunately I can’t provide login access to the admin panel of our site but I have listed the functions.php code that exists on the site today.

    I could do a screenshare with you if you have some time available. I left my contact info in the pm section as well.

    Thanks for your help.

    Functions.php file

    <?php // Opening PHP tag - nothing should be before this, not even whitespace
    
    // Custom Function to Include
    function favicon_link() {
        echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n";
    }
    add_action( 'wp_head', 'favicon_link' );
    
    add_filter('avf_which_archive_output','avf_change_which_archive', 10, 3);
    function avf_change_which_archive($output)
    {
    	if(is_category())
    	{
    		$output = __('','avia_framework').' '.single_cat_title('',false);
    	}
    
    	return $output;
    }
    
    add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 );
    
    function avia_append_search_nav ( $items, $args )
    	{	
    		if(avia_get_option('header_searchicon','header_searchicon') != "header_searchicon") return $items;
    	
    	    if ((is_object($args) && $args->theme_location == 'avia') || (is_string($args) && $args = "fallback_menu"))
    	    {
    	        global $avia_config;
    	        ob_start();
    			$getform = get_search_form(false);
    
    	        $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown">'.$getform.'</li>';
    	    }
    	    return $items;
    	}
    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( $args['title'] == 'Blog - Latest News' )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }
    
    add_action('wp_head' , 'remove_post_list_title_links');
    function remove_post_list_title_links() {
    	?>
    	<script id="remove-links-in-title" type="text/javascript">
    		jQuery(document).ready(function($) {
    			$('.entry-title').each(function() {
    				var $title_link = $('a[rel="bookmark"]' , $(this)),
    					$title_text = $title_link.text();
    				$title_link.remove();
    				$(this).prepend($title_text);
    			});
    		});
    	</script>
    	<?php
    }
    
    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    function bbp_tinymce_paste_plain_text( $plugins = array() ) {
     	$plugins[] = 'paste';
        return $plugins;
    }
    add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );
    
    add_action ('bbp_template_before_forums_index' , 'my_intro' ) ;
    Function my_intro () {
    Echo '<div class="entry-content">Welcome to the ACEDS Forum. Please take time to review our terms of use before posting on the forum. Thank you for helping make this community!</div>' ;
    }
    #624561

    Hi,

    Could be because of the accent in Ultimas, does the code works on the English version of the site?

    Best regards,
    Josue

    #624565

    Hi Josue,

    I have posted our English functions.php file below. This is working correctly so it is just the Spanish site that has the problem.

    <?php // Opening PHP tag - nothing should be before this, not even whitespace
    
    // Custom Function to Include
    function favicon_link() {
        echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n";
    }
    add_action( 'wp_head', 'favicon_link' );
    
    add_filter('avf_which_archive_output','avf_change_which_archive', 10, 3);
    function avf_change_which_archive($output)
    {
    	if(is_category())
    	{
    		$output = __('','avia_framework').' '.single_cat_title('',false);
    	}
    
    	return $output;
    }
    
    add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 );
    
    function avia_append_search_nav ( $items, $args )
    	{	
    		if(avia_get_option('header_searchicon','header_searchicon') != "header_searchicon") return $items;
    	
    	    if ((is_object($args) && $args->theme_location == 'avia') || (is_string($args) && $args = "fallback_menu"))
    	    {
    	        global $avia_config;
    	        ob_start();
    			$getform = get_search_form(false);
    
    	        $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown">'.$getform.'</li>';
    	    }
    	    return $items;
    	}
    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( $args['title'] == 'Blog - Latest News' )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }
    
    add_action('wp_head' , 'remove_post_list_title_links');
    function remove_post_list_title_links() {
    	?>
    	<script id="remove-links-in-title" type="text/javascript">
    		jQuery(document).ready(function($) {
    			$('.entry-title').each(function() {
    				var $title_link = $('a[rel="bookmark"]' , $(this)),
    					$title_text = $title_link.text();
    				$title_link.remove();
    				$(this).prepend($title_text);
    			});
    		});
    	</script>
    	<?php
    }
    
    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    function bbp_tinymce_paste_plain_text( $plugins = array() ) {
     	$plugins[] = 'paste';
        return $plugins;
    }
    add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );
    
    add_action ('bbp_template_before_forums_index' , 'my_intro' ) ;
    Function my_intro () {
    Echo '<div class="entry-content">Welcome to the ACEDS Forum. Please take time to review our terms of use before posting on the forum. Thank you for helping make this community!</div>' ;
    }
    #624628

    It’s because of the accent then, try changing the “U” for:

    &Uacute;

    Best regards,
    Josue

    #625537

    Hi Josue,

    I have tried several variations of this but haven’t had any luck getting the title to change for my spanish translation yet.

    Is this what you had recommended using?

    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( $args['title'] == '&Uacute;ltimas entradas' )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    I have also tried this

    
    add_filter('avf_title_args', 'fix_single_post_title_cpt', 10, 2);
    function fix_single_post_title_cpt($args,$id)
    {
        if ( $args['title'] == '&Uacute;ltimas entradas' || is_singular( 'courses' ) )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }
    #627101

    Hi,

    I believe your courses slug is sfwd-courses. Try using that instead.

    Best regards,
    Josue

    #627126

    I have tried this and a few other slugs but wasn’t able to get anything to work.

    add_filter('avf_title_args', 'fix_single_post_title_cpt', 10, 2);
    function fix_single_post_title_cpt($args,$id)
    {
        if ( $args['title'] == '&Uacute;ltimas entradas' || is_singular( 'sfwd-courses' ) )
        {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    The URL of the page is http://www.delitosfinancieros.org/courses/ecnbvm/ and the class that shows up in the body tag is:
    single single-sfwd-courses postid-15661 logged-in admin-bar stretched helvetica-neue-websave _helvetica_neue customize-support

    I’m not sure where a course slug can be found but I also tried single-sfwd-courses.

    Thanks for your help.

    #627128

    Hi,

    Have you tried excluding the first condition, like:

        if ( is_singular( 'sfwd-courses' ) )
    

    Best regards,
    Josue

    #627133

    I have changed this from is_singular to just is but that didn’t do anything. I’m not familiar with what I need to change.

    #627164

    I’d like to to help you with this but at this point i’d need FTP access to test multiples codes and see which one can work.

    #633329

    Sorry for the delay in getting a login for you. I have setup another environment for you to test things in.

    Thanks again for your help.

    • This reply was modified 8 years, 7 months ago by bsomme1.
    #633733

    Hey!

    I’m sorry but the wp-admin credentials are not working. What is the password to this page (http://www.delitosfinancieros.org/courses/ecnbvm/)? I can’t find it anywhere in the thread. We added the code again in the functions.php file of the child theme but it’s not working. Is the functions.php located in the enfold-child folder?

    Cheers!
    Ismael

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