Hide featured article in latest article list on mobile theme

Posted in: Newsmag
Post count: 23

Hello,

I now use the mobile theme on my site.

The featured article will appear twice on the homepage.
See screenshot https://drive.google.com/file/d/1_pFzq38xxvOwn4VXWRImdgWrSAOXHiFE/view?usp=sharing

Do you have a CSS code that hides the featured article in the latest article list on the homepage (as on the desktop version)?

Many Thanks!

Post count: 23312

Hi,

Unfortunately, the theme does not have any such an automated way to exclude that post when both sections display the posts from Featured, sorry! As you can do is to handle your posts from your Featured Category. Another alternative, in this case, would be to edit the code and add another category instead of Featured. You can follow the next topic from here -> https://forum.tagdiv.com/topic/mobile-theme-featured-posts/

Hope this helps!

Thanks.

Post count: 23

Hi Catalin,

Sorry, I do not understand what you mean. What happens if I change the category? The first (big) article will still appear in the latest article list. Or do I misunderstand this?

Does it possibly work in the other direction?
Is there a way to show only certain categories in the latest article list?
Then I put all categories IDs in the code and skip the featured category id. Is that a possibility?

I have another question about the mobile theme: I always get the same six error messages from the AMP validator, even though I set “Mobile + AMP” in the mobile theme settings.

https://validator.ampproject.org/#url=https%3A%2F%2Fzentrum-online.at%2Fsommereinsatzbereitschaft-im-noe-strassendienst-wird-fortgesetzt%2F%3Famp

If I only activate the AMP mode in the mobile theme settings, I can not change any settings in the AMP plugin. The AMP plugin always shows:

Your active theme has been built-in AMP support.
Paired: Reuses active theme’s templates to display AMP responses, but uses separate URLs for AMP. Each canonical URL may AMP URL, if the content is fully AMP valid.

Only if I deactivate the mobile theme I can select the classic AMP mode in the AMP plugin.

In classic AMP mode, I do not receive error messages from the AMP validator.

I’ve cleared the chache and also disabled all non theme plugins. But unfortunately it did not work.

Many Thanks!

Post count: 23

Oh sorry! I just noticed that I posted in the newsmag forum.
I use the Newspaper theme.
Thanks!

Post count: 23312

Hi,

Regarding your first problem, after some investigations, it seems to be a mini bug in our theme, when you are using the Mobile Theme plugin for mobile mode, sorry! Unfortunately, the duplicated posts are not excluded from the latest articles. I have added to our list of improvements and we hope to fix it in future updates.

I have checked your website AMP errors and all of these seems to comes from your Facebook Pixel implementation, as you can see here -> https://www.screencast.com/t/ww1POIXpoc1 Unfortunately, this conversion tracking has not been tested with our theme (AMP version) and we cannot say for sure if you will bring good theme results, sorry!

Thank you for your understanding!

Post count: 23

Hi Catalin,

I have found a solution in your forum that solves the featured article problem.

I added the code
‘category__not_in’ => ‘2’,
in mobile -> front-page.php at the “query used on Latest Articles section” and it works great!

About the second problem: you were absolutely right! All six AMP errors were caused by the Faceboo Pixle.

I have removed the Facebook Pixel now.

I inserted the Facebook pixel into “Theme panel -> Analytics / Js Codes -> Google Analytics and JavaScript Codes -> Header Script Code”.

Do you have an idea where I could insert the Facebook pixel without causing an AMP error?

Many Thanks!

Post count: 23312

Hi,

Please notice that our theme works as expected with the Google Analytics code as Tracking Code. If you want to add a custom trackings code, like Facebook Pixel or another one, you need to add here -> https://www.screencast.com/t/G5W9nJNYw You can check the following useful guide from here -> https://stackoverflow.com/questions/45455167/how-to-add-facebooks-pixel-into-googles-amp

Thank you!

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