• Hello everyone,

    can anyone help to clear this issue I have. Every post no matter I have categorised , show up on my BLOG and PORTFOLIO.

    Can anyone show me the way to clear this? I used Simply Exclude plug in but still do not show the BLOG and PORTFOLIO as excluding part of my posts.

    Any idea ? PPL from Toronto ?? Beers on me !

    Cheers,

    T.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Hi,

    Add this to your functions.php file:

    function myFilter($query) {
        if ($query->is_feed) {
            $query->set('cat','-5,-10,-20');
        }
    return $query;
    }
    add_filter('pre_get_posts','myFilter');

    Simply replace -5,-10,-20 with the IDs of the categories you want to exclude from your feed ??

    If I go pass Toronto I will give you a message bout that beer ??

    Thread Starter sagopakajmer

    (@sagopakajmer)

    Hristo – нещо българско ли осещам тук или ?? ???
    Hristo is a typical balkan name , I hope I am not mistaken ?

    Thanks a lot mate. The only issue here is that I have no idea how to put this code as I am not a developer and I have no idea how this works.

    But I appreciated your support.

    Cheers,

    Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Hi,

    Yes, I am Bulgarian ??

    You need to edit the wp-content/themes/YOURTHEME/functions.php file and add the code I’ve previously provided you with in it ?? If there is no such file, make one and upload it in that folder. In this case, however, make sure you enclose the code between <?php ?> tags ??

    Thread Starter sagopakajmer

    (@sagopakajmer)

    These are English language forums. Please use English.

    Thread Starter sagopakajmer

    (@sagopakajmer)

    Esmi , my apologies ! I’ll delete it ,and then we all go with peace.

    Cheers,

    T.

    P.S. – this post is here more than few days and no one replayed for help or any discussion , and now after few min I am receiving your warning. I thought important is to help each other no mater what language we use , right ?

    If you wish to use a language other than English, there are other WordPress support forums that you can use. On these forums, English is used.

    use WordPress plugin :RSS filter

    https://www.ads-software.com/plugins/rss-filter/

    you have option to exclude categories,exclude post

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘exclude categories from the main blog feed’ is closed to new replies.