Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • TickyNucker
    Participant

    I added this code to my child themes functions.php:

    function total_excerpt( $content , $letter_count ){
    $content = strip_shortcodes( $content );
    $content = strip_tags( $content );
    $content = mb_substr( $content, 0 , $letter_count );

    if( strlen( $content ) >= $letter_count ){
    $content .= “…”;
    }
    return $content;
    }

    in reply to: Change sequence of the sections of Homepage #4949
    TickyNucker
    Participant

    Put this in your child themes functions.php

    /*Changes the order of sections on front page.
      Function defined in total-functions.php of the parent theme.*/
    function total_home_section(){
    	$total_home_sections = apply_filters('total_home_sections',
    	array(
    		'slider',
    		'about',
    		'cta',
    		'blog',
    		'team',
    		'service',
    		'testimonial',
    		'featured',
    		'counter',
    		'logo',
    		'portfolio'
    		)
    	);
    	return $total_home_sections;
    }
    in reply to: Horizontal image below the menu (not sliding) #3850
    TickyNucker
    Participant

    If you add this to your child themes file “style.css” does it not work?

    .ht-main-header {
        background-image: url("http://www.yoursite.se/wp-content/uploads/yourphoto.jpg");
    in reply to: Home Screen Sections #3849
    TickyNucker
    Participant

    Add this to the “functions.php” in your child theme:

    function total_home_section(){
    	$total_home_sections = apply_filters('total_home_sections',
    	array(
    		'slider',
    		'about',
    		'cta',
    		'blog',
    		'featured',
    		'team',
    		'service',
    		'testimonial',
    		'counter',
    		'logo',
    		'portfolio'
    		)
    	);
    
    	return $total_home_sections;
    }

    and rearrange as you like (as I have done already).

    in reply to: Changing the word Home in the header #3771
    TickyNucker
    Participant

    The easiest way is to translate the theme to your language. I recommend the plugin Loco Translate: https://wordpress.org/plugins/loco-translate/

    Otherwise, for a quick fix (?) copy the file “total/inc/total-functions.php” to your child directory and change the text on this line: $text[‘home’] = __( ‘Home’, ‘total’ ); // text for the ‘Home’ link

    TickyNucker
    Participant

    Figured out how to do it!

    Made my own “style.php” file in my child theme and placed it in the same file structure as in the parent theme: /inc/style.php
    This is what’s in the file:

    <?php
    /**
     * @package Total-child
     */
    
    function totalchild_primary_color(){
    	$color = get_theme_mod( 'total_template_color', '#FFC107' );
    	$custom_css = "
    	#ht-site-navigation .fa {
    	color:{$color};
    	}
    	";
    return punte_css_strip_whitespace($custom_css);
    }

    In my function.php (in the childtheme) I call this file:
    require get_stylesheet_directory() . '/inc/style.php';

    and add an in-line-style:

    function my_scripts_styles() {
    	wp_enqueue_script( 'jquery-search', get_stylesheet_directory_uri() . '/js/jquery.search.js', array('jquery') );
    	$parent_style = 'total-style'; // This is 'total-style' for the Total theme.
    	wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    	wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') );
    
    	wp_add_inline_style( 'child-style', totalchild_primary_color() );
    }
    add_action( 'wp_enqueue_scripts', 'my_scripts_styles' );

    Done!

    in reply to: Primary Color Keeps Returning to default #3140
    TickyNucker
    Participant

    I have the same problem with the color, but not because of a plug-in. It reverted back after the last theme update. I’m using a child theme.

Viewing 7 posts - 1 through 7 (of 7 total)