Hey Chris, thanks again for your super detailed answer! It’s always very helpful.
Here is an awesome link with tons of information that can really tell you how to improve SEO-wise:
https://moz.com/beginners-guide-to-seo
Have fun. π
Thanks again Chris! Have a great day.
Hey Catalin,
To come back to this issue, it also happens with model images, which is an option in the NewsMag theme. When I press a model image to view the full-size version, the page scrolls down a lot. How to fix this?
Hey Catalin,
My bad, I was under the assumption that the gallery box was made by you guys. Stupid of me, obviously it’s not a part of the theme. Thanks again! π
Run your website through Google’s PageSpeed Insights for tips on how to optimize your website. Also put non-essential code at the bottom of your body, like Adsense and Analytics-code. π
That should bring you a long way.
I must add that the animation makes loading of images on mobile devices very slow. And I’m talking about a good few seconds here. You want the top images to load instantly, and those are the ones the visitor sees first anyway (above the fold). This is just my experience with it. π
Good luck with the migration! π
-
This reply was modified 8 years by
Torasko.
Any specific reason that you went for a NGINX reverse proxy? I read reports that it gives incompatibilities with WordPress sometimes, although I must be honest and say I haven’t really looked into it that much. Apache as the main webserver works just fine at the moment. π
Hey Chris, I’ve made my mind and stept off of AMP for now. Will optimize my pages further to make the speed go up and deliver a better user experience. Already upgraded to PHP 7.1, moved some non-essential JS-code to the bottom of the header, minified CSS + JS including above the fold optimization. It really works wonders so far. Have tried multiple times on a test-VPS to get http2 to run, but Custombuild 2.0 (DirectAdmin) doesn’t natively support it yet. The following tutorial for example:
https://www.vultr.com/docs/how-to-activate-http2-support-on-directadmin-centos
Everything goes well, until cURL comes around the corner. Online checks don’t show my websites using http2, and the following command is not being recognized: ‘curl –http2 example.org’. Can’t get it set up right, but might have to do something with the ISO that my provider uses for CentOS 7 + DirectAdmin VPS’s.
Anyway, that’s not a story for this forum. π
Thanks for your information so far! It has been very helpful.
Hey Chris, you bring up some very good points and for most parts I agree with you. I would be way happier without any form of AMP, especially since it could hurt SEO (double content). Since my website is targeting Netherlands and Belgium (written language is Dutch), the speed of the internet doesn’t really matter since we have both very good cable- as mobile connections. See the following:
https://www.iamexpat.nl/expat-info/dutch-expat-news/netherlands-has-fastest-internet-europe
The one major problem is when you’re content marketing products, which in return should deliver good DA-ratings (Domain Authority). The mobile pages that NewsMag delivers are working perfectly fine (with a few tweaks here and there). However, when trying to get content up in Google News, it’s more likely to happen with AMP-posts, simply because of the speed and simplicity they deliver. A normal page with cache gets loaded up in like 1.5 to 2.5 seconds, yet the AMP-version takes half a second or less, most of the time even lower than 200 milliseconds locally.
So to answer your question: No, the user experience doesn’t suffer when throwing AMP-pages out to just use the mobile version. Content marketing, on the other side, does in my current opinion. It also brings more maintenance and more chains in the line that could break.
Hey Catalin,
Bogdan has let me know that a fix in being worked on for the next version, so I’m looking forward to that. π
Thanks for your quick answer.
I haven’t been able to track the function down. Nothing in the code shows up with either ‘view’ or ‘count’ in it. I’m wondering if anybody has the solution for this, there must also be others that are using the AMP-plugin, right? Especially since Google is specifically targeting editorial-websites, which the Tagdiv themes are also for.
Any information would be greatly appreciated! π
Hey Catalin,
Thanks for your reply. I’ll do that. Would you like me to post the solution in this topic once your support team has found it? Perhaps other people could use it in the future. π
Hey Catalin,
I didn’t do anything with the child theme yet. I’ve just uploaded the version that was supplied in the zip from Themeforest and activated it. There is no custom code in there yet.
The amp_post_template_head() function still seems to exist. I can’t find the process_AMP_counter() in the PHP-code for the plugin, though. So I assume that this indeed causes the problem. I found something that resembles it, which is the is_amp_endpoint() function. However, this broke the website instantly:
[Thu Aug 31 09:27:22.368144 2017] [php7:error] [pid 22419] [client redacted:53621] PHP Fatal error: Cannot redeclare is_amp_endpoint() (previously declared in redacted/wp-content/plugins/amp/includes/amp-helper-functions.php:43) in redacted/wp-content/themes/Newsmag/functions.php on line 88
I’ve tried looking for functions in all of the files with the word ‘view’ or ‘count’ in them, yet come up empty. I’m afraid this is where my programming skills come to an end. The official readme also doesn’t include any information for as far as I can see.
Edit: I’ve used this documentation, where I also found the is_amp_endpoint() function: https://github.com/Automattic/amp-wp/blob/master/readme.md#handling-media.
No worries! I’ll wait for one of the TagDiv-people and will try to fix it myself in the meantime. Thanks anyway! π
Hey Chris,
Thanks for your answer! I’m checking the views in the WordPress admin-panel, which is not being cached by WP Super Cache. If you would like to take a closer look, I could send you the link over a private message or e-mail. π
Hey Chris, thanks for getting back to me! I’m wondering why it doesn’t then. Lucien’s code was exactly copied, and all the instructions were followed to the letter (except for if I overlooked something :D)
I’ve added the following code to my functions.php, like Lucien described in his reply very clearly. Yet the view counter still doesn’t seem to work. It has been over a year since that reply was posted and new versions of Newsmag have been released. Perhaps the code is outdated? Thanks in advance!
add_action( 'amp_post_template_head', 'process_AMP_counter' );
function process_AMP_counter() {
global $post;
if (class_exists( 'td_page_views' )) {
if (td_util::get_option('tds_p_show_views') != 'hide') {
td_page_views::update_page_views($post->ID);
}
}
}
No worries, thanks for your quick answer! The post you gave me is very helpful and I will give that a go. π
Thanks, I’ll check it out. Anything else that I should take into account with the AMP-enabled posts? Also, how about getting most of the header and footer of the normal posts into the AMP-posts?
As a side note, my frontpage is build with Visual Composer since I think TagDiv Composer wasn’t available then yet. I’m not sure if this is relevant, but you know it in any case. π
Hey Simion,
Thanks for your feedback. Have a great day!
I want to show the most popular posts of the last 7 days, but not show the amount of views an article has. π