exclude articles categories on mobile home

Posted in: Newspaper
Post count: 10

I searched the forums but didn’t find this issue. Can you help me on excluding some article categories from the mobile theme homepage?

Post count: 23312

Hello morajau,

Unfortunately, our theme does not have any such an option for it, sorry! Notice that is not a simple task and if you want to achieve this, you should make some customizations through the code. Also, if you are using the Mobile Theme plugin you should edit the core files from the mobile folder. If you want to display more levels in our theme and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for your understanding!

Post count: 10

Thank you for the reply. Before I surrender, I would like to give at a try with the code. I have some base knowledge, maybe you could point me to the files that i should edit?

Post count: 23312

Hello morajau,

Furthermore investigations, I found a solution. Please find out what the category ID is of your featured category. Say for instance that it is 26.

Now, inside of Newspaper\mobile\front-page.php you will find code around line 67:

$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
);

Make sure to add:

‘category__not_in’ => array( 26 ),
to the end of the array so that it looks like this:

$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'category__not_in' => array( 26 ),
);

Thanks for your understanding!

Post count: 10

you’re the boss! Thanks

Post count: 20

Hi Catalin,

I’ve been trying to make your shortcode work for the last half hour or so with no success…

$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'category__not_in' => array( 26 ),
);

I am currently using Newspaper 8 version 1.0.
Does ‘category__not_in’ => array( 26 ), still work in this new version?

Thanks

Post count: 23312

Hello Edamame,

Since it worked for @morajau it means that the code works as expected and should work for you, sorry!

Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.