[Resolved] Want to change the layout of the homepage

Home Forums Support [Resolved] Want to change the layout of the homepage

Home Forums Support Want to change the layout of the homepage

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #1306272
    David
    Staff
    Customer Support

    How did you add the first PHP code? And is still added to the site?

    #1306278
    Mouse

    PHP code in the functions.php
    and the CSS code in the additional CSS in the customizer.

    #1306722
    David
    Staff
    Customer Support

    do you have any other custom functions added to the site ?

    #1307039
    Mouse

    no its just functions.php that I can see.

    #1307464
    David
    Staff
    Customer Support

    Can you try adding the function to the Code Snippets plugin.

    #1308457
    Mouse

    Hi there, I am not understanding. Can you log in to the website and have a look?

    #1308595
    David
    Staff
    Customer Support

    This document explains adding PHP:

    https://docs.generatepress.com/article/adding-php/

    Towards the end it provides a link to the Code Snippets plugin.
    If you can test the code using the Code Snippets plugin we can determine whether there is an issue with the function or an issue within the functions.php

    #1309071
    Mouse

    Hi there… I already did that too, but it’s not working.

    Please have a look at this link.
    https://ibb.co/1bsXYcL
    Here you can see I numbered 3 points. 1,2 and 3.

    In 1 : In one the image is a link.

    In 2 : the text is also a link which does not show completely.

    In 3 : The text ends with the use of (…)

    I want to make a single clickable box. So they dont link to the post seperately (which is not good for SEO). Also want the title to show fully.

    And in the 3rd I want (…) to show or else it seems awkward.

    What you suggested is not working. Please help me. It’s been over a week now and it’s very frustrating and ruining the user experience. If you can just log in the website and fix it. I will be very greatful to you. Thanks.

    #1309295
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    We aren’t able to log in and fix this for users – sorry about that.

    The posts you screenshotted are not using WP Show Posts, which is why the code is not working.

    To remove links from GeneratePress featured images, you can do this:

    add_filter( 'generate_featured_image_output', function() {
        return sprintf(
            '<div class="post-image">
               %2$s
               %1$s
            </div>',
            get_the_post_thumbnail(
                get_the_ID(),
                apply_filters( 'generate_page_header_default_size', 'full' ),
                array(
                    'itemprop' => 'image',
                )
            ),
            apply_filters( 'generate_inside_featured_image_output', '' )
        );
    } );

    To link the entire container, you can do this:

    .generate-columns .inside-article {
        position: relative;
    }
    
    .generate-columns a:before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }
    #1310669
    Mouse

    Hi… Again.. where do I place these codes?
    Also How to I make the title show completely in the container?

    #1310944
    David
    Staff
    Customer Support

    The code starting with add_filter is PHP:

    https://docs.generatepress.com/article/adding-php/

    The other code is CSS:

    https://docs.generatepress.com/article/adding-css/

    #1313300
    Mouse

    Hi worked like a charm. Thanks.

    Now Just need the titles to show fully. Right now the post titles do not show fully. Please help with that as well.

    #1313775
    David
    Staff
    Customer Support

    The Dispatch Site uses some CSS to trim the titles to 2 lines.
    Go to Customizer > Additional CSS and delete this:

    .generate-columns-container article .entry-header .entry-title,
    .wp-show-posts article .wp-show-posts-entry-title {
        line-height: 2.5ex;
        height: 5ex;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #1314432
    Mouse

    Hi thanks again that worked perfectly.

    And also I am sorry to bug you so much. But I also want to make this image sticky in my sidebar. Can you also let me know what should I do to do that?

    https://ibb.co/BG6R9Gm

    #1314495
    Leo
    Staff
    Customer Support

    Can you open a new topic for the new question?

    Thanks 🙂

Viewing 15 posts - 16 through 30 (of 32 total)
  • You must be logged in to reply to this topic.