I can confirm, that reinstalling tagDiv Composer solves this issue.
Could you point me to the file to edit?
Hello Calin,
can I somehow modify/hack the post loop, to make my CPT “podcast” appear?
It would be good to have a post-type filter in the post loop in the next version of Newspaper (or have a normal linked pagination for a flex bleck). By design it should be possible to disable the standard-pack-plugin and rebuild the same functionality. Now it’s unfortunately not.
Hello Calin!
Great! Thank you! This works for posts.
But I’d like to show not only posts, but also the CPT podcast. There seems to be no filter-option for post-types in the post loop like in a flex blog. How can I show CPT podcast also?
Hello Vlad,
I need a normal paged, numbered and linked navigation through the archive with links as ../page/2/ ../page/3/
With which flexblock offers this navigation?
Hello Don,
thank you very much for coming back to this issue. I’d like to add your solution to finally style my CPT. Where do I have to add your code? In functions.php? The code seems to modify the setting of a post. When exactly does this happen? It seems to modify the data when creating the draft. Am I right? Thanks for any further information.
Hello Calin,
thank you for pointing me to the Google-documentation. I was now able to generate an appropriate Google-code and deliver it with Revive. This works. For those who are interested, this is the Google-code (replace ad-client and ad-slot):
<style type="text/css">
.header_ad1 { width:320px; max-height:50px; }
@media(min-width:768px) { .header_ad1 { width:468px; height:60px; } }
@media(min-width:1141px) { .header_ad1 { width:728px; height:90px; } }
</style>
<ins class="adsbygoogle header_ad1"
style="display:inline-block;"
data-ad-client="ca-pub-xxxxx"
data-ad-slot="xxxxxx"></ins>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
Important: Although the mobile banner size is defined, there is a setting in Google adsense, that Google will still alter mobile ads. You have to disable this option.
Hello Calin,
it’s not about Revive. It’s just about a JavaScript. I need a working JavaScript do set different code for different devices. Like:
<div id="ad_area" style="display: block; text-align: center;">
<script type="text/javascript">
adUnit = document.getElementById("ad_area");
adWidth = adUnit.offsetWidth;
if ( adWidth >= 728 ) {
/* Leaderboard 728x90 */
adUnit.innerHTML = '<b>Banner1</b>';
} else if (adWidth <= 720 && adWidth >= 468) {
/* Banner 468x60 */
adUnit.innerHTML = '<b>Banner2</b>';
} else {
/* Mobile Banner 320x50 */
adUnit.innerHTML = '<b>Banner3</b>';
}
</script>
</div>
This code works with the default header but not with a custom header.
Hello Calin,
I found out myself, that method 2 works visually, but it just sets the non appropriate div-Elements as hidden, which is a bad solution. So in the background the adserver still serves 4 ads but displays only one. I need a solution where only one appropriate ad is served. All other solution destroy the click-statistic of my ads. And it makes the html-code unnecessarily big.
Hello Calin,
method 1 with the ad box does not work, that’s what I already tried.
For the second method: Does Newspaper only deliver the appropriate code for the device or does it just hide (via CSS) the non appropriate code? I’m asking to make sure that only one ad is delivered. Otherwise it would call also the hidden banners, which would not be optimal.
Hello,
or asked as a simpler question: How can I add different banner sizes for desktop/tablet/mobile in a header-template ad-area if I don’t use Goggle Adsense nor just graphical banners?
Hi Calin,
the layout is perfect on iPhone with iOS 13 and iPad iOS 13. I just wanted to know, if you checked older devices, too. And which older mobile devices are supported. But it seems, that only a very small amount of users is using older versions.
https://david-smith.org/iosversionstats/
This has been solved. It was a conflict with another plugin.
Ok. Would be great for the next version to have an option for CPT to add them to related article and more article.
Hello Calin,
thank you! Works great!
I put this line in all three case sections, to make sure, the category does not appear no matter if I filter the related articles by tag, author or category.
Hello Calin,
it’s nearly a week now and I hope, the answer has not been forgotten. Please tell me where to put the code to exclude the category. Thank you!
Hello Vlad,
I just tried to insert ad-code directly into an adBox element in my cloud header. I wanted to switch the code between the different screen-sizes (desktop, tablet, mobile …) and just found out, that the code is always the same. I’m not able to enter different code for the different sizes. Is this another bug?
Auto ads is no option for me, because I’m not only displaying Google Ads so I must have the control over the ad places, to sell them.
Hello Calin,
yes, the schema was not disabled (although I use Yoast SEO). Preview is working now.
But you should fix this with the next update, so the output does not show an error. The best solution would be a message to turn off schema, when a SEO-plugin is enabled 🙂
Hello Calin,
yes, this is what i did -> https://prnt.sc/q3e9ol but posts from that category still appear as related articles, although I also cleared the cache.
Any idea?
Hello Calin,
could you describe or show this a little bit more exactly?
I added a comma and the following line, where 3291 is the category I want to exclude, but this seems not to work
,
'category_id' => '-3291'
-
This reply was modified 6 years by
be2name.
Hello bettingspin,
we haven’t experienced your problems with WPRocket, but we don’t use the mobile theme of Newspaper. As a quick workaround a faster clearance setting of the WPRocket-Cache might be helpful.
There is also a setting in WP-Rocket to have a separate cache for the mobile pages. Maybe you should try to change this setting and see, if it helps.
No, the pages are not cached. As soon as I switch from child-theme to default it works.
Thank you Vlad, thank you Simion,
copying the single.php from this location and renaming it (in my case) to single-podcast.php fixed the issue. It was not necessary to copy loop-single also.
Please make sure, that this bug is fixed in the next update, so I can delete the file in my child-folder and the default template is used also for CPT. Thank you!
Hello Simion,
I just don’t understand this: Where in the composer-folder are those files to copy?
Which one do I use/copy to show my CPT in default style?
Unfortunaltely I just found out, that this issue has not been resolved for custom post types!
Even copying those two files into the child-theme folder nor changing the default template for posts brings back the normal style with sidebars for custom post types.
Switching to the default Newspaper theme shows CPT correctly.
Please help! What can I do to bring the layout back to custom post types, too?
-
This reply was modified 7 years by
be2name.
