Hi guys i am new to WP development, this is my client site : bit.do/dFQtv i need to add hr line under each blog excerpt below read more section , how to do it, if i insert the line below read more button that shows in the single blog post page also
this is coding: (template-parts/content.php)
<?php
/**
* Template part for displaying posts
*
* #link https://codex.wordpress.org/Template_Hierarchy
*
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark" >', '</a></h2>' );
endif;
if ( 'post' === get_post_type() ) : ?>
<h4 class="meta text-muted">
<?php blog_posted_on(); ?>
</h4><!-- .entry-meta -->
<?php
endif; ?>
<!-- AddThis Button BEGIN -->
<div class="addthis_inline_share_toolbox_mzc3" style="margin-bottom:20px;" data-title="<?php the_title() ?>" data-url="<?php the_permalink(); ?>" </div>
<!-- AddThis Button END -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content( sprintf (
/* translators: %s: Name of current post. */
wp_kses(__( 'Read more', 'blog' ), array( 'span' => array( 'class' =>
array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
wp_link_pages( array(
'before' => '<div class= "page-links">'. esc_html__('Pages:', 'blog'
),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php blog_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
(template-parts/content-page.php)
<?php
/**
* Template part for displaying page content in page.php
*
* #link https://codex.wordpress.org/Template_Hierarchy
*
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content"><hr>
<?php
the_content();
wp_link_pages(array(
'before' => '<div class="page-links">' . esc_html__('Pages:','blog'),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'blog' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
<hr>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-## -->
As per saw your theme you add your <hr> tag last line into your content.php inside the template-partsfolder.
like this:
<footer class="entry-footer">
<?php bfablog_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> --><hr>
Double check you edit the correct file...I tried and it's working
Just add hr tag after closing the article tag and also you can write CSS for it to change width and color of it.
<?php
/**
* Template part for displaying page content in page.php
*
* #link https://codex.wordpress.org/Template_Hierarchy
*
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content"><hr>
<?php
the_content();
wp_link_pages(array(
'before' => '<div class="page-links">' . esc_html__('Pages:','bfablog'),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php if ( get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'bfablog' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
<hr>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-## -->
<hr class="abc" />
Related
Basically, I want to add thumbnail image on home page only, but it shows thumbnail image (Featured image) on single content also, which i don't want to load in single page.
I Want to add thumbnail like this:
( from here )
Theme: Underscore development theme
My content.php:
<?php
/**
* Template part for displaying posts
*
* #link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* #package DevWP
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title">', '</h2>' );
endif;
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php devwp_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<?php devwp_post_thumbnail(); ?>
<div class="entry-content">
<?php
if ( is_single() ) {
the_content( sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'devwp' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
) );
} else {
the_excerpt();
}
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'devwp' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php devwp_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<hr>
I'm not sure if I understand correctly what your goal is, but if you want to show the featured image only on homepage and not for the rest of your pages, than you can try 2 things. 1st inside the content.php file to check if you're on the homepage with is_front_page() :
if(is_front_page()){
devwp_post_thumbnail();// I suppose this is echoing your thumbnail
}
The second thing you may do is to create a custom page template for your pages where you're not going to output the thumbnail.
Put This Code...
if( is_front_page() && is_home() ) {
devwp_post_thumbnail();
}
I don't know enough PHP perhaps to recognize immediately why the loop in my wordpress theme is only displaying one post and so I humbly ask for assisstance.
<div class="container">
<div class="row">
<div id="primary" class="content-area col-sm-8">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php web2feel_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
</div>
</div>
<?php get_footer(); ?>
I believe that it then references the content.php file which is as follows
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php web2feel_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
$image = aq_resize( $img_url, 780, 400, true ); //resize & crop the image
?>
<?php if($image) : ?>
<img class="img-responsive" src="<?php echo $image ?>"/>
<?php endif; ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<footer class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'web2feel' ) );
if ( $categories_list && web2feel_categorized_blog() ) :
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'web2feel' ), $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'web2feel' ) );
if ( $tags_list ) :
?>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'web2feel' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'web2feel' ), __( '1 Comment', 'web2feel' ), __( '% Comments', 'web2feel' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'web2feel' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-## -->
Any help would be appreciated. Thank you
I suggest you to check your settings from wordpress admin.
go to admin->Settings->Reading and check that Blog pages show at most should not be 1. if it's one than increase it.
Hi there I was wondering if anyone could assist me quickly.
I am working on a clients site and all of a sudden the blog posts only show the title and not the content.
I am not sure why and need some assistance.
here is the code for the single.php
<div id="primary" class="content-area">
<?php get_template_part( 'content', 'single' ); ?>
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php nightwatch_content_nav( 'nav-below' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
Thank you for your help.
*Edit
Here is the content-single.php code
<?php
/**
* #package nightwatch
* #since nightwatch 1.0.2
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php nightwatch_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( ' Pages:', 'nightwatch' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list( __( ', ', 'nightwatch' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', ', ' );
if ( ! nightwatch_categorized_blog() ) {
// This blog only has 1 category so we just need to worry about tags in the meta text
if ( '' != $tag_list ) {
$meta_text = __( 'This entry was tagged %2$s. Bookmark the permalink.', 'nightwatch' );
} else {
$meta_text = __( 'Bookmark the permalink.', 'nightwatch' );
}
} else {
// But this blog has loads of categories so we should probably display them here
if ( '' != $tag_list ) {
$meta_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'nightwatch' );
} else {
$meta_text = __( 'This entry was posted in %1$s.
Bookmark the permalink.', 'nightwatch' );
}
} // end check for categories on this blog
printf(
$meta_text,
$category_list,
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
?>
<?php edit_post_link( __( 'Edit', 'nightwatch' ), '<span class="edit- link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->'
You should include the_content(); in the place you want the content to appear. Something like this:
<?php
while ( have_posts() ) : the_post();
the_content();
?>
Also, in the file content-single.php comment out (or delete) these lines:
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( ' Pages:', 'nightwatch' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
How can I edit the Php file for a Wordpress theme (shape - downloaded from themeshaper.com) to change the metadata.
for example current php file below displays the meta of a normal post like this:
for example instead of [avatar] [author] written on [date] like in the image above, I would like to change to Posted on [date] by [author].
Php File (content.php):
<?php
/**
* #package Shape
* #since Shape 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<!-- header content -->
<h1 class="entry-title"><?php the_title(); ?></h1><?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php shape_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?><!-- end header content -->
</header><!-- .entry-header --><?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'shape' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'shape' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?> <footer class="entry-meta">
<!-- footer content -->
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'shape' ) );
if ( $categories_list && shape_categorized_blog() ) :
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'shape' ), $categories_list ); ?>
</span>
<?php endif; // End if categories ?> <?php endif; // End if 'post' == get_post_type() ?> <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'shape' ) );
if ( $tags_list ) :
?>
<span class="sep"> | </span>
<span class="tag-links">
<?php printf( __( 'Tagged %1$s', 'shape' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?><div style="float:right;"><?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'shape' ), __( '1 Comment', 'shape' ), __( '% Comments', 'shape' ) ); ?></span>
<?php endif; ?></div><!-- end footer content -->
<?php edit_post_link( __( 'Edit', 'shape' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
contnet-aside php:
<?php
/**
* The template for displaying posts in the Aside post format
* #package Shape
* #since Shape 2.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'shape' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'shape' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php echo get_the_date(); ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'shape' ), __( '1 Comment', 'shape' ), __( '% Comments', 'shape' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'shape' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
I know it is late to answer but something like this will work if anyone else is interested
<p class="postmetadata">
<?php _e('Filed under:','domain'); ?>
<?php the_category(', ') ?> <?php _e('by','domain'); ?> <?php the_author(); ?>
<br/><?php the_tags(__('Tags:','domain'), ', ', '<br />'); ?>
<?php _e('Posted on: ','domain'); ?>
<?php the_time(get_option('date_format')); ?><br/>?>
<?php edit_post_link(__(' Edit','domain'), __(' |','domain'), ''); ?>
</p>
I have problem with Wordpress custom page. I want to show news from concrete category.
<?php
/**
* Template Name: Tutorials
*
* A custom page template without sidebar.
*
* The "Template Name:" bit above allows this to be selectable
* from a dropdown menu on the edit page screen.
*
* #package WordPress
* #subpackage Twenty_Ten
* #since Twenty Ten 1.0
*/
get_header("custom"); ?>
<div id="container">
<div id="content" role="main">
<?php query_posts("cat=4,5,6"); ?>
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part( 'loop', 'index' );
?>
</div><!-- #content -->
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
The problem is that the custom page don't add the right files (?). It (for example) don't add the right "more" link (its not the same as in front page), don't use CodeColorer (plugin for highlight code) and more. Whats the problem? How to fix it? I want to make the news look like in front page.
loop.php
<?php
/**
* The loop that displays posts.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop.php or
* loop-template.php, where 'template' is the loop context
* requested by a template. For example, loop-index.php would
* be used if it exists and we ask for the loop with:
* <code>get_template_part( 'loop', 'index' );</code>
*
* #package WordPress
* #subpackage Twenty_Ten
* #since Twenty Ten 1.0
*/
?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-above -->
<?php endif; ?>
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>
<?php
/* Start the Loop.
*
* In Twenty Ten we use the same loop in multiple contexts.
* It is broken into three main parts: when we're displaying
* posts that are in the gallery category, when we're displaying
* posts in the asides category, and finally all other posts.
*
* Additionally, we sometimes check for whether we are on an
* archive page, a search page, etc., allowing for small differences
* in the loop on each template without actually duplicating
* the rest of the loop that is shared.
*
* Without further ado, the loop:
*/ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
<?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><?php the_title(); ?><span class="data"><?php twentyten_posted_on(); ?></span></h2>
<!--<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div>--><!-- .entry-meta -->
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
?>
<div class="gallery-thumb">
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</div><!-- .gallery-thumb -->
<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
); ?></em></p>
<?php endif; ?>
<?php the_excerpt(); ?>
<?php endif; ?>
</div><!-- .entry-content -->
<div class="entry-utility">
<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
<?php _e( 'More Galleries', 'twentyten' ); ?>
<span class="meta-sep">|</span>
<?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<?php _e( 'More Galleries', 'twentyten' ); ?>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
<?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php twentyten_posted_on(); ?>
<span class="meta-sep">|</span>
<span class="comments-link"><?php comments_popup_link( __( 'Komentarze', 'twentyten' ), __( '1 Komentarz', 'twentyten' ), __( '% Komentarze', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><?php the_title(); ?><span class="data"><?php the_time( __( 'j')); ?><span class="miesiac"> <?php the_time( __( 'M')); ?></span></span></h2>
<?php
printf( __( '<span class="meta-sep">by</span> %1$s', 'pongsari' ),
sprintf( '<span class="autor"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
sprintf( esc_attr__( 'View all posts by %s', 'pongsari' ), get_the_author() ),
get_the_author()
)
);
?>
<!-- <div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div>-->
<!-- .entry-meta -->
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Kategoria</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Komentarze', 'twentyten' ), __( '1 Komentarz', 'twentyten' ), __( '% Komentarze', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
<?php endwhile; // End the loop. Whew. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-below -->
<?php endif; ?>
Ok it works fine when I test it, but I understand you are not getting the result you are expecting. So let's consider this step by step. First question : You say this is "loop.php". I hope it is not, because get_template_part('loop', 'index') does not call loop.php, but loop-index.php. So you should show loop-index.php.
Next : you see the "more" link being different than on your home page. How does it appear on home page, how on this page?