Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1353266

    Hi,
    I am returning to work on my website after some time. I am currently adding blog entries and I have noticed something that did not seem to happen before. The general blog page does not seem to work regularly, as you can see here blog page
    The page contains just a masonry block. In the block, in the backend, there is a notice in Italian that says that this block uses the whole screen by default and if you put it in a column (where it actually is), it will take up the available space. Plus a red warning: Regulate the content width.

    Also, the single articles are ok except one where I have added and accordion slider: article with Accordion slider
    It shows this message either in the main part of the page or sometimes above the menu: Warning: Division by zero in /home/customer/www/elenagrassi.it/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_accordion/slideshow_accordion.php on line 1199
    and the side bar is moved downwards.
    Can you help please?
    Thank you. Best regards,
    Elena

    #1353306

    Hey Elena,
    The Division by zero error you are getting is because you have an empty accordion slider on the page, please remove the second accordion slider or add an image to it.
    I don’t understand the first issue, please include an admin login in the Private Content area so we can examine.

    Best regards,
    Mike

    #1353509

    Hallo Mike,
    accordion slider removed and it worked, thank you-
    Admin login included.
    Best regards,
    Elena

    #1353555

    Hi,

    Thanks for the update and login details. What exactly are you looking to achieve with the blog page? Please try to explain the problem a bit further, and what you would like to change or achieve.

    Best regards,
    Rikard

    #1353608

    Hi,
    I would like something like the way it looked in the original demo I am using (Health Couch), which is this demo blog.
    So a gallery of the blog entries, each with a photo, the title, the summary, and date.
    Thank you,
    Elena

    #1353657

    Hi Elena,

    We have modified your Blog page and made it two columns so it should look more like Health Coach’s blog.
    In order for it to look better, you’ll need to upload a featured image with equal height and width (preferred width and height is more than 705px).
    Please review your site.

    Best regards,
    Nikko

    #1353727

    Hi Nikko,
    thanks for your help. I have uploaded a 705x705px image in the first article appearing in the blog page but it did not look better as the image was only very partially shown anyhow, due to the length of the summary text. So I have set the masonry to flexible rather than “perfect grid” so all the photos are visible. The grid is not perfect anymore but I do prefer it like that. I guess with a perfect grid only a section of the photo is shown in any case.

    By the way, is there a way to show only, say, a couple of lines from the summary (or the article text) and then have a “read more” link?

    Best regards,
    Elena

    #1353842

    Hi Elena,

    There’s a way however the read more button is not really necessary since the whole article is linked.
    Here’s how you can limit the length of the summary (it includes adding read more button for visual purposes), just add this at the bottom of your child theme’s functions.php file:

    add_filter("avf_masonry_entry_content", function($content, $entry, $atts) {
    
    	$length = 16;
    	$more = "… <span class='avia-button avia-size-small av-masonry-read-more'>Read more</span>";
    	$content = wp_trim_words($content, $length, $more);
    
        return $content;
    }, 10, 3);

    Just change the length from 16 words to other number as you see fit.

    Best regards,
    Nikko

    #1353905

    Hi Nikko,
    I did not have a child theme actually.
    I did install one and copied that into the functions file. That worked, but the whole style of the website has been changed, as if all the style settings of the Health Couch template were cancelled. I removed the child theme, but nothing changed (although the style settings still look the same as before in the theme options general style section). How can I go back to the previous situation?

    Thank you,
    Elena

    #1353980

    Hi Elena,

    Have you imported parent theme options?
    The instructions are on this section: https://kriesi.at/documentation/enfold/child-theme/#toggle-id-4

    Best regards,
    Nikko

    #1354077

    Hi Nikko,
    no, I had not done that.
    I followed all the instructions and… it worked!
    Thank you very much.
    If I can, I have one last question about the blog entries. They now show the image, title, beginning of the summary and date. Is it possible to show also the category name?
    Best regards,
    Elena

    #1354227

    Hi,
    Perhaps try this solution.

    Best regards,
    Mike

    #1354334

    Hi Mike,
    I have tried, but nothing seems to change. No category name appears in the blog page masonry

    #1354381

    Hi,
    Thanks for the feedback, I added this to your functions.php and it seems to be working, please check.

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_cat', 10, 2 );
    function avf_masonry_loop_prepare_mod_cat( $key, $entries )
    {
        $categories = get_the_category($key['ID']);
        $separator = ' ';
        $output = '
    <div class="ww-masonry-cat">';
    	    if ( ! empty( $categories ) ) {
    	        foreach( $categories as $category ) {
    				if($category->slug == "whats-new" && is_page(13)) {
    					$output .= '<span alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</span>' . $separator;
    				} else {
    					$output .= '<span alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</span>' . $separator;
    				}
    	        }
    	    }
    	 $output .= '</div>
    ';
    
        $key['text_after'] .= trim( $output, $separator );
        return $key;
    }

    Best regards,
    Mike

    #1354412

    Hi Mike,
    thank you for your help.
    It does show the category name, but I don’t like how it looks that much, as it is in the same font, size and color as the summary and one can hardly understand it is a category name.
    Any chance it can appear in the same font and color as it appears in the article slider? (there is one at the bottom of the homepage).

    Best regards,
    Elena

    #1354470

    Hi Elena,

    Please try adding this CSS code as well:

    .ww-masonry-cat span {
        color: #719430;
        font-size: 12px;
    }

    Best regards,
    Nikko

    #1354854

    Hi Nikko,
    that makes it turn green and a smaller font size, though not the same font type as is the article slider in the homepage. I’m not sure what the font name is or why the category name link looks different in different places. It would be nice to have it look the same everywhere, for instance in each individual article page too. Is that possibile?

    Best regards,
    Elena

    #1354903

    Hi,
    Thank you for your patience I changed the function to this so the categories would be over the title like on your article slider in the homepage:

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_cat', 10, 2 );
    function avf_masonry_loop_prepare_mod_cat( $key, $entries ) {
        $categories = get_the_category($key['ID']);
        $separator = ' ';
        $output = '
    <div class="custom-masonry-cat">';
    	    if ( ! empty( $categories ) ) {
    	        foreach( $categories as $category ) {
    				$output .= '<span alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</span>' . $separator;
    	        }
    	    }
    	 $output .= '</div>';
    
        $key['text_before'] .= trim( $output, $separator );
        return $key;
    }

    and added this css to match your article slider in the homepage:

    .custom-masonry-cat {
    	 color: #719430;
    	 font-family: 'caveat';
    	 font-size: 16px;
    	 text-align: center;
         display: block;
         font-weight: 700;
         text-transform: uppercase;
    }

    please clear your browser cache and check.

    Best regards,
    Mike

    #1354908

    Hi Mike,
    yes! That’s how I wanted it, thank you very much!
    Can I ask you one last thing about the blog? Can we make the category name the same font also in each article’s page?
    Like here

    Best regards,
    Elena

    #1354918

    Hi,
    I changed the css to this:

    .custom-masonry-cat,
    .av-post-metadata-category-link a {
    	 color: #719430;
    	 font-family: 'caveat';
    	 font-size: 16px;
    	 text-align: center;
         display: block;
         font-weight: 700;
         text-transform: uppercase;
    }

    please clear your browser cache and check.

    Best regards,
    Mike

    #1354932

    Hi Mike,
    that looks great!
    I just noticed one thing though. I have placed an article metadata block at the end of each article page, with author name, date and category name. The category name though comes written in the “caveat” font now, but in a new line with a very narrow line spacing, and centered under the first line. If possible, I would not use the Caveat font here, but if it is not possible to differentiate, I would at least make the metadata appear on a single line or, as a second choice, increase the line spacing and align it to the left.

    Forgive me for another question: in the main blog page, the “read more” text after the summay of each article appears in English. Can we make it in Italian like in the article slider? (In Italian that is “continua a leggere”). Also, I have just noted now that, if I hover with the mouse over “read more” it shows me a text which corresponds to the photo title (which does not necessarily correspond with the article title). Can we make the article title appear there?

    Thank you for keeping up with all my requests.
    Best regards,
    Elena

    #1354934

    Hi,
    I have adjusted the metadata block and the “continua a leggere” text, but the mouse-over text is from the image title because the grid element is a link, we can not change the text but we can remove it, please let us know if you want to do this and check the other elements.

    Best regards,
    Mike

    #1354938

    Hi Mike,
    that looks perfect, thank you so much.

    Yes, please, let’s remove it.
    That’s all, at last.

    Best regards,
    Elena

    #1354939

    Hi,
    Ok, I added this script to your functions.php for your blog page masonry items on mouse-over:

    function custom_script() { ?>
      <script>
    (function($){
      $("#top.page-id-259 .av-masonry-entry,#top.page-id-259 .av-masonry-entry img").hover(function(){
        $(this).removeAttr("title");
      });  
    })(jQuery);
    </script>
      <?php
    }
    add_action('wp_footer', 'custom_script');

    please clear your browser cache and check.

    Best regards,
    Mike

    #1354944

    Great.
    That’s all. Thank you for your help

    #1354948

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘blog page not working regularly’ is closed to new replies.