I created some widgets in the Customizer area. However, now when I click on Widgets it is a clear empty box. No text or pictures.
I have recorded a video of my problem. Please watch at… https://imaginingworks.com/wp-content/uploads/2023/11/Recording-2023-11-21-085745-Widgets.mp4
I hope you can help.
Thanks,
Melissa Hutchinson
]]>thanks for the theme. I would need your help. I added polylang plugin to my right header widget, but the flags from polylang plugin are aligned left. Is it possible to allign them right?
Thanks
]]>I managed to add 1 header widget area and removing the space caused by the header image/video area by playing around with the styling in the child theme’s live preview.
However, if I add the second header widget area, live preview stops working and I don’t want to activate the child theme until I know that everything works like it should.
This is my child theme’s functions.php code (with the not working area commented out):
<?php
function my_theme_enqueue_styles() {
$parent_style = 'twentyseventeen-style'; // This is 'twentyseventeen-style' for the Twenty Seventeen 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' );
// creating header widget area
function wpb_widgets_init() {
register_sidebar( array(
'name' => 'Header Widget 1',
'id' => 'header-widget',
'before_widget' => '<div class="hw-widget">',
'after_widget' => '</div>',
'before_title' => '<h2 class="hw-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'wpb_widgets_init' );
/*
function wpb_widgets_init() {
register_sidebar( array(
'name' => 'Header Widget 2',
'id' => 'header-widget2',
'before_widget' => '<div class="hw-widget">',
'after_widget' => '</div>',
'before_title' => '<h2 class="hw-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'wpb_widgets_init' );
*/
?>
This is the child theme’s header.php:
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.www.ads-software.com/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<?php get_template_part( 'template-parts/header/header', 'image' ); ?>
<?php if ( has_nav_menu( 'top' ) ) : ?>
<div class="navigation-top">
<div class="wrap">
<?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
</div><!-- .wrap -->
</div><!-- .navigation-top -->
<?php endif; ?>
<?php //displaying custom header widget1
if ( is_active_sidebar( 'header-widget' ) ) : ?>
<div id="header-widget-area" class="hw-widget widget-area" role="complementary">
<?php dynamic_sidebar( 'header-widget' ); ?>
</div>
<?php endif; ?>
<?php //displaying custom header widget2
if ( is_active_sidebar( 'header-widget2' ) ) : ?>
<div id="header-widget-area2" class="hw-widget widget-area" role="complementary">
<?php dynamic_sidebar( 'header-widget2' ); ?>
</div>
<?php endif; ?>
</header><!-- #masthead -->
<?php
/*
* If a regular post or page, and not the front page, show the featured image.
* Using get_queried_object_id() here since the $post global may not be set before a call to the_post().
*/
if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
echo '<div class="single-featured-image-header">';
echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );
echo '</div><!-- .single-featured-image-header -->';
endif;
?>
<div class="site-content-contain">
<div id="content" class="site-content">
]]>Just wanted to say first that I love the theme, so far the easiest to modify that I have come across so far.
I have been able to make changes for most of the things that I wanted to change by searching your support forum and have found it very helpful so far. The hide-on-mobile custom class though is not working for me correctly, its working but not correctly.
Basically, I have in my header-widget the phone #, email address and a button but when viewing on a mobile device it takes up too much room. So I have added the hide-on-mobile to the phone # and email address leaving the button alone, but it hides it on mobile devices and for tablets, which I would like it to only hide it for mobile. I tried hide-on-tablet but it does nothing. Just wondering if you have changed the class or if you have merged the 2 together, or maybe I’m doing it wrong. Also, how would I center the said button in the header widget on just mobile devices after hiding the phone # and email address?
Any help would be greatly appreciated.
I have another question about the spacing in the header for tablet devices as well but wasn’t sure if I can ask it in this request or should post another? Please let me know how you would like me to proceed with my second question.
Regards,
Percy
The theme ad for downloading shows social icons in the header. How can you put them there if there is no widget for the header. My site updated with the most recent update but the social icons are not there.
Please help. Anyone???
Thanks.