So I am testing filtering on a category AND a filter on our staging website:
http://699.25a.myftpupload.com/
We are using v7.7 of the Newspaper theme and database. We are using [tagdiv] Block 18 and introducing it into a widget on the home page called Research and Resources.
The widget has the following configuration:
show 3 posts.
Filter is set to show only Research and Resource categorized posts (one category ID=10)
We are also filtering by tag-slug called:
rr-home
Here are the posts using that tag:
http://699.25a.myftpupload.com/tag/rr-home/
Note the Research and Resources sidebar on the tag page /rr-home is using a different widget with the same Block 18 and JUST filtering on the Research and Resources category without the tag filter. This works perfectly!
On the home pagem the Research and Resources widget on the right, with the tag filter for rr-home no posts appear, even though 1 post should appear — the one tagged with rr-home, namely: http://699.25a.myftpupload.com/451-research-rise-of-the-machines-part-1-has-the-labor-market-benefited-from-technology/
What am I missing here? Can’t category and tag filters be used together?
-
This topic was modified 9 years by
asirota.
Ok now this is really weird:
I used another tag called rr-data and implemented the same side bar with a category filter on Research and Resources and tag filter just like on the home page.. It works fine as expected.
http://699.25a.myftpupload.com/category/data-centre/
Will keep digging.
-
This reply was modified 9 years by
asirota.
Ok so I took the sidebar from the category page which is working as expected with tag and category filters:
http://699.25a.myftpupload.com/category/data-centre/
And added it to the home page using the widgetised sidebar. I was using the widgetised sidebar all along to use a different sidebar to the home page in the original post.
In theory since the SAME sidebar is being used in 2 places (home page and category page) the sidebars should render the same, but they do not.
One the home page I see only 1 post tagged with rr-data. On the category page I see 2 posts, which is correct. I have 2 posts with the rr-data tag.
Why is this happening? The only difference is that the home page is using Visual Composer whereas the category page is configured to use the sidebar in question using the Theme Panel “per category settings” .
-
This reply was modified 9 years by
asirota.
Hello,
If the sorting is the same, then the same results should be visible on both the homepage and the category page.
This could be a plugin conflict so please disable all plugins except visual composer, clear cache and reset cdn files if you use it. Please also check any custom code you might have added to the theme panel or the theme files. If you use a child theme, please switch to the main theme to make sure it does not affect the proper functionality of the theme.
Thank you!
Hi Bogdan,
I figured out the problem, and it has to do with a well hidden setting in the theme –
unique articles
Of course we had this enabled on the home page, but not on the category pages. Once I disabled the unique articles setting, everything worked as expected. We enabled this feature to avoid duplicate content on the homage page of the site which has a lot of blocks from various categories. Since articles sometimes use more than 1 category, this featured ensured no duplicate content on the home page — even in the sidebars!
The sidebar we were using on the home page was being filtered out by this feature!
I think the unique articles feature option should be used with great care. I wonder if there is a way to highlight on the edit page that this is turned on somehow? Right now it’s buried behind a tab under the content.
Thanks for your help.
ps. I am glad I didn’t follow your advice to start troubleshooting the website, Newspaper works great so I could not imagine something like this would be caused by a conflict — we’re good about not doing crazy things like this, although you never know do you?