Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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
    #427147

    bump

    #427537

    Hi!

    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ünter

    #427641
    This reply has been marked as private.
    #428129

    Hi!

    Can you please provide links to the actual pages with the issue? Screenshots will help.

    Best regards,
    Ismael

    #428157
    This reply has been marked as private.
    #428856

    Hey!

    I tried to login but it’s not working. Tried more than 3 times: EDITED

    Best regards,
    Ismael

    #428875
    This reply has been marked as private.
    #428877
    This reply has been marked as private.
    #429445

    Hey!

    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,
    Ismael

    #429535
    This reply has been marked as private.
    #430164

    Hey!

    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!
    Ismael

    #430194
    This reply has been marked as private.
    #430228

    Hi!

    You can contact codeable: http://kriesi.at/contact/customization

    Cheers!
    Ismael

    #430532
    This reply has been marked as private.
    #430878

    One thing I noticed missing is on the mobile version the post preview images are not showing. I checked on a smartphone and nothing there?

    #431773

    Hey!

    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!
    Ismael

    #431952

    Thanks 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

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Customise Excerpt for Blog’ is closed to new replies.