Viewing 15 replies - 1 through 15 (of 23 total)
  • Where do you want to add it? To your sidebar?

    Thread Starter rusnarod

    (@rusnarod)

    I don’t know where it needs to be added. I just want to make it so that the posts show the name of the Author because they are only showing the date right now. Apparently that template tag is supposed to fix that.

    If you want to add it it posts, then you need to look in index.php, category.php, archive.php and single.php. The middle two may not exist in your theme, so don’t worry too much if you can’t find them.

    index.php will probably be generating your front page (unless you’ve configured your blog to show a static page or another posts page) as well as your categories and archive listings (if category.php and archive.php don’t exist. single.php looks after the display of single posts.

    Thread Starter rusnarod

    (@rusnarod)

    So can you please lead to through the setup process? like what do i need to open what do i need to paste and where?

    Thread Starter rusnarod

    (@rusnarod)

    Esmi, could you please lead me through this process? i would greatly appreciate it!

    I can’t do that unless I can see the code of the file you want to change. Probably index.php.

    Thread Starter rusnarod

    (@rusnarod)

    Here is the code from my index.php

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
    				</div>
    
    				<p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', '<br />'); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
    			<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
    		<p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Look for the line:

    <small><?php the_time(__('F jS, Y', 'kubrick')) ?> <!-- by <?php the_author() ?> --></small>

    and change it to:

    <small><?php the_time(__('F jS, Y', 'kubrick')) ?> by <?php the_author() ?></small>

    The code was in there all the time. It has just been commented out using <!-- and -->, so wasn’t being displayed.

    Thread Starter rusnarod

    (@rusnarod)

    I did as you instructed me, however it did not fix the problem. The authors name still doesn’t show up…only the date.

    Here is what the updated code from /wp-content/themes/default/index.php looks like:

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time(__('F jS, Y', 'kubrick')) ?> by <?php the_author() ?></small>
    
    				<div class="entry">
    					<?php the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
    				</div>
    
    				<p class="postmetadata"><?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ''); ?> <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>  <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
    			<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
    		<p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Thread Starter rusnarod

    (@rusnarod)

    Any ideas on what else could be the problem?

    That should work. Can you give me a url for your site?

    Thread Starter rusnarod

    (@rusnarod)

    yeah. the website is called http://www.rusnarod.com. It’s in Russian but i think you will still be able to navigate your way around it. My main page is not a post, but a page, so it’s not supposed to show date and author. But if you click on anything under the “Разное” section, then you will see that the posts in there only show date, but no author.

    Ah – you’re using Kubrick (the default theme). In that case, you need to edit archive.php.

    http://wordpress.pastebin.ca/1378900

    Thread Starter rusnarod

    (@rusnarod)

    I pasted the new code, except now there appears to be an error. The post is not showing up at all :(((

    Here is what i mean:

    http://www.rusnarod.com/?cat=17

    I’ve tested that amendment using the Kubrick (default) theme on my local development server and it works just fine. The only thing I can think of is that you’ve made a mistake when you pasted it into archive.php. The code in the pastebin should replace the entire contents of archive.php.

Viewing 15 replies - 1 through 15 (of 23 total)

The topic ‘How to install TEMPLATE TAGS?’ is closed to new replies.