Mobile theme – how to skip some categories

Posted in: Newspaper
Post count: 9

Hi there,

I wonder if it is possible to exclude some categories from the main page in mobile theme (while using that new plugin).

Currently it shows the newest posts. And I want to show the newest posts except for posts from some special categories.

Any advice appreciated!
Jiri

Post count: 22421

Hi,
Unfortunately there is no setting for this so it has to be made custom. You can add conditions to the code if you have the proper skills here: http://screencast.com/t/xzy7j5pSR8http://screencast.com/t/BTkvDxhhwer7
Thank you!

Post count: 9

I see, thank you. loop.php is easy – we can just add

if ( in_category( 'skipped category name 1' ) || in_category( 'skipped category name 2' ) ) :
continue;
endif;

after this line

while ( have_posts() ) : the_post();

I wonder how to fix front-page.php. We need to use something like

[td_block_big_grid_mob_1 sort="featured" category_ids="-33,44"]

instead of currently used

[td_block_big_grid_mob_1 sort="featured"]

but it seems category_ids isn’t supported attribute… Is there any hint to workaround?

thx
jiri

Post count: 22421

Hi,
Well the big grid uses featured posts. Those are posts you add in the featured category so you do not need to alter the grid code, just remove the posts from the featured category and they will not show up in the grid.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.