eanyanwu
Forum Replies Created
-
Ah, i see. That’s very helpful. As I understand it, those functions are conditional tags, and are only useful in templates correct? My guess is that probably all of those are returning
falsewhenapply_filters ('the_content', $content)is called in the WPGraphQL plugin.The
REST_REQUESTconstant looks promising. If you do end up trying that, we’ll try updating our AdInserter version. Even if it turns out not to work. Your explanations so far has been helpful. Thank youAnd how does the plugin do that identification now?
Could you explain what you mean by “call type”? I’m not too familiar with wordpress plugin development.
Yea, problem is that the “page where it doesn’t work” is not a wordpress page, but an http request.
This is the request i make that i expect to see AdInserter blocks in:
curl --request POST 'https://blog.logrocket.com/index.php?graphqlapi' \ --header 'Content-Type: application/json' \ --data-raw '{ "query": "query NewQuery {\n post(id: \"cG9zdDoyMzg5Mw==\") {\n id\n content\n }\n}", "variables": null, "operationName": "NewQuery" }'I’ll open an issue with the WPGraphQl people to get more clarification.
Thank you for you prompt response!I don’t control the code in question. I’m just trying to figure out if WPGraphQL is compatible with what AdInserter does for automatic insertion before/after paragraphs.
However, it sounds like you are saying that as long as any plugin is calling
apply_filters ('the_content', $content)and using the result, AdInserter should do Automatic Insertion on the content.If that’s the case, I think I’ll consider my question answered!
Perhaps you mis-understood. Yes, AdInserter works correctly on our wordpress site
My question is:
Is AdInserter expected to work when another installed non-theme plugin (WPGraphQL in my case) makes a call toapply_filters( 'the_content', $content )?Ok, I have enabled remote debugging. Here is an example with the blocks labeled.
I’m not sure how this helps though, like I said before the blocks are correctly displayed on the site.This is my employer’s wordpress installation, so it’s unfortunately not easy for me to reproduce, but here are some more details:
- We have a block configured like so
- It works fine when viewed on our site. You can see it if you scroll down to the blurb about “Experience your Angular Apps…”
- As part of a separate project, we are using WPGraphQL to expose the WordPress REST API as a GraphQL API. Our hope is that when we make an HTTP GraphQL request for the post I linked, the response would also contain the html for “Experience your Angular Apps…” blurb. But that is not currently the case. The content of the post is returned, the the AdInserter block is missing.
- This could be a problem with WPGraphQL, but I wanted to ask here first to confirm that AdInserter supports this use case before opening an issue with them