• Resolved Martijn

    (@njit75)


    Hi,

    i installed version 1.8.3 of your plugin. Works fine except for single posts (single.php). I have looked at the code but cannot find the right place to fix it. Pasted some snippets below.

    Wordpress: 5.4
    Theme: TwentySixteen – created a Child theme.

    
    Page: header.php
    
    			<?php if ( get_header_image() ) : ?>
    				<?php
    					/**
    					 * Filter the default twentysixteen custom header sizes attribute.
    					 *
    					 * @since Twenty Sixteen 1.0
    					 *
    					 * @param string $custom_header_sizes sizes attribute
    					 * for Custom Header. Default '(max-width: 709px) 85vw,
    					 * (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
    					 */
    					$custom_header_sizes = apply_filters( 'twentysixteen_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
    				?>
    				<div class="header-image">
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    						<img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    					</a>
    				</div><!-- .header-image -->
    			<?php endif; // End header image check. ?>
    		</header><!-- .site-header -->
    
    
    Page: single.php
    
    <?php
    /**
     * The template for displaying all single posts and attachments
     *
     * @package WordPress
     * @subpackage Twenty_Sixteen
     * @since Twenty Sixteen 1.0
     */
    
    get_header(); ?>
    
    • This topic was modified 4 years, 7 months ago by Martijn.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 have you tried it with the shortcode provided on settings page or not? Also make sure that header.php is the same one which is being called on single.php. Lastly i will troubleshoot it for you that why single post page isn’t mapping the URL for correct images for headers.

    Thread Starter Martijn

    (@njit75)

    @fahadmahmood : i added the shortcode to the page mentioned earlier for testing purposes

    Added this on top of the post:
    [WP_HEADER_IMAGES]

    Also make sure that header.php is the same one which is being called on single.php.

    How do i check this? I pasted some code from header.php and single.php earlier.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 i am testing, hopefully will send you a video for a better explanation.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 i have just checked it, only menu items are available in FREE version. Taxonomy and post types are provided in premium version, that’s why you didn’t get it work in FREE version. I am still working on it’s next version so these things should be clear with some visible messages.

    Thread Starter Martijn

    (@njit75)

    OK, that explains why. Was not clear from the Plugin. But indeed, the ‘Taxonomy – category’ has a different color and on mouse-over it displays ‘Premium Feature’

    Maybe disallow setting a header image in this subsection for the Free version.

    Thanks for the support but will look further for a different solution. $36 for a one-trick plugin is not affordable for a simple hobby page.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 i appreciate your feedback. Surely will improve it with next release.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 please try the latest version with these improvements.

    Thread Starter Martijn

    (@njit75)

    @fahadmahmood : installed the latest version.

    header selection for category is still premium only. So does not change much for me. It is still possible to select header images for categories. I would completely gray out this option. Saves confusion..

    • This reply was modified 4 years, 7 months ago by Martijn.
    • This reply was modified 4 years, 7 months ago by Martijn.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @njit75 ok, i will separate that section with a separator.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Header image for category’ is closed to new replies.