Using ACF and CPT UI to create shortcode plugin
-
Hello WordPress Forum,
This is my first time ever asking for assistance on a forum but I can’t wrap my head around this problem. I am also kinda new to PHP and WordPress-development. I have searched a lot trying to fix this but I might be searching with the wrong keywords.
Sorry in advance if anything I say in this post is kinda stupid.
I want to create a plugin that contains HTML elements and CSS style. I want this plugin to help my coworkers to easily change images and links inside of this plugin. I want this plugin to be available to be shown inside of widgets by the help of shortcode.
My thought was to use ACF combined with CPT UI. By creating a post-type with specific fields bound to it.
Example:
Have a post with the field “Image” and “Link” called Custom Widget.
Take the fields key from ACF and put these inside the plugin so when a user from the Admin-panel changes these fields (Image and Link) it updates inside the plugin to show the correct image and link.The HTML element could for example be as easy like this:
<a href="fieldkey-link" target="_blank"> <img src="fieldkey-image> </a>
Take the shortcode from this plugin to present it on the frontend inside a widget.
I found a plugin that kinda do the same thing called “Shortcoder” but instead I would have to write the HTML and CSS and my coworkers would need to change out images and links inside the code, this will not work cause my coworkers don’t understand HTML and CSS at all.
My thought was that this was going to be easy, should be loads of information on the internet of similar methods but I cant seem to find it.
I don’t know if I’m on the right path at all or if there is a better way to make this but I thought using ACF and CPT UI combined with a own plugin would be easiest.
I just need a little guidance to lead me to the right path.
Thanks in advance for any help!
- The topic ‘Using ACF and CPT UI to create shortcode plugin’ is closed to new replies.