Hi loggins,
thanks for that interesting question.
It is possible that placements don’t work here due to some constrictions.
If shortcodes work in your files then you could try placing a group shortcode into the content and test with that.
Please let me know if this works or maybe a bit more about the technology behind it so that I can come up with a bit more.
Thanks,
Thomas
Hi @loggins,
have you been able to make it work or is there still something I could help you with?
Best regards,
Thomas
Unfortunately, we have not been able to figure out the code to be able to pull in ads from Advanced Ads into MPDF.
Thanks for your feedback.
If default shortcodes from WordPress won’t work here either then I fear there is nothing I can help with.
Best regards,
Thomas
Let me clarify what we are trying to accomplish. We use MPDF script (located on a different domain) from our theme template using Advanced Ads. We are wanting to pull in the separate ad groups into our MPDF script, however i cannot seem to locate a direct code string (or link) which can called by MPDF where to pull the ads from (i.e. Ad Group ID: 8114) in our theme template.
I have created a layout in wordpress with an Advanced Ad group here https://newmusicweekly.com/tbuilder-layout/ac-ad/ however, in order for MPDF to recognize the image Advanced Ad would need to propagate an image, image tag, or something for it to be imported for MPDF use. Is this possible rather than just pointing to the “group” folder “ac-ad”?
Hi loggins,
thanks for the details.
You can load the content of an ad group using something like this:
$adgroup = new Advanced_Ads_Group( $group_id, $args );
$ordered_ad_ids = $adgroup->get_ordered_ad_ids();
echo $adgroup->output( $ordered_ad_ids );
By default, it should return you the HTML of a single ad.
You can find the code of that class in advanced-ads/classes/ad_group.php.
Does that help?
Best regards,
Thomas