Forum Replies Created

  • In reply to: Increase Length of Post Excerpts

    #40808

    Thanks Kenneth, that worked a treat. Changing the “20” to a “75” gave me just what I wanted.

    Cheers mate,

    Mango

    In reply to: Older Posts returns Error 404 – Page Not Found

    #40501

    Re-saving the Permalink settings solved the problem, and infinite scroll is working great now. I should have thought of that.

    Thanks so much for your usual great support.

    Mike

    In reply to: h1 heading missing from front page

    #35153

    Hi Prasanna, yes you are correct. All good now, Thanks.

    Mango

    In reply to: h1 heading missing from front page

    #35151

    Greetings Prasanna, thank you, that worked well when added to Custom CSS in Graphene Options.

    Interestingly I tried adding it instead to style.css on the Child Theme but that didn’t work for some reason.

    Thanks again,

    Mango

    In reply to: h1 heading missing from front page

    #35149

    Thanks for your reply Kenneth and Salam. Yes I have thought of doing similar things to what you are both suggesting but I live in fear of being penalized by the Search Engines.

    It’s a shame the theme doesn’t take care of it in some way. It sort of defeats the purpose of having a custom header.

    Thanks again for your suggestions.

    Mango.

    In reply to: h1 heading missing from front page

    #35146

    Can someone tell me how to add a <h1> tag to my Home Page if I have disabled it in the Header section so that I can use my own banner.

    Thanks

    Mango.

    In reply to: Only show one Post on front page

    #33889

    Good morning Prasanna,

    This code works in limiting the Posts on the Home Page to 1, but of course it also limits Category queries to 1 and as such is unusable for my purpose. For some reason the Home Page thinks that it is a Category?

    <?php
    function number_of_posts_on_archive($query){
    if ($query->is_category) {
    $query->set('posts_per_page', 1);
    }
    return $query;
    }

    add_filter('pre_get_posts', 'number_of_posts_on_archive');
    ?>

    Regards,

    Mango

    In reply to: Only show one Post on front page

    #33888

    Still the same unfortunately Prasanna. Whatever number is set in the functions.php code, in this case 3, determines the number of Posts on the Home Page and Archive Pages.

    For example if I change functions.php posts per page number to 2 then 2 Posts will be displayed on Home and Archive Pages.

    Thanks for trying.

    In reply to: Only show one Post on front page

    #33886

    Hi Prasanna,

    I have tried those settings, Reading Settings = 1, and function.php using your code results in 3 Posts in Archive and on Home Page. It appears that whatever is specified in the Child Theme functions.php overrides Reading Settings.

    It seems not possible to do this.

    Thank you for trying to help.

    Mango

    In reply to: Only show one Post on front page

    #33884

    Greetings Prasanna,

    Thank you for your reply. My Graphene Child functions.php now looks like this:

    <?php
    function number_of_posts_on_archive($query){
    if ($query->is_home) {
    $query->set('posts_per_page', 1);
    }
    return $query;
    }

    add_filter('pre_get_posts', 'number_of_posts_on_archive');
    ?>

    However I still get the default number of Posts (3) on Home page?

    Can you think what I am doing wrong?

    I am using Graphene 1.82

    Thanking you,

    Mango

Viewing 10 posts - 1 through 10 (of 24 total)
Do NOT follow this link or you will be banned from the site!