- This topic has 14 replies, 2 voices, and was last updated 3 years, 3 months ago by Leo.
-
AuthorPosts
-
January 3, 2021 at 11:14 am #1604032Dave
I would like to change where the excerpt is drawn from on my blog post page. Currently, I would have to enter an excerpt for each post separately. Is there a way to have it pull from the beginning of the post instead and then just continue into the post?
cheers,
Dave
January 3, 2021 at 12:40 pm #1604109LeoStaffCustomer SupportHi there,
By default, the auto excerpt should display when the custom excerpt metabox is not in used and there is customizer option for word count:
https://docs.generatepress.com/article/blog-content-layout/Looks like it’s working in this post?
https://www.screencast.com/t/m4aKYEbTJanuary 3, 2021 at 12:45 pm #1604116DaveThanks Leo, but that is not the excerpt that I am referencing. It is the excerpt that has been created on the post in the Private Information section. It is the single..php.
I belive the code I am using is drawing specifically from the excerpt and I would like to draw from the actual post.cheers,
Dave
January 3, 2021 at 12:54 pm #1604129LeoStaffCustomer SupportSo you are referring to the excerpt in the page hero?
Are you currently using this snippet here?
https://docs.generatepress.com/article/page-hero-examples/#example-4If so edit the PHP snippet to this:
function db_page_hero_excerpt() { ob_start(); global $post; ?> <div class="page-hero-excerpt"> <?php echo the_excerpt(); ?> </div> <?php return ob_get_clean(); } add_shortcode( 'page_hero_excerpt','db_page_hero_excerpt' );
January 3, 2021 at 1:04 pm #1604150DaveI am actually wanting to replicate something like this: https://www.saltinourhair.com/tips/start-travel-blog/
So, maybe I should not be using an excerpt as I don’t think it works in this instance. Any suggestions?Cheers,
Dave
January 3, 2021 at 1:06 pm #1604152LeoStaffCustomer SupportJanuary 3, 2021 at 1:09 pm #1604155DaveDo you have any idea how I would implement them to come up with the desired effect?
Cheers,
Dave
January 3, 2021 at 1:13 pm #1604160LeoStaffCustomer SupportJust to make sure, you are referring to this part here?
If so the custom field method I mentioned above should be the way to go.
https://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/January 3, 2021 at 1:17 pm #1604162DaveThat is the section but I think this is way above my limited abilities at the moment π
I will look for another solution.
cheers,
Dave
January 3, 2021 at 1:24 pm #1604167DaveIf I understand this correctly I will have to add it in for each post as it will be different for each one. I have over 500 posts and don’t want to do it for each one π
Is there another solution?cheers,
Dave
January 3, 2021 at 2:20 pm #1604192LeoStaffCustomer SupportYou will only have to add the custom field once in the page hero, but yes each custom field will need to be added within the posts itself.
There isn’t another solution unfortunately.
January 3, 2021 at 2:22 pm #1604201DaveIs it possible just to move the featured image to the right and above the sidebar?
That way the post can continue under the title?cheers,
Dave
January 3, 2021 at 2:26 pm #1604210LeoStaffCustomer SupportCan you open a new topic for the separate question?
Thanks!
January 3, 2021 at 2:28 pm #1604211DaveI actually already did π
Cheers,
DaveJanuary 3, 2021 at 2:42 pm #1604217LeoStaffCustomer SupportThanks!
We will get to it π
-
AuthorPosts
- You must be logged in to reply to this topic.