WordPress plug-in customization approach - wordpress

I understanding we may not have a plug-in that would fit in to our requirements in all respects. I am planning to use theme-my-login plug-in. However, it requires fair amount of customization in terms of adding more/custom fields for registering into site. There are some page redirections that I had to insert conditionally.
Can I tweak the code with-in plug-in files?
Should I be extending this through themes files/folders, withough tweaking in the plug-in file structure?
Thanks in advance

It all depends on what you want to change / add, and what the target plugin allows you to do. In general, you can customise some of what other plugins are doing by making use of available filters, actions, CSS, templates, and brute-force WordPress filter/action hooks if that's appropriate.
The Theme My Login, which you reference, presents its various views through templates that you can override either by dropping a customised copy of its template into your theme, or through a filter "tml_template". If what you want to change is the appearance, then you have lots of control through those two avenues. I notice that the plugin has various other filters you can hook, allowing you to customise many aspects of the plugin.
I suggest you start off by reading the plugin's FAQ which points you in the right directions already.

You can tweak the code with anything in Wordpress, but with caution.
If you are customizing wordpress themes, when the themes are updated by wordpress, any customizations are lost.
That is why Child themes are created.
You may find this link useful:
http://codex.wordpress.org/Child_Themes
I suggest creating a new plug in based on the customized code of the Wordpress plug in.
You may find this link helpful. It discusses Wordpress plugins and how to create them.
https://codex.wordpress.org/Writing_a_Plugin

Related

Wordress - How to work with non wordpress theme

I'm new to wordpress, and I want to know if it is possible to put a theme bought on shapedtheme.com for example on an existing wordpress.
And if so, how to do it. I don't know where to put the code of the theme. I saw the wordpress page builder with text, but I see tags with [] and not <>.
I saw on this thread that pages can be linked to php files. I don't see how.
I have full access to the hosting service's filesystem and can see all wordpress files.
I would also like to transpose the theme header and footer and if possible, use the theme cards to adapt to blog articles written in wordpress.
How can I do this ?
I searched for tutorials on google or related threads on SO with no luck.
Any ressource would be appreciated.
Thanks to anyone who will take the time to read/answer this post.
No, you can't use a non-WordPress theme in a WordPress installation since WordPress will look for specific templates and pass certain objects to the template to be displayed.
You could adapt it to work with WordPress, though. Here's the theming guide to get you started.
But you'll probably be able to find a WordPress-ready theme with the features you want. This is the WordPress theme directory link for themes using bootstrap.
Unless you go for a from-scratch development of a pure php theme, and you need some level of theme customization I'd strongly suggest looking into child themes, as it'll allow you to update the base theme minimizing the changes you'd have to do to yours.
The [ ] syntax you mention are shortcodes, small, safe php functions that can be executed by inserting them in the editor, templates, etc, and provide kind of an api that exposes WordPress or plugins functionality.
And regarding your link, OP already has a WordPress theme, but is looking for a way of using a different, specialized template on specific pages. This template still has to follow to certain WordPress conventions.

Is it possible to copy a CMS theme design to transfer to wordpress

I tried researching it but do not find a direct answer I am trying to move a kentico cms website to wordpress but would like to know if it is possible to copy the kentico theme design to then place it within my new wordpress website?
Thank you all feedback and suggestions welcomed.
Not without manually changing some parts around and adding the WordPress related functions, no.
While you'll probably be able to copy your CSS file, you will have to do the basic WP theme work, e.g. adding the informational comment to your style.css, make sure your header and footer call wp_head() and wp_footer(), add the functions to work with the loop to output content etc.
You can find lots of detailed documentation on creating themes in the codex.

How to create a plugin independent of theme in Wordpress?

I need to create a plugin in wordpress that should be independent of theme. That means it can work on any theme. How can I achieve this?
As you say you need to create a plugin. Plugins are all independent from Themes.
Check out the official WordPress Codex entry for that.
Also if it is more simple just create a function in a separate file and include it via you functions.php with get_template_part(). Here are the Codex informations for that function.
All plugins are independent from any themes by default, so you don't need to worry about it.
If your concern is to avoid conflicts with all themes, there's no common rule to achieve that. It depends on what type of plugin you are creating and how are you creating it. You just have to think of all possible issues that may come later by any theme and make a way to avoid these.

How to extend plugins into my theme directory or customize plugin without touching the core files in wordpress?

I would like to know if there was any methodologies to inherit or extend a plugin files to theme directory as woocommerce did and customize them without touching the base/core files. please share any links or thoughts
Thanks
You're looking for WordPress's add_action() and do_action() functions. WooCommerce, for example, makes use of these functions by using hooks and filters for templates and functions.
For example, WooCommerce does things like do_action( 'woocommerce_before_main_content' );. This means that you can "add and action", override functionality, remove actions, and generally customize things how you see fit.
Not all plugins and themes ship with this functionality; but browsing the source code can often reveal instances of this. It's more of a courtesy by developers.

How to add recipe rich snippets to a WordPress website without a plugin?

I am a food blogger and have recently learnt about recipe rich snippets. I found some material online, mostly being about plugins. I tried using ZipList plugin, which is actually pretty good, but
For some posts, I cannot add pictures within the recipe box and
I cannot add alt text to my pictures (which I find to be quite SEO-unfriendly or is it?).
So, I was thinking of trying to implement it by myself onto my website.
Any good links or advice on how to do it? I tried looking on google but I am only coming up with plugin tutorials.
Yes, your search results are correct.
If you don't want to use a plugin, you have to code it yourself. But this is the kind of thing that you don't want attached to your theme's functions.php ("without a plugin"). Because you have to be able to swap themes and preserve this functionality. Themes are for design and content display. Plugins for functionality. All those themes with SEO incorporated are simply dumb.
So, you end up writing your own plugin. See this article: Create a functionality plugins instead of using Functions.php.
What is a functionality plugin?
Traditionally, if you wanted to create a new function for your blog to add to its functionality, the advice has been to add the code snippet to your theme’s functions.php file. Now that’s all well and good and it will work fine, but what happens when you change your site’s theme (which you can guarantee will happen at least every few years) or the theme gets updated? Since functions.php is located in your active theme folder, if you change your theme, it inherently becomes defunct.
All that being said, what I'd suggest is that you create a Custom Post Type to handle your recipe snippets. You'll have all the default functionality of WordPress customized to your needs. The CPT could have only Title, Content and Featured Image, eventually your own taxonomy (recipe categories).
Useful links:
Documentation of CPTs
Smashing Magazine tutorial
WP Tuts tutorial
Or you can use a nice plugin to create your CPT :)

Resources