Tagged: , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #940494

    Hello together,

    I have a problem and can’t solve it.

    I’ve created a simple page and put there “blog posts” from Avia Builder + set the sidebar visible. Everything’s good.

    But when I click now on a category I will be directed to the archive, where all blog posts are visible in full length,

    Questions:
    – Is it possible to shorten the words. For example the first 30 words should be displayed?
    – Is it possible to show the blog post image?
    alternative can I disable the archive and show a regular category?

    I hope you can understand me. :-)

    Thank you

    #940867

    First question is solved. I just put in every blog post a “read more” tag. WordPress shortened automatically on archive category pages.

    But I need help with my second questions: displaying a picture on archive category.

    Thank you.

    #941398

    Hi,

    Thank you for using Enfold.

    The featured image should display on the category or archive pages by default. Please provide the login details in the private field so that we can check one of the posts.

    Best regards,
    Ismael

    #941400

    Hello Ismael,

    Thank you. Here we go:

    #941886

    Hi DeltaSierra360,

    Here are some threads to consider:

    And this is how to add an image to a category
    https://wordpress.stackexchange.com/questions/255559/how-to-add-featured-image-for-category-without-a-plugin

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #941906

    Hello, it seems you don’t understand me.

    I have blog posts with images. When you visit the blog section you see the image and underneath the title with the text.

    Once you go to a specific category you just see the headlines and text, but no image.

    All I want is to display the pictures, which are already in every single blog post. I don’t want to set a category picture.

    Thank you.

    #941978

    Hi DeltaSierra360,

    For that you need to modify the category page layout. It can be done by the code from this thread

    Here are some threads to consider:
    https://kriesi.at/support/topic/how-to-customize-layout-of-archive-pages/#post-357286

    Just use

    
    if($context == 'archive') $layout = 'single-big';
    

    If you need further assistance please let us know.
    Just use a
    Best regards,
    Victoria

    #942050

    Sorry, that doesn’t work. I’ve put following code in my childtheme function:

    add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); 
    function avia_change_category_blog_layout($layout, $context){
    if($context == 'archive') $layout = 'single-big';
    return $layout;
    }

    But I only get this displayed above the header:
    add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-big'; return $layout; }

    #942056

    Hi,
    I have tested this code on my localhost, and it adds the post images from the default editor to the archive pages.

    //change category page layout to blog single small style
    add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); 
    function avia_change_category_blog_layout($layout, $context){
    if($context == 'archive') $layout = 'single-big';
    return $layout;
    }

    Although I couldn’t add the code to your site because I got this error:

    It was not possible to communicate with the website to check for fatal errors, so the PHP change was undone. You will need to upload your modified PHP file by other means, such as SFTP.

    Please try to do so with ftp, or include ftp access in the Private Content area.

    Best regards,
    Mike

    #942181

    Hello Mike,

    Thank you, that works! But only when I put it in the functions.php of the theme. I am using a child theme and don’t want to put that after every update. Is der a possibility to put that in childs functions.php?

    Yes, you can’t change things in wordpress code-editor. That’s because of my wordpress firewall. :-)

    #942219

    Hi,
    I tried disabling your firewall, but I was still unable to edit the functions.php
    The reason your functions.php for your child theme is not working, is because it is missing the opening <?php
    please add this and your function to your child theme functions.php:

    <?php
    
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */

    Best regards,
    Mike

    #942238

    Awesome! Now it works very good.
    Thank you so much for assistance.

    Topic can be closed. :-)

    #942254

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    and the video tutorials here
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Preview / Shorten blog posts in archive / category’ is closed to new replies.