Community Forums › Forums › Archived Forums › General Discussion › How to show full post on home page and show excerpts on category page?
- This topic has 10 replies, 5 voices, and was last updated 9 years, 5 months ago by erin1544.
-
AuthorPosts
-
August 14, 2014 at 10:31 pm #118897spmanMember
This is my setting. Genesis>theme settings>content archives>Select one of the following: [Display post content]
Post on home page (example http://mydomainname.com) and category page (example http://mydomainname.com/category/apple) both show full post content.How to make home page show full post and category page show excerpts?
(note: I have already tried Genesis>theme settings>content archives>Select one of the following: [Display post excerpts], it does not work because both home page and category page will show excerpts)
Thanks
August 14, 2014 at 11:03 pm #118900Brad DaltonParticipantAugust 15, 2014 at 1:15 am #118925spmanMemberI tried the Alternate Solution but it does not work.
I went to Appearance>Editor>Select theme to edit: [Genesis Sample Theme], click [select] button>click [functions.php]>copied all code in Alternate Solution and pasted all code below the existing text in the box>click [update file]
August 15, 2014 at 4:30 am #118946Brad DaltonParticipantLink to your site please.
The second code snippet goes in your child themes functions file.
It won't work if you put it into the wrong file.
It works because i tested it.
home page , blog page and front page are not the same.
is_home(0 works for the posts page according to your reading settings.
August 15, 2014 at 5:15 am #118953spmanMemberThis reply has been marked as private.August 15, 2014 at 5:23 am #118955DTHkellyMemberOnly moderators can see protected posts.
August 15, 2014 at 5:38 am #118961spmanMemberThanks Kellylise.
I did copy the exact code and paste into in my child themes functions file. Here is a screenshot: http://i.imgur.com/cbZ0wOu.png
I notice your code has wpsites which is your site name. Do I need to change anything in the code?
bachelorettepartyideas.org
I do not know anything about is_home(0 . Today is the first time I heard of is_home(0August 15, 2014 at 5:55 am #118967Genesis DeveloperMemberOk. I saw the screenshot. Brad's code is fine. But you can try this code once
add_filter('genesis_pre_get_option_content_archive', 'bti_post_content_format'); function bti_post_content_format() { if( is_home() || is_front_page() ){ return "full"; }else{ return 'excerpts'; } }
August 15, 2014 at 6:13 am #118974spmanMembergenwrock, your code works. Thanks
August 15, 2014 at 7:17 am #118994Genesis DeveloperMemberplease mark this thread as RESOLVED
November 10, 2014 at 1:27 pm #131097erin1544MemberI just used this code and it did the job! THe only problem I had with it is that it is still showing a featured image thumbnail on my home page, right before the full post (repeating the thumbnail image again). I removed the "featured image" option and it made my home page look fine, but my category page just has the post titles and excerpts. Any way to adjust the code so that I can still have the thumbnails on my category page?
Thanks!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.