- This topic has 7 replies, 2 voices, and was last updated 5 years, 7 months ago by
eflouret.
-
AuthorPosts
-
-
June 28, 2016 at 8:48 pm #6836
eflouretMemberSorry, I didn’t know how to write a proper title for my question. I’m not into this task yet, I’m still learning the workflow setup.
What I want to do is a newsletter creation system in my wordpress admin.
I created a custom post type “newsletter” and workflow for that custom type.
In the first tab I add all the custom input fields, with repeaters, for the content of the newsletter.In the second tab I would like to generate the proper html using a special responsive email html template I created. Then copy and paste that code in my Aweber account.
So, the second tab should be able to process all the information from the published post and generate a special html that I can then copy and paste.
I don’t know if I’m clear enough. It is a process similar to those sites, like youtube, that generate an embed code (tab 2) using user input variables (tab 1).
Is that possible with Piklist? I know everything is possible. But before I start messing around with code, I would like to know if there is some way to do that with Piklist or at least some hints on how to achieve this.
Thanks!
Enrique
-
June 28, 2016 at 9:17 pm #6837
eflouretMemberI forgot to mention that the newsletter is published as a post with my current web site theme.
And how about this to generate the embed code?:
In the functions.php file I add a publish_post action where I generate the newsletter embed code looping through all the post meta information for that newsletter post.
Then I save the embed code in another custom field that is then shown in the TAB2, where I can copy and paste it, and save it for future use.Do you think that’s the simplest way to go, or is there something in Piklist that can do this job easier.
Thanks!
Enrique
-
June 29, 2016 at 10:57 am #6844
-
June 29, 2016 at 11:20 am #6847
eflouretMemberHi Steve, thanks for your reply.
Sorry, let’s close this ticket until I have a more specific question to ask.
Thanks,
Enrique
-
June 29, 2016 at 11:46 am #6848
SteveKeymasterI wrote some sample code before I saw your latest response. I think it will help.
The idea is this:
1) Once you save the data from the first tab, it is available for the second tab.
2) Use standard WordPress functions like get_post_meta() to display the data in the second tab.
3) Use Object buffering to make it easy for you to layout your template with the get_post_meta references.
4) Display the data in a textarea field, for easy copying and pasting.Here’s my sample code. Please let me know if it helps: https://gist.github.com/sbruner/4065b29164835f207b3cec6ddf0ea9f9
-
June 29, 2016 at 12:02 pm #6849
eflouretMemberSteve, you are awesome. That seems to be what I was looking for.
I can’t think of better support than the one I get with Piklist!
I’ve just rated Piklist with 5 stars.
Where do I paste this code? I assume it goes in the functions.php file, but I’m not sure.
Thanks!
Enrique
-
June 29, 2016 at 12:10 pm #6850
-
June 29, 2016 at 12:11 pm #6851
eflouretMemberAwesome! thanks!
-
-
AuthorPosts
- The topic ‘Generating an embed code with post meta info inside a workflow tab’ is closed to new replies.