Forums

[resolved] Remove author, date & category from post and pages and edit link (6 posts)

  1. angrywhiteboy
    Member
    Posted 2 years ago #

    What code do I remove which I assume is in index.php and page.php to remove author, date & category from post and pages, as well as the edit link?

    Thanks.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Remove the_author, the_date, the_time, the_category, and edit_post_link

    See Template_Tags for various links.

    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. angrywhiteboy
    Member
    Posted 2 years ago #

    Update. I got rid of everything except the "Date Icon".

    I removed the following. Still trying to get the "Date Icon" removed.

    <?php
    
    			// post information
    			if ($mandigo_options['date_position'] != 'inline') {
    				printf(
    					__('Posted by %s in %s', 'mandigo'),
    					mandigo_author_link(get_the_author_ID(), get_the_author()),
    					get_the_category_list(', ')
    				);
    			}
    			else {
    				printf(
    					__('Posted on %s by %s in %s', 'mandigo'),
    					get_the_time(__('F jS, Y', 'mandigo')),
    					mandigo_author_link(get_the_author_ID(), get_the_author()),
    					get_the_category_list(', ')
    				);
    			}
    
    			// if wp supports tags, and unless we chose to display tags after the post
    			if (function_exists('the_tags') && !$mandigo_options['display_tags_after_content'])
    				the_tags(', '. __('tags', 'mandigo') .': ');
    
    			// the "edit post" link, which displays when you are logged in
    			edit_post_link(
    				__('Edit', 'mandigo'),
    				sprintf(
    					' - <img src="%simages/edit.gif" alt="%s" /> ',
    					$dirs['www']['scheme'],
    					__('Edit this post', 'mandigo')
    				),
    				''
    			);
    ?>
  4. angrywhiteboy
    Member
    Posted 2 years ago #

    Thanks MichaelH,

    I guess it's reading time :) I really don't know much about PHP, I'm just now learning. I think I just got lucky so far.

    I'll read the links and see if I can figure out the balance of my issue.

    Thanks.

  5. uwiuw
    Member
    Posted 2 years ago #

    usually date icon is styled in style.css. try find the image in theme folder. delete it then make changes accordingly

  6. angrywhiteboy
    Member
    Posted 2 years ago #

    uwiuw,

    Thanks, great idea. I appreciate the quick responses here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags