Add button inline with entry-title twenty twelve
-
My appeal to the WordPress gods today ;)…
I’m using a twenty twelve child theme to grow my basic skills and am learning so much! But..some things that seem simple still escape me. This is a two-parter.
First, I would like to place a button on the same line as my entry-title, at the far right side. I created a child content-page.php, created my button class and managed to re-size the entry-title to 50% to make room. My problem is that I can’t figure out how to get the button to share space with the entry-title, it always falls below and interrupts my gallery.
Screenshot here: http://www.arthurtaussig.com/wp-content/uploads/2013/08/Button-screenshot.jpg
and the content-page code:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <button class="right-button">adding button text here</button> </header> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post -->
entry css:
.entry-title { max-width: 50%; display: inline; }
button css:
.right-button { color: #897C45; font-size: 12px; font-size: 0.857rem; line-height: 14px; width: 30%; max-width: 100px; max-width: 7.143rem; float:right; display:inline; padding: 20px 15px; margin: auto; text-align: center; vertical-align: middle; /*border styles*/ border-left: solid 1px #808080; border-top: solid 1px #808080; border-right: solid 2px #232323; border-bottom: solid 3px #232323; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }
Second, said button would only appear on certain pages, and text/links will change, so I imagine I’d need to pull the text and links in through php via.. template part? shortcode? custom field?…I really have no idea. Custom templates for each seems wasteful. Could someone please steer me in the right direction? I’d really appreciate it!
- The topic ‘Add button inline with entry-title twenty twelve’ is closed to new replies.