Tagged: custom excerpt
-
AuthorPosts
-
April 10, 2015 at 7:57 pm #426739
Hi,
I want to use the excerpt field for the blog snippet on the blog home page and the main website home page blog snippet. I am using the following code. The problem I am having is that it is not drawing the image from the blog post.function change_blog_archive_style() { global $avia_config; if(!is_single()){ $avia_config['blog_content'] = get_the_excerpt(); } } add_action('get_header', 'change_blog_archive_style');
How can I get this to use the exceprt and use the image so that it shows on blog home page and website home page?
BTW: I am suprised that Kriesi has not addressed this issue yet as in every build I and others ask the same thing. Using the post tag is a bad idea as you cannot customise the text to appear differently.
Thanks
Vince- This topic was modified 9 years, 8 months ago by Vincent. Reason: typo
April 12, 2015 at 3:39 pm #427147bump
April 13, 2015 at 3:57 pm #427537Hi!
Thank you for coming back.
Try to replace the code above with:
function change_blog_archive_style() { global $avia_config; if(!is_single()){ $avia_config['blog_content'] = "excerpt_read_more"; } } add_action('get_header', 'change_blog_archive_style');
Cheers!
GünterApril 13, 2015 at 5:40 pm #427641This reply has been marked as private.April 14, 2015 at 11:14 am #428129Hi!
Can you please provide links to the actual pages with the issue? Screenshots will help.
Best regards,
IsmaelApril 14, 2015 at 12:17 pm #428157This reply has been marked as private.April 15, 2015 at 12:29 pm #428856Hey!
I tried to login but it’s not working. Tried more than 3 times: EDITED
Best regards,
IsmaelApril 15, 2015 at 12:52 pm #428875This reply has been marked as private.April 15, 2015 at 12:55 pm #428877This reply has been marked as private.April 16, 2015 at 9:43 am #429445Hey!
Alright. I would like to edit these posts but the editor is broken. Why is that?
blog/general/adwords-summit-2014/
blog/general/keep-copyright-up-to-date/EDIT: I was able to edit the posts directly in the posts panel. I noticed that you add the image directly in the editor and then you apply a featured image. Which one of these images would you like to remove? The featured image is above the title and the image in the editor is the one below the title. If you like to remove the image above the title, use this in the Quick CSS field:
.single .big-preview.single-big a img { display: none; }
Regards,
IsmaelApril 16, 2015 at 12:07 pm #429535This reply has been marked as private.April 17, 2015 at 8:39 am #430164Hey!
I said they are broken because when I clicked “Edit Post” in the wp admin bar, it redirects me to that broken pages. When I edit the posts in the actual Posts panel then it works.
1.) This is not possible without major modification on the theme since the title and excerpt belongs on the same container. Please hire a freelance developer to modify the includes > loop-index.php file.
2.) Please review the post above or I’ll explain it a little more clearly. The image on top of the post title is the actual “WP Featured Image”, this is the image that you set in the bottom right corner of the post editor. The one below the title is the image that you add using the “Add Media” button in the post editor. Now, my question, which one of these images would you like gone or removed? The css code above will remove or hide the featured image (the image above the post title) only on the actual post page (http://sonet.digital/blog/general/adwords-summit-2014/ –) :
.single .big-preview.single-big a img { display: none; }
Note that this code will not remove the featured images here: http://sonet.digital/blog/
Cheers!
IsmaelApril 17, 2015 at 9:45 am #430194This reply has been marked as private.April 17, 2015 at 10:59 am #430228April 17, 2015 at 6:51 pm #430532This reply has been marked as private.April 19, 2015 at 12:24 pm #430878One thing I noticed missing is on the mobile version the post preview images are not showing. I checked on a smartphone and nothing there?
April 21, 2015 at 6:37 am #431773Hey!
They are hidden by default on mobile because the space isn’t enough to contain both the image and the post content. You can add this in the Quick CSS field:
@media only screen and (max-width: 767px) .template-blog .blog-meta { float: left; margin-right: 20px; width: 20%; }}
Cheers!
IsmaelApril 21, 2015 at 1:27 pm #431952Thanks for your help Ismael.
Unfortuantely, that did not work, probably due to the customisations I have on the preview and snippet.
I understand your point about the space not being enough to display the images. Maybe I think probably best to leave them off then.Thanks
Vince -
AuthorPosts
- The topic ‘Customise Excerpt for Blog’ is closed to new replies.