Tagged: Simple Catch
- This topic has 5 replies, 2 voices, and was last updated 11 years, 4 months ago by Sakin.
-
AuthorPosts
-
July 19, 2013 at 2:03 am #12080sobujbdMember
Hello,
I’m trying to show full text for sticky post on homepage. Achieved it to some extent by modifying the content.php. But there is an unwanted gap between the 1st and 2nd para of sticky post that I couldn’t remove. I would appreciate it very much if someone could help me resolve it.
Site url – http://www.banglamovienews.com/
Content.php code –
<?php /** * This is the template that displays content for index and archive page * * @package Catch Themes * @subpackage Simple_Catch * @since Simple Catch 1.3.2 */ ?> <?php if ( have_posts() ) : while( have_posts() ): the_post(); global $simplecatch_options_settings; $options = $simplecatch_options_settings; $themeoption_layout = $options[ 'sidebar_layout' ]; ?> <div <?php post_class(); ?> > <?php if ( is_sticky() ) : ?> <h2 class="entry-title"><a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" >Bangla Movie <?php the_title(); ?> Review</a></h2> <ul class="post-by"> <li class="no-padding-left"><a>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>"><?php _e( 'By', 'simplecatch' ); ?> <?php the_author_meta( 'display_name' ); ?></a></li> <li><?php $simplecatch_date_format = get_option( 'date_format' ); the_time( $simplecatch_date_format ); ?></li> <li class="last"><?php comments_popup_link( __( 'No Comments', 'simplecatch' ), __( '1 Comment', 'simplecatch' ), __( '% Comments', 'simplecatch' ) ); ?></li> </ul> <a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail('thumbnail', array('class' => 'alignright')); ?></a> <?php the_content(''); ?> <a>">Continue Reading →</a> <?php else : ?> <?php //If category has thumbnail it displays thumbnail and excerpt of content else excerpt only if ( has_post_thumbnail() ) : ?> <div class="col3 post-img"> <a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_post_thumbnail( 'featured' ); ?></a> </div> <!-- .col3 --> <?php if( $themeoption_layout == 'no-sidebar-full-width' ) { echo '<div class="col9">'; } else { echo '<div class="col5">'; } else : if( $themeoption_layout == 'no-sidebar-full-width' ) { echo '<div class="col12">'; } else { echo '<div class="col8">'; } endif; ?> <h2 class="entry-title"><a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'simplecatch' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" ><?php the_title(); ?></a></h2> <ul class="post-by"> <li class="no-padding-left"><a>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>"><?php _e( 'By', 'simplecatch' ); ?> <?php the_author_meta( 'display_name' ); ?></a></li> <li><?php $simplecatch_date_format = get_option( 'date_format' ); the_time( $simplecatch_date_format ); ?></li> <li class="last"><?php comments_popup_link( __( 'No Comments', 'simplecatch' ), __( '1 Comment', 'simplecatch' ), __( '% Comments', 'simplecatch' ) ); ?></li> </ul> <?php the_excerpt(); ?> </div> <?php endif; ?> <div class="row-end"></div> </div><!-- .post --> <hr /> <?php endwhile; ?> <?php simplecatch_content_nav( 'nav-below' ); ?> <?php else : ?> <div class="post"> <h2><?php _e( 'Not found', 'simplecatch' ); ?></h2> <?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'simplecatch' ); ?> <?php get_search_form(); ?> </div><!-- .post --> <?php endif; ?>
July 19, 2013 at 2:35 am #12087SakinKeymaster@sobujbd: When I check in your site and sticky post “Bangla Movie Chowringhee (1968) Review”. I see that in content, you have lot of empty
<p></p>
tags. So just edit that post in text mode and remove the extra<p></p>
tagsJuly 19, 2013 at 3:17 am #12091sobujbdMember@Sakin: Thanks for the tips. I used divs in the post to achieve desired gap between paras. Just one more thing : how do I ad the thumbnail code in single.php to show thumbnails in single posts without having to add them in each post via ‘Add Media’? Thanks in advance…
July 19, 2013 at 12:44 pm #12109SakinKeymaster@sobujbd: I don’t get it what you mean. You don’t need to add the media individually in the single post. You can also mass upload the media from “Media => Add New” in your WordPress Dashboard. Then you can add the link in your post or you can just upload the gallery in the post.
July 19, 2013 at 12:54 pm #12112sobujbdMember@Sakin: I did it in another theme by adding the following code in single.php –
<?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(); } ?> <?php the_content(); ?>
How do I achieve the same result in your theme?
Cheers
July 19, 2013 at 4:16 pm #12119 -
AuthorPosts
- The topic ‘Need help with sticky post on homepage’ is closed to new replies.