How to replace plugins in wordpress? - wordpress

I am working on a website built on wordpress in which I want to replace some plugins. The reason behind the replacement of those plugins as it is no longer developed. The most important plugin which I want to replace is Accordion Shortcodes.
From the tutorial mentioned here,
Accordion Shortcodes is a simple plugin that adds a few shortcodes for adding accordion drop-downs to your pages.
The accordions should blend seamlessly with your theme. However, you may want to edit your theme’s main stylesheet in order to add some custom styling (see below for sample CSS).
Problem Statement:
I am wondering what best practice I need to follow in order to replace a plugin in wordpress. Also, what would be the best replacement for Accordion Shortcodes, Modify Attachments Meta ?

John, Your title says "How' and the above two answers describe "how". However reading the text implies you want people to tell what plugins are best to replace your existing plugins with. As the comment says, plugins do not always 'replace' each other exactly and may have many more features. Judging by the names of the plugins, I think you need to understand why and how those plugins are being used. An approach:
Discuss with the site owner what features they care about and what are 'nice to have'. They may not know which plugins are delivering which aspects of the website, so very important to know what are the absolutely important aspects. They may no longer need some of those plugins (eg: Modify Attachments Meta? might be a tool used to do something and no longer needed?)
Assess what features are being delivered by each of the outdated plugins, and which are important or non essential.
Research for alternate plugins that provide the features that are important
Review the best candidates and test them on test copy of main site.
Work out what if any conversion may be required. EG: if's access control, how is it doing the access control? how would you convert that?
Test the conversion, test the new plugins on converted data.

You can simple deactivate plugin and then remove the plugin.
Here is a plugin suggestion
https://wordpress.org/plugins/accordions/
You can use this plugin instead of that outdated version of the Accordion Shortocdes plugin.
Please let me know it helps to you.

Here's how I like to go about replacing plugins:
Identify any shortcodes it provides, and search your database (via either PhpMyAdmin, or a database search plugin like Better Search Replace) for that shortcode. This will identify all the posts & pages you'll probably need to update.
Save any custom CSS or other configuration data that might be relevant to the replacement.
Assuming there's no conflict between the old plugin and new one, install & activate the new plugin. Then you can begin replacing the usages of the old plugin one by one (and modifying the configuration of the new plugin to get it "just right").
After you've done all the replacements (which you might want to verify by another database search), deactivate and remove the old plugin.
This is how I do plugin migrations. In your case, in step 3, you could probably install each of the plugins you're considering, try them out, and only do the full migration for the one you like best.

Related

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.

Custom code in Wordpress: what are the programming limitations?

I have a website (www.easterisland.travel) that I'm considering converting into a Wordpress site. Why? Basically for the following reasons:
1: To use a CMS, so that I can teach others to further add content to the website without having programming knowledge. I would built the advanced pages myself though, and the pages that others would manage would be simple information pages.
2: Access to all of these great plugins, for example the "similar pages" plugin at the bottom of each page (which I haven't found as a independent solution for raw webpages), which is just fantastic to keep people reading.
At my site I have lots of custom stuff like booking systems that I've created. There's an AngularJS shopping cart (www.easterisland.travel/tours/), instant online booking and payment (using PayPal's Express Checkout) etc. There's a page for cruise ship shore excursions (www.easterisland.travel/cruise-ship/) that's automatically generated from database data, and I've created a system where I can add cruise ships and shore excursions (adding correct itinerary, price, info etc). Passengers can also log in and communicate to other future fellow travelers within the same group, and get organized for meeting up on the tour day. I have many more plans to go as well, for example showing hotel info, displaying TripAdvisor data (using TripAdvisor API) etc.
The million dollar questions are:
1) Can all of this be achieved in a Wordpress site? Can I add all of these systems using this platform? What are the limitations?
2) Would it make sense to change to Wordpress?
3) What implementation should be used? I don't want my code to be removed or altered when Wordpress is automatically updated.
Thank you!
Wordpress doesn't have any limitations, you can extend its default functionality if it can't accomplish what you need with either plugins or custom code. and having a framework is always better than building from scratch in many ways.
HOWEVER, wordpress was originally design as blogging platform, and if you plan on extending its simple functionality you should take some time to understand how it works to properly integrate your custom needs or things could get ugly,
If you know how to interact with the database, you can easily do what you want, there are built-in functions you can use according to your needs for database interactions or just create your own if it doesn't fit well very much.
just a quick overview with wordpress database.
wp_posts - where sites main front-end data are stored, like posts, pages,
wp_postmeta - storage for additional data that are stored on wp_posts
wp_comments - storage for user interaction data for wp_posts like comments, I've also used these before to store user/admin messages.
wp_terms - use for dividing/categorizing wp_posts data, like categories and tags,
wp_options - use for back-end storage data and configuration.
You'd need to check out these functions as you're probably will encounter them in the future
https://codex.wordpress.org/Function_Reference/add_post_meta
https://developer.wordpress.org/reference/functions/get_post_meta/
https://codex.wordpress.org/Function_Reference/update_post_meta
https://codex.wordpress.org/Function_Reference/register_post_type
https://codex.wordpress.org/Function_Reference/register_taxonomy
https://codex.wordpress.org/Class_Reference/WP_Query
If you also need database interaction, check out https://codex.wordpress.org/Class_Reference/wpdb
and for front-end implementation, check this out https://developer.wordpress.org/themes/basics/template-hierarchy/, though I never used any other wordpress theme except Genesis Framework for these past 5 years as I never had to mess too much with HTML codes and almost everything can be customize using actions & filters. I advise you to use Theme Framework (and remember to always use CHILD THEME to be safe from Main Theme upgrade)
You might also want to check -> https://github.com/WebDevStudios/CMB2 (I prefer to use this than Advance Custom Fields plugins.)
Booking system in wordpress is a bit complex, I've successfully use gravity form as booking system with AngularJS + Ajax, but never tried a custom one from scratch and don't have a chance to use booking plugin as never encountered a cleint that wants a simple booking system.
Just to answer your question.
Yes, It can, for comparison, take a look at woocommerce plugin functionality and features, I believe thats more complex than what you need.
It would make sense to convert a site built from scratch to any CMS (wordpress is an option), the CMS is up to you, though its better to use the one that you know more for easier integration and customization.
You can use your child theme "functions.php" for extending your custom functionality, like create a folder in your theme for all your custom code and include/require it on your child theme functions.php or better create your own plugin to properly integrate them, you can divide the functionality in plugins, like plugin for booking system and plugin for payment functionality. check this out https://github.com/hlashbrooke/WordPress-Plugin-Template
I hope this would give you an idea.
Yes you can do all that. You will need someone with knowledge in wordpress themes and plugins but it is possible. The beauty of wordpress is, that you can write "bare" php code, and the small amount of functions to interact with wordpress are well documented.
Wordpress itself, is structured "simple" (compared to fancy tools like magento for example). So all it manages, are posts / pages / ... which, more or less derive from the same database object. You can add functionality to those things (for example, make posts cruise ships and other posts to shore excursions) or you can add your own database structure on top.
The theme system is bare php code, so you dont have to crawl through a thousand lines of xml codes to adjust little things.
Wordpress power derives from its simplicity of the "core wordpress" and the feature volume based on all those plugins. I believe alot of people would say, that you should go for a custom solution (based on symfony for example), or a CMS that already comes with more of your desired functions (like magento which has the checkout / paypal included), but I (as a wordpress fan) would see no problem to take wordpress.
I have never failed to find a plug-in to do what I needed! I manage three WordPress sites - although none of them is commercial. (Yacht Club, Cycling Club and Political Party EDA).
There is a plug in that allows PHP on any WordPress page, but it means that the Editors all have to write using the text (HTML) view rather than Visual tab. I found that useful for some of my pages - and I'm the only "Editor."
There's also a plug-in that allows you to code PHP in Widget. That doesn't have the above disadvantage.

Can I edit a WordPress plugin and preserve my changes when the plugin updates?

I'm mainly interested in adding classes to a few of the containers in one particular plugin - so I can style those elements. I've saved the .php files, and kept notes of the changes, but cannot find a solution (if any) to maybe create a child plugin that will preserve my edits.
Thanks!
Not really. That's why plugin authors are encouraged to include hooks for other plugins to customize their behavior.
You could create a diff file with your changes and use it to try re-applying your changes after an update, but you might run into difficulties if the plugin code changes substantially.

Do I have to Upgrade WordPress to "pro" if I want to edit the CSS?

I started using WordPress just a few hours ago because I need to develop a couple of blogs to a client. I understand that WordPress is the best solution if you want something fast but flexible. But, the first thing that I wanted to do was just change the font of the post and I didn't find how to do it (for all the posts, because I changed it on this one using the HTML editor). I've read something about editing the CSS, but it turns that I need to buy the Pro upgrade to be able to use the custom design.
Is this the same if I use WordPress in my server?
I need someone to guide me on this one. I need WordPress as customizable as it can be. But, I prefer not to pay! :) Unless that's the only way to do it.
If you use WordPress on your own server, you can do anything you like to it - it's open source. The "Pro" upgrade is just for WordPress blogs hosted on the commercial WordPress.com platform.
Do note that running your own installation means you're responsible for adding plugins, themes, keeping the code up-to-date, etc. That has a cost too, even if it's not money directly out of your pocket.
If you are using wordpress on your own server - you are free to do anything with it. The best way to customize your site then is using a child theme. It will contain your customization, overriding styles from previously loaded parent theme (and/or adding some scripts). You will be able to upgrade parent theme then without loosing your customization (until parent theme owners deprecate something you use, but it must not happen often). There are some plugins for simplifying working with it as well. There are also some easier customization ways, if you want just minor changes - such as Custom CSS in Jetpack plugin, which works in similar way, as far as I know.
If you're using a wordpress.com account, you have less freedom in modifying things, consider using paid custom CSS plugin maybe. Or maybe mentioned above jetpack will do.
Also, as mentioned in other answers - there are wordpress codex, wordpress.org forums, and wordpress stackexchange, they seem to be better place for such questions.
In your wordpress admin section of your site (usually www.yourdomain.com/wp-admin) on the left hand side nav bar, you will find a section called "appearance", if you expand this and click "editor" you can edit all of the files that your current theme uses. A quick warning, if you are doing this on a live server, the changes you make are live as soon as you save them!!
Hope this helps
I'm pretty sure you do not have to pay to customize CSS. Check your server installation... particularly in the folder $wordpress_install_home/wp-content/themes/default.
You should have access to all the CSS files in there.

Assume that WordPress is an almost-there CMS. What Plugins would you add to the 'core' to make it equal to "Real" CMSes?

It's obviously a matter of some controversy as to whether WordPress is a CMS, but like it or not, it's an extremely popular platform.
Assume for a moment that it's an almost-there CMS.
What plugins would you add to the package to bring it over the threshold? ie, if you were designing a "WordPress CMS core", what plugins would you add?
Check out http://www.noupe.com/wordpress/powerful-cms-using-wordpress.html. It has a lot of great tips and resources for makeing WordPress a CMS.
FYI WordPress 3.0 is coming out very soon, (it's in beta) and it adds a lot of API for adding custom post types (akin to Drupal nodes). You can actually do it already in WP 2.9, but 3.0 makes it easier to do.
Beyond that, what do you need to make it a CMS? Pages are quite flexible if you use templates. The answer to your question depends a lot on what you want to do in particular.
I recently did a Page-only site (no "posts" section) using just the PageMash plugin. PageMash lets you organize your pages easily (put them in order), and it lets you hide certain pages. So I set the "posts" page to a particular page and then hid that page via PageMash. Create all the pages you like and organize them at will. Works nicely.
Actually you don't need any plugins to use Wordpress as CMS. But I used the following plugins when I built CMS, they were specific for my site:
qtranslate, cforms and exclude pages.
Since you probably use a lot of regular pages on "CMS" web sites I always install
http://wordpress.org/extend/plugins/cms-tree-page-view/
I am the one who created it, but it's true that I always install it and often I feel that I could not manage a site without it.

Resources