Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import/Export Config #39

Open
mattpaz opened this issue Oct 21, 2015 · 2 comments
Open

Import/Export Config #39

mattpaz opened this issue Oct 21, 2015 · 2 comments

Comments

@mattpaz
Copy link

mattpaz commented Oct 21, 2015

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 ...

{{function('do_shortcode', '[dfp_ads id=373741]')}}

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

@mattpaz
Copy link
Author

mattpaz commented Oct 21, 2015

Maybe a shortcode using dfp_get_ad_position_by_name could be a good substitute for my case?

@chriswgerber
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants