Ashish Jangra
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive PagesHi James,
I have understood how it is working and how to create custom template. So Please ignore above reply.
Only query is When I have Selected Specific Content type “Post” and below that I have selected singular >> Homepage, Blog , Archive then why AMP version on Blog home not working. It is working on All Category, Author, date archive.
Please advise!!
Thank you for you support so far.
Thanks
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive PagesHi James,
Thank you for your response, I have gone through the Documentation again, and i understood that if I want AMP on archive page then I must have to use
Transitional
mode. I have enable it and added code to my function.php inside main themeadd_theme_support( 'amp', array( // Works in Standard and Transitional modes. 'paired' => true, 'template_dir' => 'amp', ) );
As I want to have different view for amp and non-amp version so i have to create custom theme for it. So I have used template_dir attribute inside array.
After using this I realize two error
1. Default theme of AMP (/wp-content/plugins/amp/templates) in reader mode is not compatible with transitional mode. In this theme $this is used to initialize the function which is not working.
2. In transitional mode url struction is ?amp which i think We can rewrite using htacess rewrite to make easy like myurl/amp/
I would appreciate if you could help me these two last queries.
Thanks
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive PagesHey James
Added
add_filter( ‘amp_skip_post’, function( $skip, $post ) {
if(is_home()){
$skip = false;
}
return $skip;
}, 10, 2 );I want amp on blog home page and categories page
Forum: Plugins
In reply to: [Autoptimize] Return 404 Server failed to load the resourcesi have disabled CDN and its working proper .. But I am still interested to enable CDN
Forum: Plugins
In reply to: [Autoptimize] Return 404 Server failed to load the resourcesYes CDN is Active, I have checked alot and understand what cause it could be. As we are enabled CDN. When page load AO combine all css/JS and serve one separate file. So Whenever we load the page at very first time then it creates a file on wordpress directory but all files are serving from CDN.
Forum: Plugins
In reply to: [Autoptimize] Return 404 Server failed to load the resourcesHi Frank
It happens when you open the website in incognito mode and load very first time. At that time it returns the error. but when we load it again or refresh the page it works well.
FYI: We have wpengine and MAX CDN so i think there is some issues with that CDN.
Thanks
Forum: Plugins
In reply to: [Autoptimize] Return 404 Server failed to load the resourcesThat is true that the css files and are static and trying to be served by web server system but the reason it’s getting the 404 is because autoptimize is sometimes looking for a css files that doesn’t exist. For some reason it’s setting to look for a file like autoptimize_95dfd8123bebf248de9c1dc7ca92344a.css when the file on the server it had created is autoptimize_422016300efb86eb6221204b77eb0035.css so that’s why it’s getting the 404.
Those files are meant to change every once in awhile so it makes sense why it’s working every once in awhile but something on the page is causing issues with the page looking for a specific css file that doesn’t exist. It might be some sort of issue with caching browser and the files changing fairly quick but it might be worth looking into turning off that css caching so that it will continuing working on the platform.
- This reply was modified 5 years, 1 month ago by Ashish Jangra.
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive Pagesadd_filter( 'amp_skip_post', function( $skip, $post ) { if(is_home()){ $skip = false; } return $skip; }, 10, 2 );
Added but still not working
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive Pageswill this work on reading mode??
Forum: Plugins
In reply to: [AMP] How to add AMP on Blog Listing, Category & Archive PagesHey @jamesosborne Thanks for your reply. I can’t use transitional or standard cause I have multiple content types and I just want AMP on blog only.
As well as When i use any option from both transitional/standard my main wordpress theme front-end visible broken.
Thanks