Hi Guys,
I recently asked how to filter the articles that appear under the (Related Posts) section in articles via code.
Today I would like to know if it is possible to show the (Featured Posts) category in the TagDiv Mobile Theme instead of simply showing my latest articles.
I know this is impossible via the theme panel, so I would ideally like to know where the code is located in the td-mobile-plugin.
Thanks.
-
This topic was modified 9 years by
Edamame Reviews.
Hi,
When using the mobile theme there is the top grid which displays featured posts. The next predefined section is the latest articles. If you want to make modifications to this section you can find it here
– https://www.screencast.com/t/QuLl5EmIgc3
Thanks
Hi Simon,
Thank you so much!
I literally spent all morning searching for that.
Unfortunately, it seems I’m not as skilled as I thought I was.
I would ‘either’ like to filter the posts by a given category or exclude a certain category from showing. Either one will work.
I have tried adding (‘category_id’ => ’65’,) and (‘sort’ => ’65’) neither of which seemed to work.
Is there anything else I could try?
Thanks again.
-
This reply was modified 9 years by
Edamame Reviews.
Hi Again,
After searching the forum a little more I discovered this code:
'category__not_in' => '2',
and
'category__not_in' =>array(category id goes here),
which seams to be working for most people.
Unfortunately, neither of the two options seem to be working for me.
My site is currently running on Newspaper 8 ver 1.0 and does not use Visual Composer, only TagDiv Composer.
Could you please point me in the right direction…
Thanks.
Hi,
You can check these topics for more information about removing a category from a loop
– https://css-tricks.com/snippets/wordpress/remove-specific-categories-from-the-loop/
– https://wordpress.stackexchange.com/questions/44672/exclude-the-category-from-the-wordpress-loop
Thanks
Hi Simon,
Thanks for the info.
I was just wondering is: ‘category__not_in’ a Visual Composer class?
If so everything makes perfect sense since I don’t have Visual Composer active on my site.
Thanks
Ok, so I’ve tested both:
'category__not_in' => '2',
and
'category__not_in' =>array(category id goes here),
both with and without Visual Composer and TagDiv Composer but with no real luck…
I am currently running the latest version of Visual Composer and TagDiv Composer bundled with Newspaper 8 ver 1.0.
Have I got any other options I could try?
Finally! I found a Fix.
Instead of using:
'category__not_in' =>array(category id goes here),
I tried using:
'category__in' =>array(category id goes here),
And it worked perfectly!
