Blog – Remove Author and Show Excerpt

Homepage Community Forums Aspire Theme Support Blog – Remove Author and Show Excerpt

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22064
    erinok
    Customer

      Hello! I just added a blog to our site and I would like to do two things:

      1. Hide the author name.

      2. Show excerpts on the main blog page, instead of the full entry.

      https://www.womensleadershipconference.net/leadership-spotlight/

      Thank you for any help! Erin

      #22066
      Wes
      Moderator

        To remove the author name, add this to your functions.php –

        //* Customize the post info function
        add_filter( 'genesis_post_info', 'sp_post_info_filter' );
        function sp_post_info_filter($post_info) {
        if ( !is_page() ) {
        	$post_info = '[post_date] by [post_comments] [post_edit]';
        	return $post_info;
        }}

        If you ever want to add it back or rearrange the order, add this shortcode –

        [post_author_posts_link]

        To show excerpts (on the blog), take a look in your Genesis Theme Settings page in the Content Archives section. You can select a content limit or excerpt in the Display option.

        #22068
        erinok
        Customer

          Thank you so much! The excerpts are working, however, I added the code snippet to my functions.php to remove the author, and it is still there…

          https://www.womensleadershipconference.net/leadership-spotlight/

          #22076
          Wes
          Moderator

            Is that link your regular blog page or is that a custom page? If it’s the regular blog page, then I’m not sure why it’s not working. I just did another test with that same code and it seems to work.

            Let me know if you want me to login and try it.

            #22077
            erinok
            Customer

              Hi! I found out what was going on… I have Genesis Simple Edits installed and one of the defaults is to show the post author. As soon as I discovered and removed that, the name disappeared.

              Thank you again for all your help!

              #22084
              Wes
              Moderator

                Ah! I didn’t think about that. I was wondering if there was some custom code added somewhere.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.