Support » Plugin: WooCommerce » Footer widgets – Twenty Twenty

  • Resolved hamil

    (@hamil1)


    Why don’t I see widgets in the footer when I use woocommerce and twenty-twenty?
    How do I activate them?
    Thank you for your help.

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hi

    Adter theme change, widget maybe move to other widget areas

    Please goto Appeareance > Widget and check your widget in correct place

    Good luck

    Thread Starter hamil

    (@hamil1)

    Widgets are in the right place. They appear with both the post and the page.
    They are not only visible on the WooCommerce pages.

    Ok

    I check your page and the problem is in your theme.
    Your theme has not widget area in woocommerce page.

    You can Right Click on wordpress default pages and post and click Inspect element.

    In default pages/posts you can find footer-widgets-outer-wrapper

    But in woocommerce Pages your theme has just site-footer

    Please contact your theme developer.

    Good luck

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    Looking at your site, it doesn’t appear to be twenty twenty and the footer matches between your posts and the WooCommerce shop page.

    Can you elaborate a bit more on what you are seeing and what the issue is?

    @slash1andy
    yes Theme is 2020
    https://darky.edilo.cz/wp-content/themes/twentytwenty/style.css
    Sorry, Footer not matches in woocommerce and wordpress pages
    Read my previous reply please

    Thread Starter hamil

    (@hamil1)

    On product pages, I need to display widgets in the footer.
    I use theme Twenty Twenty.

    Please:
    1- go to 2020 theme directory
    2- open footer.php using editor
    3- goto after ?> below of comments

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains the opening of the #site-footer div and all content after.
     *
     * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
     *
     * @package WordPress
     * @subpackage Twenty_Twenty
     * @since 1.0.0
     */
    
    ?>

    4- add following code and save

    <?php 
    if ( is_woocommerce() )
    	include( 'template-parts/footer-menus-widgets.php' ); 
    ?>

    finally your footer.php should be like this

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains the opening of the #site-footer div and all content after.
     *
     * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
     *
     * @package WordPress
     * @subpackage Twenty_Twenty
     * @since 1.0.0
     */
    
    ?>
    
    <?php 
    if ( is_woocommerce() )
    	include( 'template-parts/footer-menus-widgets.php' ); 
    ?>
    
    		<footer id="site-footer" role="contentinfo" class="header-footer-group">
    
    				<div class="section-inner">
    
    					<div class="footer-credits">
    
    						<p class="footer-copyright">&copy;
    							<?php
    							echo date_i18n(
    								/* translators: Copyright date format, see https://secure.php.net/date */
    								_x( 'Y', 'copyright date format', 'twentytwenty' )
    							);
    							?>
    							<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
    						</p><!-- .footer-copyright -->
    
    						<p class="powered-by-wordpress">
    							<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwenty' ) ); ?>">
    								<?php _e( 'Powered by WordPress', 'twentytwenty' ); ?>
    							</a>
    						</p><!-- .powered-by-wordpress -->
    
    					</div><!-- .footer-credits -->
    
    					<a class="to-the-top" href="#site-header">
    						<span class="to-the-top-long">
    							<?php
    							/* translators: %s: HTML character for up arrow */
    							printf( __( 'To the top %s', 'twentytwenty' ), '<span class="arrow" aria-hidden="true">&uarr;</span>' );
    							?>
    						</span><!-- .to-the-top-long -->
    						<span class="to-the-top-short">
    							<?php
    							/* translators: %s: HTML character for up arrow */
    							printf( __( 'Up %s', 'twentytwenty' ), '<span class="arrow" aria-hidden="true">&uarr;</span>' );
    							?>
    						</span><!-- .to-the-top-short -->
    					</a><!-- .to-the-top -->
    
    				</div><!-- .section-inner -->
    
    			</footer><!-- #site-footer -->
    
    		<?php wp_footer(); ?>
    	</body>
    </html>

    Good luck

    • This reply was modified 1 year, 8 months ago by yazdaniwp.

    @slash1andy
    Hi Andrew

    Please report this issue to 2020 theme development team

    Thank you

    Thread Starter hamil

    (@hamil1)

    Added to footer.php but widgets not showing. My footer.php is exactly the same as your pattern. I used a child theme.

    Copy file:

    wp-content/themes/twentytwenty/template-parts/footer-menus-widgets.php

    to

    wp-content/themes/twentytwenty-child/template-parts/footer-menus-widgets.php

    and then replace footer.php file content in your child theme with following:

    <?php
    /**
     * The template for displaying the footer
     *
     * Contains the opening of the #site-footer div and all content after.
     *
     * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
     *
     * @package WordPress
     * @subpackage Twenty_Twenty
     * @since 1.0.0
     */
    
    ?>
    
    <?php 
    if ( is_woocommerce() )
    	include( 'template-parts/footer-menus-widgets.php' ); 
    ?>
    
    		<footer id="site-footer" role="contentinfo" class="header-footer-group">
    
    				<div class="section-inner">
    
    					<div class="footer-credits">
    
    						<p class="footer-copyright">&copy;
    							<?php
    							echo date_i18n(
    								/* translators: Copyright date format, see https://secure.php.net/date */
    								_x( 'Y', 'copyright date format', 'twentytwenty' )
    							);
    							?>
    							<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
    						</p><!-- .footer-copyright -->
    
    						<p class="powered-by-wordpress">
    							<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwenty' ) ); ?>">
    								<?php _e( 'Powered by WordPress', 'twentytwenty' ); ?>
    							</a>
    						</p><!-- .powered-by-wordpress -->
    
    					</div><!-- .footer-credits -->
    
    					<a class="to-the-top" href="#site-header">
    						<span class="to-the-top-long">
    							<?php
    							/* translators: %s: HTML character for up arrow */
    							printf( __( 'To the top %s', 'twentytwenty' ), '<span class="arrow" aria-hidden="true">&uarr;</span>' );
    							?>
    						</span><!-- .to-the-top-long -->
    						<span class="to-the-top-short">
    							<?php
    							/* translators: %s: HTML character for up arrow */
    							printf( __( 'Up %s', 'twentytwenty' ), '<span class="arrow" aria-hidden="true">&uarr;</span>' );
    							?>
    						</span><!-- .to-the-top-short -->
    					</a><!-- .to-the-top -->
    
    				</div><!-- .section-inner -->
    
    			</footer><!-- #site-footer -->
    
    		<?php wp_footer(); ?>
    	</body>
    </html>

    and enjoy it!

    default footer.php file has not this code:

    <?php 
    if ( is_woocommerce() )
    	include( 'template-parts/footer-menus-widgets.php' ); 
    ?>
    Thread Starter hamil

    (@hamil1)

    Great. It’s there.
    Thank you.

    • This reply was modified 1 year, 8 months ago by hamil.

    Well done

    You’re welcome

    For a child theme use the following :

    <?php 
    if ( is_woocommerce() )
    	include( get_template_directory().'/template-parts/footer-menus-widgets.php' ); 
    ?>
    
    Thread Starter hamil

    (@hamil1)

    Thanks to @gsim for editing and simplifying.

    @yazdaniwp Great!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Footer widgets – Twenty Twenty’ is closed to new replies.