Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter g-engr

    (@g-engr)

    still looking for an answer … found this

    <!DOCTYPE html>
    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    </head>
    <body>
    
    <picture>
        <source srcset="img_smallflower.jpg" media="(max-width: 400px)">
        <source srcset="img_flowers.jpg">
        <img src="img_flowers.jpg" alt="Flowers" style="width:auto;">
    </picture>
    
    <p>Resize the browser width and the background image will change at 400px.</p>
    
    </body>
    </html>

    on https://www.w3schools.com/css/css_rwd_images.asp

    How and what code do I edit to make the header change?

    I’m not sure what the format for printf is, but there’s one way to find out … delete it and see. If it works, guess you didn’t need it. If I were going to test it, I’d try …
    <?php printf( __( '&copy YOUR SITE HERE' ) ); ?>
    or maybe
    <?php printf( '&copy YOUR SITE HERE' ); ?>
    Again I’m not sure what the format is supposed to be. That being said, why delete it? It’s not hurting anything.

    Thread Starter g-engr

    (@g-engr)

    I have and it does work wonderfully, but that’s not what I’m trying to do.

    For illustration lets say that while viewing the site on a computer or tablet the header has a blue background. But when viewing on a smart phone the header has a red background. I’ve already created the two backgrounds png files. I just need help with coding so it shows the correct background image.

    Thanks for the feedback.

    I also wanted to swap the header and nav. In my child’s header.php file I just cut and past the header image code above the nav code. Worked like a champ. Now I’m just trying to figure out the spacing/ padding.

    <header id="masthead" class="site-header" role="banner">
    
    			<?php if ( get_header_image() ) : ?>
    				.
    				.
    				.
    			<?php endif; // End header image check. ?>

    Not sure if it’s the best coding, but I just took the parent footer and deleted everything I didn’t want. Seem to work just fine … this is in my child footer.php file. Towards the bottom of the code look for ‘&copy YOUR SITE HERE’, and replace with your desired text.

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains the closing of the "site-content" div and all content after.
     *
     * @package WordPress
     * @subpackage Twenty_Sixteen_Child
     * @since Twenty Sixteen 1.0
     */
    ?>
    
    	</div><!-- .site-content -->
    
    	<footer id="colophon" class="site-footer" role="contentinfo">
    		<div class="site-info">
    			<?php
    				/**
    				 * Fires before the Twenty Fifteen footer text for footer customization.
    				 *
    				 * @since Twenty Fifteen 1.0
    				 */
    				do_action( 'twentysixteen_credits' );
    			?>
    			<?php printf( __( '&copy YOUR SITE HERE', 'twentysixteen-child' ), 'WordPress' ); ?>
    		</div><!-- .site-info -->
    	</footer><!-- .site-footer -->
    
    </div><!-- .site -->
    
    <?php wp_footer(); ?>
    
    </body>
    </html>
Viewing 6 replies - 1 through 6 (of 6 total)