Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ToniLlordes

    (@tonillordes)

    many thanks, Kharis, but I must be doing something wrong because I can’t even make my child theme work. I don’t have any idea of php or any other code so it must be a very simple thing I’m missing.

    I’ve tried to follow the instructions to make the child theme by creating a solon-child folder in the themes folder. (I’ve created the style.css and functions.php files as specified. Afterwards, in the functions.php file I’ve added the code you have posted and finally I have uploaded both files to the solon-child folder.)

    The solon child theme appears in the wordpress backend among the rest.
    However when I try to preview or activate the child theme the screen goes blank.

    Even though I’ve been over it a couple of times, I can’t see what I’m doing wrong.

    I’m posting both files, in case you can help. Thanks in advance.

    style.css

    /*
     Theme Name:   Solon Child
     Theme URI:    http://example.com/twenty-fifteen-child/
     Description:  Solon Child Theme
     Author:       John Doe
     Author URI:   http://example.com
     Template:     solon
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     License URI:  http://www.gnu.org/licenses/gpl-2.0.html
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  solon-child
    */

    And functions.php:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    
    function solon_posted_on() {
    	$time_string = '<time class=&quot;entry-date published&quot; datetime=&quot;%1$s&quot;>%2$s</time>';
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string .= '<time class=&quot;updated&quot; datetime=&quot;%3$s&quot;>%4$s</time>';
    	}
    
    	$time_string = sprintf( $time_string,
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_attr( get_the_modified_date( 'c' ) ),
    		esc_html( get_the_modified_date() )
    	);
    
     if ( function_exists( 'coauthors_posts_links' ) ) :
    
       printf( __( '<span class=&quot;posted-on&quot;><i class=&quot;fa fa-calendar&quot;></i> %1$s</span><span class=&quot;byline&quot;><i class=&quot;fa fa-user&quot;></i> %2$s</span>', 'solon' ),
     		sprintf( '<a href=&quot;%1$s&quot; rel=&quot;bookmark&quot;>%2$s</a>',
     			esc_url( get_permalink() ),
     			$time_string
     		),
     		coauthors_posts_links( null, null, null, null, false )
     	);
    
     else:
    
    	printf( __( '<span class=&quot;posted-on&quot;><i class=&quot;fa fa-calendar&quot;></i> %1$s</span><span class=&quot;byline&quot;><i class=&quot;fa fa-user&quot;></i> %2$s</span>', 'solon' ),
    		sprintf( '<a href=&quot;%1$s&quot; rel=&quot;bookmark&quot;>%2$s</a>',
    			esc_url( get_permalink() ),
    			$time_string
    		),
    		sprintf( '<span class=&quot;author vcard&quot;><a class=&quot;url fn n&quot; href=&quot;%1$s&quot;>%2$s</a></span>',
    			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    			esc_html( get_the_author() )
    		)
    	);
    
     endif;
    
    }
    Thread Starter ToniLlordes

    (@tonillordes)

    The child theme solution worked like a charm. Thanks!

    Thread Starter ToniLlordes

    (@tonillordes)

    Thanks. It would really be fantastic to have that choice so that visitors can see the latest post completely at a glance.

    Meanwhile, I’ll have a go at the child theme. Again, thank you very much for your quick answer. I thought I was doing something incorrectly

Viewing 3 replies - 1 through 3 (of 3 total)