Custom editor but if you intend to insert javascript / json then it will get stripped.
Alternatively I think there is a hook but I haven’t tried it (design 2)
add_action( ‘ampforwp_before_post_content’, ‘my_funx’ );
I have used this to insert stuff a the end of a page /post
add_action( ‘ampforwp_after_post_content’, ‘my_funx’ );
Here is a list of hooks
https://ampforwp.com/list-hooks-ampforwp-plugin/
-
This reply was modified 7 years, 6 months ago by
frenchomatic.
Thanks. It appears that I posted this in the wrong plugin support.
Sorry about that.
-
This reply was modified 7 years, 6 months ago by
nakita_dog.
Adding action to ‘ampforwp_before_post_content’ almost does the job, the code appears under the post title.
I’ve managed to get the code below <body> by adding action to ‘ampforwp_body_beginning’.
It does seem to work, but I am not 100% sure I am doing it right. See the code at the bottom of http://www.plaincitylife.com/2017/09/how-to-add-amp-auto-ads-code-to.html.
Hi @nakita_dog
There is indeed a hook called ampforwp_body_beginning
which allows you to add after opening body tag. But we already have a GTM option, you can use that.
Hi @homika
For the AMP Auto ads, we already have built an option for this but that update hasn’t been released, it will be out on 7th October.
Regards
Thank you Ahmed. Will be waiting for the update.
@homika
Thanks to You for using the plugin!