Support » Theme: Dara » Copyright info in footer, and different sidebar images

  • Hi! A couple of questions about the Dara theme.

    Can I add copyright info in the footer in place of the ‘Powered by WordPress…’, and if so, what do I do to make it so the year will update automatically? I can’t find where to edit the footer at all.

    Also, is it possible to have a different image in the sidebar image widget on different pages?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @silvereyesphoto!

    Can I add copyright info in the footer in place of the ‘Powered by WordPress…’, and if so, what do I do to make it so the year will update automatically? I can’t find where to edit the footer at all.

    It is possible to achieve what you’re after but will require you to experiment a little with the theme’s HTML.

    The first step is for you to set up a child theme.

    In case you’re unsure, the following guides provide a good introduction to child themes, including steps to set one up:

    After you have completed that step, copy the parent’s components/footer/site-info.php file to your child theme’s directory and then open it in your favourite text/code editor.

    Locate the following code in that file:

    	<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'dara' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'dara' ), 'WordPress' ); ?></a>
    	<span class="sep"> | </span>
    	<?php printf( esc_html__( 'Theme: %1$s by %2$s.', 'dara' ), 'Dara', '<a href="http://wordpress.com/themes/" rel="designer">Automattic</a>' ); ?>

    The above is the current content in the footer, which you can replace with your own.

    The following PHP will output the current year for you:

    <?php echo date('Y'); ?>

    Also, is it possible to have a different image in the sidebar image widget on different pages?

    Yes, as you have the Jetpack plugin installed, you can make use of its built in widget visibility feature:

    https://jetpack.com/support/widget-visibility/

    Take a look and let me know if questions come up.

    Thank you so much @siobhyb, I will be working on this later today and I will let you know how I go 🙂

    Hi! I am really struggling with the code for the functions.php file. Every variation I have tried on the sample code below doesn’t work. I need to incorporate parts of the following: function dara_scripts() {
    wp_enqueue_style( ‘dara-style’, get_stylesheet_uri() );

    To this example code
    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘parent-style’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen 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’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
    ?>

    The final function in your child theme should look as follows:

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'dara-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen 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')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

    You’ll notice I added dara-style.

    Let me know if that helps!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Copyright info in footer, and different sidebar images’ is closed to new replies.