• Resolved ilmattiapascal

    (@ilmattiapascal)


    hi there, twentytwelve child here.

    i’ve a little problem. I would like the tags to be in the same line with the date and the leave a comment sentence. when i paste

    <p><?php the_tags(); ?></p>

    in my content.php i ll see the date, the tags and the leave comment one under the other. While i would like to have them in the same line.

    Also another little question: how can i delete the word Tags when i show the tags ? I only would like the tags without the “tags:” object…

    thank you very much!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Please paste the code to your content.php file so we can take a look.

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    <footer class="entry-meta">
    
    			<?php
    				$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    					esc_url( get_permalink() ),
    					esc_attr( get_the_time() ),
    					esc_attr( get_the_date( 'c' ) ),
    					esc_html( get_the_date() )
    			);
    			echo $date ;?>
    
    			 <p><?php the_tags(); ?></p>
    
    				<?php if ( comments_open() ) : ?>
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    
    			<?php endif; // comments_open() ?>
    
    			</footer>

    that’s the footer..even if i think i ve to play with the style.css and position rules…but i m a little lost, i don’t know where and what i ve to put inside this files..

    Is that everything that is in your content.php file? If not, post the whole thing.

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    the problem is in the footer of the post content so i thought it woulded be ok to post only the footer part.

    <footer class="entry-meta">
    
    			<?php
    				$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    					esc_url( get_permalink() ),
    					esc_attr( get_the_time() ),
    					esc_attr( get_the_date( 'c' ) ),
    					esc_html( get_the_date() )
    			);
    			echo $date ;?>
    
    			 <p><?php the_tags(); ?></p>
    
    				<?php if ( comments_open() ) : ?>
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    
    			<?php endif; // comments_open() ?>
    
    			</footer>

    where the CSS for this footer is :

    footer.entry-meta {
    font-size: 13px;
    font-size: 0.928571429rem;
    line-height: 1.846153846;
    color: #33CC33;
    width: 180px;
    }

    if you want all the content.php to better understand, the code is that:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    		<div class="featured-post">
    			<?php _e( 'Featured post', 'twentytwelve' ); ?>
    		</div>
    		<?php endif; ?>
    
    		<header class="entry-header">
    
    		<span class="category-title">
    		<?php foreach( get_the_category() as $category ) {
    		$category_name = $category->cat_name;
    		}
    		echo ' <a href="' . get_category_link( $category->term_id ) . '">' . $category_name . '</a> ';
    			?>
    		</span>
    
    			<?php if ( is_single() ) : ?>
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    			<?php else : ?>
    			<h1 class="entry-title">
    				<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</h1>
    			<?php endif; // is_single() ?>
    
    		</header><!-- .entry-header -->
    
    		<?php if( is_home() && $wp_query->current_post != 0 || is_home() && is_paged() || is_category() ) the_post_thumbnail(); ?>
    
    		<?php if ( is_search() || is_archive() || is_category() || is_tag() || is_home() ) : // display Excerpts ?>
    
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    			<a href="<?php echo get_permalink(); ?>"> Read More...</a>
    
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    
    			<footer class="entry-meta">
    
    			<?php
    				$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    					esc_url( get_permalink() ),
    					esc_attr( get_the_time() ),
    					esc_attr( get_the_date( 'c' ) ),
    					esc_html( get_the_date() )
    			);
    			echo $date ;?>
    
    			 <p><?php the_tags(); ?></p>
    
    				<?php if ( comments_open() ) : ?>
    				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    
    			<?php endif; // comments_open() ?>
    
    			</footer>
    
    			<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
    				<div class="author-info">
    					<div class="author-avatar">
    						<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
    					</div><!-- .author-avatar -->
    					<div class="author-description">
    						<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
    						<p><?php the_author_meta( 'description' ); ?></p>
    						<div class="author-link">
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    								<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentytwelve' ), get_the_author() ); ?>
    							</a>
    
    						</div><!-- .author-link	-->
    					</div><!-- .author-description -->
    				</div><!-- .author-info -->
    			<?php endif; ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post -->

    hope it can help to help me ??

    PS I tried to put in the footer entry meta the rule: display:inline and also inline block, but nothing happened…

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    hi there, twentytwelve child here.

    i’ve a little problem. I would like the tags to be in the same line with the date and the leave a comment sentence. when i paste

    I don’t suppose you can post a link to your site? That sometimes makes it easier for others to see what the problem might be.

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    i would like but i m building the blog in remote, still not online..

    the problem is simple. i ve

    READ MORE…

    9 JULY 2013
    TAGS: ILLUSTRATIONS, PEOPLE
    LEAVE A COMMENT

    while i would like to have :

    READ MORE…

    9 JULY 2013 TAGS:ILLUSTRATIONS, PEOPLE LEAVE A COMMENT

    by wrapping the_tags() into html paragraph tags, you are creating a new line;

    possibly change them to span tags; for example (untested):

    <span class="post-tags"><?php the_tags(); ?></span>

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    as always, your tricks works always like a charm.

    i had only to change the width and now all the stuff is in the same line. Great. Thanks!

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    last question, how can i avoid the word “Tags” when i show the tags?

    i see Tags: people,fun,enjoy

    when i would like to see just: people,fun,enjoy

    i don’t see a place in the php where it says echo tags..

    thanks!!!

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    great, it worked! that’s all folks for the moment, thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Put date, leave a comment and tags in the same line’ is closed to new replies.