Hi there,
If you want to embed unique HTML codes for each ministry partner in your WordPress posts, you can do this by using Toolset custom fields.
Here is how you could achieve this using Toolset:
- Navigate to your WordPress dashboard, find "Toolset" on the sidebar, and click on "Custom Fields."
- Click on the "Add New" button to create a new field group.
- Name this group something like "Partner Information" and select "Posts" in the "Where to include this Field Group" section.
- Add a new field to the group by clicking on "Add New Field." In your case, the new field would be something like "Donation Form Embed Code." For the field type, select "Single Line" if the HTML code can fit in one line or "Multi-line" if the HTML code is longer.
- Save your changes.
For more information:
https://toolset.com/course-lesson/creating-custom-fields/
To display the custom fields on the single post items, you either can use the Toolset Blocks by creating a template for a single post following the steps below:
https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/
Or, if you do not want to lose the single post template that you have already in our theme, you'd have to edit your theme's single post template. Insert the following PHP code where you'd like the form to appear:
<?php echo get_post_meta(get_the_ID(), 'wpcf-donation-form-embed-code', true); ?>
Replace 'wpcf-donation-form-embed-code' with the slug of your custom field.
Please note that this method requires some understanding of PHP and how WordPress themes work
Remember that inserting arbitrary HTML code into posts might pose a security risk, especially if multiple people can edit posts. Make sure to only insert trusted HTML code to prevent cross-site scripting (XSS) attacks and other security issues.
For more information:
https://toolset.com/course-lesson/limitations-on-html-content-in-custom-fields/