Best theme shortcode implementations - wordpress

I've been hesitant to pull the trigger on adding shortcodes to my theme and I'm currently testing some examples.
There are several ways to implement the shortcodes into the tinymce editor (from a usability perspective) and I'm looking for some examples that represent some of the better implementations you've seen.
For example, I could use a single button that opens a jQuery modal dialog window containing visual representations of all my shortcodes (similar to Optimize Press), or I could just list individual icons on the editor toolbar, one icon for each shortcode. I'm actually looking for an example of a hybrid approach using jQuery for enhanced usability.
Please share any insights or reference examples you have to themes which provide a good shortcodes implementation for users to apply shortcodes to their pages.

One of the most user friendly implementation for shortcodes I have seen, is the "Post Snippets" plugin which makes it very easy for any user to add customizable short code without having to write any code at all.
The unique tinymce button, with a jquery ui tabbed modal window and optional variable boxes presented as form is a very good hybrid solution. The code is rather light, and seems quite solid.
With its import/export options. I'd say it perhaps not even worth coding something yourself. You could simply tell your theme users to use this plugin and import your theme snippets.
Or if you want your own custom thing, like I myself lean towards, you could fork that plugin's code while retaining its import/export capability.

Related

What's the best Wordpress page builder for creating custom HTML blocks and controls?

I'm searching a most simple solution to create my own page builder system. I want to code my own blocks and then add to them some controls, only that what I choose.
So on firs fire goes ACF with ACF Extended. Works great until I didn't create more flexible fields. For example, I'm creating ROW (first flexible content) with a specified numbers of columns. Then, in each column I'm adding a BLOCK (second flexible content). Some of the blocks can contains other flexibles or repeaters. In ACF the problem is a lot of flexible and repeater fields. If is to much of them, then WP admin crash, data is saving, but sometimes only a partial.
So I'm searching other, lighter solution for that. I've tried I think every page builder like Elementor, WP Backery, Beaver. Problem is they are based on build-in elements and a lot of controllers. It's fine if someone want's to create site quickly, without coding. But I need a some kind of developer environment when I have control on each function of my HTML blocks.
So, is anyone knows what tool I could use for that?
Thaks!
You did not name it in your list, so what about the Gutenberg Editor?
It's already in the core of wordpress, so the wordpress developers thought, this is the best block editor.
You can easily create your custom blocks and controls with ACF:
https://www.advancedcustomfields.com/resources/blocks/
This may also help:
https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/
With Gutenberg, you can be sure, this is not an editor which will be gone in a few years. It will stay in wordpress core and it is only in the beginning of becoming the best WYSIWYG Editor in the core of a cms.

Wordpress slider which allows to dynamically change image or text from another plugin

I have developed a plugin for one of my client.
He wants some sections of the website including sliders to be editable. Is there any slider which allows to dynamically edit text / image of a slider programmatically?
We do not want to re-invent the wheel and would like to use any plugin if already available.
There are a few slider plugins that you could use. Some are paid, the others have a free version but offer paid features as well. You could try the following:
Revolution Slider
Master Slider
I've had experience using these in multiple projects that I have worked on. These ones are specifically for Sliders and JS based animations etc. but you could possibly build the whole website on it.
WYSIWYG editors also have the ability to do what you want to so maybe you could look into that. Examples: Elementor, Page Builder by SiteOrigin, Beaver Builder, etc. I've also had experience using SiteOrigin's editor as it is one of the earliest WP Editor Plugins. Elementor is fairly new but their UI and drag and drop features, IMO, are better or more advanced I would say.
There are tons of them! Just do some research and then come back here if you need any help!

Creating a plugin that adds functionality to a theme

Divi is a wordpress theme https://www.elegantthemes.com/gallery/divi/. It contains a video module https://www.elegantthemes.com/gallery/divi/documentation/video/ that allows you to add the URL of your video and then view it on your website. Currently it supports Youtube, Vimeo, etc. however does not support Wistia. Without going into detail Wistia is the only option I can use, and therefore my aim is to create a plugin that adds this functionality. However I'm going into the unknown and want further direction. My first objective would be to look into the theme code and find out how the theme is adding this functionality for Youtube, Vimeo, etc. Exactly how would I find the code? And then why wouldn't this functionality have been added to begin with? Would they have just left it out, or would it be another reason that might be preventing me from adding the functionality?
Every single include/embed/attachment etc. that loads from an external source, into Your app is done trough the usage of an API which Your source provides.
You won't be able to find much in their code since this is probably being done trough some custom shortcodes or hooks. In both situations, this requires custom modifications from their developers in order for the Westia API to work with the DIVI builder.
In Your particular case, Westia do provide an API but if DIVI didn't include that yet, I presume that this is because of the fact that Westia is a Niche video hosting provider, not a public one like Youtube / Vimeo. Therefore, I think that You should contact their support for more information on that issue.
You can try to embed your desired wisita video trough a custom object of some kind.
So in this case, You can go trough this thread right here by Elegant themes, and after you get acquainted with the methods to do so, head over to WISTIA's embedding options page and find out what fits your site best.

Advanced Custom Fields in wordpress

I am making my first steps learning to code. I made some courses on Internet and now I am building a Wordpress theme to continue learning from the experience.
The thing is that I am learning how to install a jquery slider plugin and I see that it's necessary to install advanced custom fields plugin and the repeater plugin that is only available in his pro version ($25) and that's not cool...
Now I would like to know if there is some free good plugin with the same functions of advanced custom fields?
I am just starting my experiments with wordpress to learn everything that I need to start building sites, so I don't have the enough experience to know if it worth to pay the $25 for the advanced custom fields plugin or not.
Do you have some suggestion? It will be something useful in the future? Are there other plugins that you recommends to download even if I have to pay for them?
There's so little context around what you're using the slider for and how much the site admins would need to update slides, etc., but I have two comments:
Do you need to use that specific slider? You could rig something up with custom post types, hide the editor and metaboxes, leave only a field for an image upload and whatever meta you like, and have the admin user just add a new post for each slide. Generate those posts in the PHP and have the jQuery slider take it from there. If you're just learning code, that might be more of a challenge, though. I just tend to resist paying for things when there are reasonable alternatives out there.
ACF is a worthwhile plugin. If the general context-free question is "Is ACF worth the $25?", the answer is 100% 'yes.' I use it virtually every day and often wonder how I'd make use without it. In your case, if you have other potential use for the project you're on, then yes, I'd say it's worth it. But still, in the simple context of a jQuery slider, I'm hesitant to purchase it just for that.

Dynamic options in Options Framework Theme

I'm using this plugin options to put my subject, I make a slide of photos, but do not want to set a limit of photos, would be added as needed, any idea how to do it?
Your safest bet here would be to create a custom post type that feeds the slide of photos as opposed to theme options. The customizor framework as it stands is temperamental and is used more as a user interface for previewing layout and styling changes.
http://www.layerswp.com/ is a theme that allows what you are looking for, but it is not the usual practice as it stands now.
With that being said there are plugins available that might be able to do what you are asking. The best one that I have found is Kirki (http://wptavern.com/kirki-a-free-plugin-to-style-the-wordpress-customizer-and-add-advanced-controls).

Resources