mithical
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Display header on 'single/php'Perfect! That did it!
I promise to set this up as a child theme as soon as I can! LOL
Thank you (both) for all your help!
??
Forum: Themes and Templates
In reply to: Display header on 'single/php'WPyogi: I have the theme files…. but thanks. I made a backup before making any changes. As to a child theme, if I had the first idea how to do that, I would! ??
(I’ll look at the link,and thank you so much for the suggestion, but with only CSS modifications would you still recommend that?)
The only thing I’ve been changing, other than the customization available with the theme itself. is the CSS (of which I also keep a separate copy).
Aashish: Here’s the header code (with the comment tags you suggested:
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width" /> <link rel="profile" href="https://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <link href='https://fonts.googleapis.com/css?family=Allura' rel='stylesheet' type='text/css'> <title><?php wp_title( '|', true, 'right' ); ?></title> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div class="wrapper"> <div id="header"> <?php if( get_theme_mod( 'kvarken_logo_header' ) <> '') { if( get_theme_mod( 'kvarken_logo' ) ) { if( get_theme_mod( 'kvarken_logo_link' ) <> '') { echo '<a href="' . get_theme_mod( 'kvarken_logo_link' ) . '">'; } echo '<img src="' . get_theme_mod( 'kvarken_logo' ) . '" alt="" class="header-logo">'; if( get_theme_mod( 'kvarken_logo_link' ) <> '') { echo '</a>'; } } } ?> <?php if (display_header_text() ) : ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> <?php endif; if(get_theme_mod( 'kvarken_header_image' ) == '') { ?> <?php } /*if ( is_home() || is_front_page() ) { $header_image = get_header_image(); if ( $header_image ) : ?> <div class="header-image"> <?php if( get_theme_mod( 'kvarken_header_image_link' ) <> '') { echo '<a href="' . get_theme_mod( 'kvarken_header_image_link' ) . '">'; } ?> <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> <?php if( get_theme_mod( 'kvarken_header_image_link' ) <> '') { echo '</a>'; } ?> </div> <?php endif; } */ ?> <?php if( get_theme_mod( 'kvarken_header_image' ) <> '') { ?> <div id="header-menu" role="navigation"><?php wp_nav_menu( array( 'theme_location' => 'header' ) ); ?></div> <?php } ?> </div>
I configured the header image using the built-in customizations, but turned off the site title, etc., and the header logo options. The only other tweak I made it to delete the header menu, since I don’t need it, and was unable to find a way to turn it off.
The code I deleted was one div:
<div id="header-menu" role="navigation"><?php wp_nav_menu( array( 'theme_location' =>
I’ve already tried adding that back in (first thing I tried, actually), and it didn’t make a difference….
Forum: Themes and Templates
In reply to: Display header on 'single/php'OK, gave that a try, and now the header isn’t showing anywhere! LOL
Shall I leave it up, or should I change it back?
(none of this is ‘live’ yet, really, so it’s fine to leave it if you want to look at it.)
Also, I can post my header code, but it’s a bit longer than the
single.php
Let me know if that would help.
Thank you for your continued help! ??
Forum: Themes and Templates
In reply to: Display header on 'single/php'OK, but I”m not using a logo or logo header (or title, etc.)….
I’m only using the header image. How can I get that to show up like it does on the main page?
Forum: Themes and Templates
In reply to: Display header on 'single/php'Thanks so much for your reply.
I checked, and that line IS in the single.php….
I’m not sure quite what you mean in your next sentence…how could the header.php not be ‘in the theme?’
My single.php reads thusly:
<?php get_header(); ?> <div class="container"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h1 class="post-title"><?php the_title(); ?></h1> <?php kvarken_breadcrumbs();?> <?php if ( is_attachment() ) { echo '<div class="fullimg">' . wp_get_attachment_image('','full'). '</div>'; if ( ! empty( $post->post_excerpt ) ) : echo '<br /><p>' . the_excerpt() .'</p>'; endif; next_image_link(); previous_image_link(); } else { the_content(); wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages: ', 'kvarken' ), 'after' => '</div>' ) ); } kvarken_meta(); ?> </div> <?php endwhile; next_post_link('<div class="newer-posts border radius">%link →</div>'); previous_post_link('<div class="older-posts border radius">← %link </div>'); comments_template( '', true ); ?> </div> <?php get_sidebar(); get_footer(); ?>
Should not the header be showing? Or is there something in the “if have post” that tells it not to display the header?
The URL is as follows: https://www.ravenmoon.us/new/
Thanks again….. ??