fb-instant-articles
fb-instant-articles copied to clipboard
Add option to disable plugin for a single post
As requested in #567 it would be great if we could allow people disable publishing on a per article basis. A checkbox should be enough.
any news?
Momentarily we are focused on fixing bugs and will prioritise feature requests after. Feel free to submit a PR though.
Thanks timjacobi in the meantime I discovered instant_articles_should_submit_post filter, that can be used to add a metabox to control single article. Example:
add_filter("instant_articles_should_submit_post", "my_instant_articles_should_submit_post",10, 2);
function my_instant_articles_should_submit_post($should_show, $IA_object){
if($should_show){
. . .
// get post meta managed by metabox
if(get_post_meta($IA_object->get_the_id(), "enable_ia"))
return true
}
return false;
}
Feel free to submit a PR and I’ll review it :-)
Working on this.
Thanks timjacobi in the meantime I discovered instant_articles_should_submit_post filter, that can be used to add a metabox to control single article. Example:
add_filter("instant_articles_should_submit_post", "my_instant_articles_should_submit_post",10, 2); function my_instant_articles_should_submit_post($should_show, $IA_object){ if($should_show){ . . . // get post meta managed by metabox if(get_post_meta($IA_object->get_the_id(), "enable_ia")) return true } return false; }
Hi, Is this still valid to exclude single post? So, I can use this code to exclude any post to FBIA? I am looking for a solution to exclude single post of FBIA. Hopefully, someone will guide me. TQVM
@Sazarimma see my pull request (#1011) which provides this feature.
Hi @paulschreiber , Thank you so much for your help. I am not sure how to implement this since its so confusing me and I am beginner. I want to know which one is correct.
I have to edit this one only right? > class-instant-articles-publish-meta-box.php based on this > add metabox action to toggle publish status Am I right?
I'm so sorry for taking your time. I can edit them myself, it just not sure which one and where do I start it first. So, if possible please show me the step. TQVM for your help.
@Sazarimma you're going to need to find someone who understands how to get a plugin from GitHub and install it on your server to help you out.
@paulschreiber No one will help me. But after I read a few articles, I understand that I have to download and upload it to my site. I download the plugin as shown on the image attach here. Is it correct? Currently, I have FBIA original plugin, do I have to remove it or just let it be? Sorry for many question. I want to learn. Thanks for your time.
@Sazarimma Yes, you need to remove the original FBIA plugin and replace it with the downloaded version from your screen shot.
@paulschreiber THANK YOU SO MUCH. I seriously appreciate it.
This issue has been marked stale because it has been open for 30 days with no activity. If there is no activity within 7 days, it will be closed. This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.