You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a dev environment that I'd setup and configured.
I'd been placing dfp blocks in twig files (I'm using timber) using the shortcode. Unfortunately, the ids I was using on dev will not be the same as the stage/production environments. I wondered if there was some type of import/export capability (ala ACF) that would allow me to do the basic config using the plug-in, but allow me to export the configuration so that I could manage it in code (and allow it to be more portable) across db instances.
Here's an example of what I'm doing in one of my twig files ...
It might be a better solution. Right now I have no plans for an importer/exporter, aside from the one I currently have to quickly import from DoubleClick. Originally I created this to make my job easier in an old position, but nowadays I don't have the time to implement more complicated features like an ACF-based importer.
However, since the ad positions are stored as custom post types with custom metadata, you could use the built in WordPress exporter to export just ad positions, then import them using the WordPress importer. Again, using the dfp_get_ad_position_by_name could be a solution for grabbing an ad position that is consistently named across installations.
I've a dev environment that I'd setup and configured.
I'd been placing dfp blocks in twig files (I'm using timber) using the shortcode. Unfortunately, the ids I was using on dev will not be the same as the stage/production environments. I wondered if there was some type of import/export capability (ala ACF) that would allow me to do the basic config using the plug-in, but allow me to export the configuration so that I could manage it in code (and allow it to be more portable) across db instances.
Here's an example of what I'm doing in one of my twig files ...
This is somewhat related to Issue #38
Perhaps there is a better way to accomplish what I'm looking to do.
If so, please let me know.
Nice plug-in by the way!
Thanks!
Matt
The text was updated successfully, but these errors were encountered: