WordPress.org

Ready to get started?Download WordPress

Forums

Pilot Fish
[resolved] Delete author and posted by on comments (7 posts)

  1. totti_777
    Member
    Posted 1 year ago #

    I'm interesting to delete author and posted by... information in my posts, because i'm interesting to make a static web, my web is http://aeigsebastiamontraveta.eshost.es

  2. Sai
    Member
    Posted 1 year ago #

    Hi, you can remove line <?php pilotfish_entry_meta(); ?>
    from files with name like "content-xx.php"

  3. totti_777
    Member
    Posted 1 year ago #

    I try it but don't work well, the web don't change.

  4. Daniel Zhao
    Member
    Theme Author

    Posted 1 year ago #

    you need to remove the <?php pilotfish_entry_meta(); ?>
    from the file "page.php" as well, to remove them from all pages.

  5. totti_777
    Member
    Posted 1 year ago #

    Thank you, now i would like to delete page Page Hierarchy, how I can?

  6. ronangelo
    Member
    Posted 1 year ago #

    Why not just hide the post info with css instead of removing the code

    .post-meta {
       display: none;
    }
  7. Daniel Zhao
    Member
    Theme Author

    Posted 1 year ago #

    Re: ronangelo: yeah, that's a good idea :)

    To totti_777:

    to delete page hierarchy, you can either delete the following from page.php

    <!-- Display children if page has children -->
    		<div class="page-hierarchy">
                    <?php
    		//if the post has a parent
    		if($post->post_parent){
    		  //collect ancestor pages
    		  $relations = get_post_ancestors($post->ID);
    		  //get child pages
    		  $result = $wpdb->get_results( "SELECT ID FROM wp_posts WHERE post_parent = $post->ID AND post_type='page'" );
    		  if ($result){
    		    foreach($result as $pageID){
    		      array_push($relations, $pageID->ID);
    		    }
    		  }
    		  //add current post to pages
    		  array_push($relations, $post->ID);
    		  //get comma delimited list of children and parents and self
    		  $relations_string = implode(",",$relations);
    		  //use include to list only the collected pages.
    		  $sidelinks = wp_list_pages("title_li=&echo=0&include=".$relations_string);
    		}else{
    		  // display only main level and children
    		  $sidelinks = wp_list_pages("title_li=&echo=0&depth=1&child_of=".$post->ID);
    		}
    
    		if ($sidelinks) { ?>
    		  <h5><?php _e('Page Hierarchy:', 'pilotfish'); ?> <?php the_title(); ?></h5>
    		  <ul>
    		    <?php //links in <li> tags
    		    echo $sidelinks; ?>
    		  </ul>
    		<?php } ?>
    		</div>

    OR add to the style.css

    .page-hierarchy {
      display: none;
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags