Christian Schoen
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] Page not valid for ampI had the same problem. Finally I found that it was related to the Yoast SEO plugin. This plugin requires to enable amp support for pages in it’s amp settings section. After I enabled amp pages additionaly in Yoast, things worked fine. https://dasbestebuchderwelt.de/sprueche-und-zitate-zum-reisen/?amp
- This reply was modified 6 years, 9 months ago by Christian Schoen.
Forum: Plugins
In reply to: [Yoast SEO] Site crashes (gives 500 error) after updateHad the same Server Error 500 after the update to Yoast SEO 3.1.1.
I downgraded from PHP 7 to 5.6. This solved the problem for now.Forum: Plugins
In reply to: [AMP] Google Analytics with AMPI followed this example of Isabel Castillo and it worked perfectly for me:
Forum: Plugins
In reply to: [AMP] Google Ads Don't Show Up On AMP PagesHere is my actual version. Works well on two different websites. I used a code snippet from the readme file of the AMP GitHub Archive (thx. Mohammad Jangda!)
I adjusted it and wrote it to the functions.php of my child theme.
Not sure if this is perfect code, but it works for me.add_action( 'amp_post_template_footer', 'xyz_amp_add_advertisement' ); function xyz_amp_add_advertisement( $amp_template ) { $post_id = $amp_template->get( 'post_id' ); ?> <?php { //Advertisement printf(' <div class="amp-wp-content"><amp-ad width=auto height=200 type="adsense" data-ad-client="ca-pub-XXXXXXXXXXXXXXX" data-ad-slot="XXXXXXXXXXXXXXXXX"> </amp-ad></div>'); } ?> <?php }
>>> Here is an example link – The advertisement shows up in the Footer
Forum: Plugins
In reply to: [AMP] AMP pages show parts oft adsense scriptsUnfortunately I cannot edit the above information. The permalink did change and I have removed the adds from the non-amp page meanwhile.
So it i not longer useful to watch it as an example. But you are welcome anyway…
Forum: Plugins
In reply to: [Polylang] In-Post Language Switcher – mobile friendlySeams I didn’t search long enough…
The FAQ for developers did contain the required information.
The solution is simple for Twenty Fourteen.
In the content.php (in a child theme)
search for this line:
<div class="entry-meta">
And just below put this code snippet:<?php if ( is_single() ) : pll_the_languages(array( 'show_flags'=>1, 'show_names'=>0, 'hide_current'=>1, 'hide_if_no_translation'=>1)); endif; ?>
Forum: Plugins
In reply to: [AMP] AMP pages show parts oft adsense scriptsI think that amp 0.2 did solve the problem. The remaining script text is gone now. Ads do not show up, but I assume, that this is as it should be.
Forum: Plugins
In reply to: [AMP] Google Ads Don't Show Up On AMP PagesI am not a developer, so don’t beat me if this is stupid. I solved the problem in this way:
1. Locate this line in your template.php file:
<?php echo $amp_post->get_content(); ?>
This is the code to produce the content, as I assume…2. Add the following code directly above this line to get an adsense ad directly above the content:
<div class="ad-container"> <amp-ad width="auto" height="250" type="adsense" data-ad-client="ca-pub-xxxxxxxxxxxxxxx" data-ad-slot="xxxxxxxxxxxxxx"> </amp-ad> </div>
Replace the xxxxxxxxxx with your own ID’s. You will find them if you create a new ad in adsense.
You could add the same code below the content generation line and you can change width and height according to your needs.
Here is an example: https://amazingtemples.com/location/america/mexico/yucatan-getting-around/amp/
Would be interested to hear the opinion of developers about this solution…
Forum: Themes and Templates
In reply to: [Esplanade] Remove entry-titleJust to understand. Why would you want to do this?
Forum: Themes and Templates
In reply to: [Pilcrow] How to resize the Pilcrow Sidebars width?would be interested too