Forum Replies Created
- AuthorPosts
- TickyNuckerParticipant
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;
}TickyNuckerParticipantPut 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; }
TickyNuckerParticipantIf 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");
TickyNuckerParticipantAdd 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).
TickyNuckerParticipantThe 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
September 15, 2017 at 1:44 pm in reply to: How to make the Theme Primary Color in Total work with added child CSS #3434TickyNuckerParticipantFigured 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!
TickyNuckerParticipantI 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.
- AuthorPosts