• Resolved 5high

    (@5high)


    Hi again,

    I’m continuing to develop a child theme for the w/press theme Twenty eleven. All going pretty well, but I’m completely stuck with how to reinstate the “header class=entry-header” in the Showcase Template.

    I can see that it’s been disallowed in the Showcase template when I inspect with Firebug, but I just don’t seem to be able to reinstate it. I’ve tried a few differrent ways, for eg:

    .entry-header {
    	display: block;
    	visibility: visible !important
    }

    both with and without .singular : also…

    .page-template-showcase-php #content,
    .left-sidebar.page-template-showcase-php #content .entry-header {
    	display: block;
    	visibility: visible !important
    }

    and…

    .page-template-showcase-php #primary,
    .left-sidebar.page-template-showcase-php #primary .entry-header {
    	display: block;
    	visibility: visible !important
    }

    but nothing seems to bring it back!

    The problem is I just can’t find where it’s been removed in the Showcase template code, so I can’t sort of reverse it.

    Also I’m familiar with how to stop something from displaying, but not how to magically make it reappear!!

    Any coding help would be much appreciated.

    Thanks.
    PS: I can’t put a link to the site as I’m developing it locally.

    https://www.ads-software.com/extend/plugins/css/

Viewing 7 replies - 1 through 7 (of 7 total)
  • noahjonah

    (@noahjonah)

    If the code was there to begin with……
    Reinstall a fresh copy of your 2012 parent theme.( This won’t effect the child )
    Then go from there.

    Thread Starter 5high

    (@5high)

    Hi Noahjonah,

    Thanks for your reply – what I mean is that when I inspect a page which is using the standard 2011 ‘Showcase’ template, by default it doesn’t show the entry-header class. So when I inspect it in Firebug it shows this:

    <header class="entry-header">
    <h2 class="entry-title">example page title</h2>
    </header>

    where the entry-header class is ‘greyed out’ (but I can’t find any reference to it in the css that firebug shows). So I’m guessing it must be cancelled in the Showcase Template somewhere…

    Actually, reviewing this again now reminded me that i could check it out in the wp Editor – so I’ve searched the Twenty Eleven: Showcase Template Page Template (showcase.php) for anything that looks likely under ‘header’ or ‘entry’. I’ve come up with 2 possible culprits, as per below:

    // Enqueue showcase script for the slider
    wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' );
    
    get_header(); ?>
    
    		<div id="primary" class="showcase">
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php
    					/**
    					 * We are using a heading by rendering the_content
    					 * If we have content for this page, let's display it.
    					 */
    					if ( '' != get_the_content() )
    						get_template_part( 'content', 'intro' );
    				?>
    
    				<?php endwhile; ?>

    or…

    // For all other recent posts, just display the title and comment status.
    					while ( $recent->have_posts() ) : $recent->the_post(); ?>
    
    						<li class="entry-title">
    							<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    							<span class="comments-link">
    								<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>
    							</span>
    						</li>
    
    					<?php
    					endwhile;

    However, I just don’t get php script, so can’t work out which bits to edit or how!! Once I know which bit it is, I can put it my child theme – though I’m not sure how to reinstate a php function.

    I think this is a likely place to solve the problem, but I need someone who understands php to advise me – any ideas??

    Cheers.

    WPyogi

    (@wpyogi)

    Look for this in the CSS:

    article.intro .entry-title {
        display: none;
    }

    Thread Starter 5high

    (@5high)

    Thanks WPyogi,

    I’ve tracked it down and it now allows me to display the title – much better! So no need to look at php – whew!

    Not sure if I’ve used the correct code though for ‘display’ – to be shown again. I’ve used:

    article.intro .entry-title {
    	display: block !important;
    }

    but perhaps I should have used ‘in-line’ or even ‘in-line block’?

    What’s the correct term to call it back?

    Cheers.

    Thread Starter 5high

    (@5high)

    OK, have done a bit more research, and it seems like the display: block is best with +/- visibility: visible !important for good measure too. So now like this –

    display: block;
     visibility: visible !important;

    Any comments from expert css coders out there please??
    Much appreciated.

    WPyogi

    (@wpyogi)

    Did you just add that to the code above (with those CSS selectors)? If it works, that’s fine. Can’t really tell much without seeing the site live.

    Thread Starter 5high

    (@5high)

    The full code I put in my child style.css was this –

    /* to reinstate the page title in the Showcase template + to drop it down a bit from the horizontal menu bar */
    article.intro .entry-title {
    	display: block !important;
    	visibility: visible !important;
    	background-color: #000000 !important;
    	padding-top: 30px !important;
    	padding-right: 20px;
    }

    though I’m not sure if I need to put !important after everything – or whether I really need the visible attribute too??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how can I 'get back' the "entry-header" in the Showcase Template (child theme)?’ is closed to new replies.