Practical Tips From Top WordPress Pros

729

Practical Tips From Top WordPress Pros Recently I shared with you some advice from the WordPress community to beginners. But what if starting out is already a dim memory? What if you’re already so immersed in the world of WordPress that you dream of Trac and you bore your partner with talk of your latest achievement with custom post types?

Below are some tips from WordPress pros from across the community. Many of the tips cover development, but there’s also advice on business, running your website and, of course, getting involved with the community.

Wordpress-start-image
Image: Phil Oakley

Tips For Developers

USE EVERYTHING WORDPRESS HAS TO OFFER

WordPress’ core can do a lot for you, without you having to write a bunch of code. WordPress is much more powerful when you make use of its APIs and built-in functionality. “If you use WordPress as your framework,” says Trent Lapinski, “it will enable you to focus on developing an innovative plugin or theme.”

Matty Cohen recommends always looking for and using functionality available within WordPress before creating a function from scratch. “Examples of this include, at the higher level, using the WordPress Settings API and, at the lower level, using themedia_handle_upload() function to upload your files, rather than a custom upload routine.” Matty gives an example of this with his WooSlider plugin. In order to create a familiar and consistent experience for WooThemes users, he did the following:

  • He used the Settings API for the settings screen.
  • He added a tab to the “Upload/Insert Media” popup for creating shortcodes. This interface uses a combination of the Settings API, custom form-creation logic, and some custom JavaScript to create the HTML output and the shortcode.

Screenshot of WooSlider settings
WooSlider uses built-in WordPress functionality to make the user experience better.

Making use of everything WordPress has to offer results in less coding for you and a better overall experience for users. But those aren’t the only benefits. Amy Hendrix points out that the code you write will be future-proof. Writing your own scripts could eventually result in conflicts.

USE HOOKS

Hooks are the means by which you hook into WordPress and add your own code without modifying core files. There are two types of hooks: actions and filters. Action hooks are places where you can insert and run code. Filters are used to manipulate output.

If you’re working with WordPress’ core and with plugins and themes, then you should be extending by making use of all of the hooks available. Adam Brown maintains a list of all of the hooks that have ever appeared in WordPress.

IMPLEMENT HOOKS

Create your own hooks. By implementing hooks in your plugins and themes, you create opportunities for other people to extend them and create add-ons. Shane Pearlmanbelieves that by doing so, you “encourage plugin developers to make opportunities for the community to extend and also use them.”

Not only does this create opportunities for other developers, but you make life easier for yourself. “With a ‘well-hooked’ theme or plugin,” says Simon Wheatley, “you can make adjustments between clients, or between sites on a multisite setup, a lot more easily than by effectively forking your own code for every scenario.”

WRITE SECURE CODE

If you write plugins or themes, keeping the code secure is critical. How bad would you feel if your code was responsible for websites getting hacked? Brad Williamsrecommends learning how data validation pertains to WordPress. A detailed page on data validation can be found in the Codex; so, if you’re a developer, you have no excuse for writing insecure WordPress plugins and themes. Following the guidelines will ensure that your code is safe and secure from exploits and hacks. As Ryan Hellyer points out, “Having a beautiful website which does exactly what a client requires is great, but it’s not so great when it gets injected with spam links and is de-indexed from search engines!”

FOLLOW BEST PRACTICES

Ryan Duff and Brad Williams highlight some best practices that developers should stick to:

  • Make sure the data that you’re passing is always being passed in the way it’s expected to. Setting a variable on an incorrect line could result in a trickle-down effect of error messages.
  • WordPress has coding standards, so stick to them. This will keep your code in a format that all WordPress developers will recognize, making bug tracking much easier!

EMBRACE THE CODE BASE

Both Helen Hou-Sandi and Jake Goldman of 10up recommend that you spend time looking at the code base. As Jake points out, “Relying on the Codex and Google searches for solving unique problems with WordPress is like trying to tune a car’s performance without ever looking under the hood.” Rachel Baker also suggests looking at the change logs, and Silviu-Cristian Burcă points us to his advice in “How to Become a WordPress Guru.”

A good integrated development environment (IDE) for PHP — such as NetBeans, PhpStorm, phpDesigner or Vanilla Eclipse — will offer code auto-completion for WordPress functions and their arguments and will display documentation on functions inline. You’ll be able to easily jump to function and class declarations to study them. “Think the core code base is too scary?” asks Jake. “Pick a file in wp-includes and start reading — you might be surprised by how approachable it is, and how much you can learn.”

Looking at the code, as Helen adds, also increases the likelihood that you’ll find a way to contribute code to the WordPress project. You’ll also become familiar with plugins and themes, understand how people do things properly, and recognize when they get it wrong.

SHARE YOUR CODE

It’s in the nature of code in an open-source project to be shared, forked and iterated on. If you’re working on solutions, then share them with the community. “Share and publish your solutions, as a plugin, widget or theme,” says Cátia Kitahara. “Not for every project, but with most of them, we end up with a solution that could be of use to many others. So, do it as a way of giving back to the community. I know it takes time to prepare something to be distributed through the repositories, but remember the time WordPress saves for us!”

You could put your code on GitHub, which Ben Balter recommends:

“GitHub’s got a very different culture, and the ability for anyone to submit a pull request is a real game changer. It really lowers the barrier to contribute, and democratizes the entire plugin authoring experience. As a bonus, use GitHub’s built-in wiki functionality to maintain your plugin’s documentation (especially FAQ), so that anyone, even non-technical users, can contribute.

Lastly, if you have plugin tests, integrate with Travis CI so that you can automatically test pull requests before merging. To help you get started, a handful of tools are out there, such as GitHub → WordPress.org deployment scripts and GitHub wiki → WordPress readme converters.”

Eric Mann points out that if you’ve built your project in isolation, then you’re likely missing out on different approaches. Sharing your code with people gives them the opportunity to point out how it can be improved. WordPress itself is built collaboratively and is the result of hundreds of minds looking at it from different perspectives. If you want your code to excel, you should be sharing it, too.

USE CUSTOM POST TYPES

Taking advantage of custom post types for specific use cases is a great way to leverage WordPress. At the Theme Foundry, Drew Strojny has three custom post types: themes, stories and tutorials. This enables members of his team to quickly find and create content.

Drew recommends making custom post types even more flexible by adding custom meta data. This enables you to style your content and provides opportunities to reuse that meta data across your website. He provides the example of the meta data he uses with the “Story” post type in use on his “Customer Stories” page.

from : http://www.smashingmagazine.com/2013/03/20/practical-tips-top-wordpress-pros/

[quote font=”verdana” font_size=”14″ font_style=”italic” color=”#474747″ bgcolor=”#F5F5F5″ bcolor=”#dd9933″ arrow=”yes” align=”centre”]This Demo Content Brought to you by Momizat Team [/quote]

this is tags and keywords : wordpress themes momizat Tutorial wordpress templates

Compartilhar.

Autor

729 Comentários

  1. I’m not ure wheгe you’re gegting your іnformɑtiоn,
    but great topic. I needs to spend some tіme learning more օr undeгstanding more.
    Thanks for excellent inf᧐ I was lߋoking for this іnformation for my mіssion.

    Feel freee tto visxit my web blog :: online dating
    sites (freedatingsiteall.com)

  2. Pingback: http://tinderentrar.com

  3. Pingback: dating in india free

  4. Pingback: how much does priligy cost at walmart

  5. Pingback: ventolin price in uk

  6. Greetings from Carolina! I’m bored at work so I decided to check out your blog on my iphone
    during lunch break. I really like the information you present here and can’t wait to
    take a look when I get home. I’m shocked at how fast your blog loaded on my cell phone ..
    I’m not even using WIFI, just 3G .. Anyhow, awesome blog! https://atadalafil.online/

  7. Pingback: hydroxychloroquine generic names

  8. Hello! I know this is somewhat off-topic but I had
    to ask. Does managing a well-established blog such as yours require a lot of work?
    I am completely new to blogging however I do write in my diary
    on a daily basis. I’d like to start a blog so I can easily
    share my personal experience and views online. Please let me know if you have
    any kind of suggestions or tips for brand new aspiring blog owners.
    Thankyou! http://hydroxychloroquined.online/

  9. Pingback: tractor supply hydroxychloroquine wormer

  10. Pingback: capital rx pharmacy ivermectil

  11. Pingback: ampicillin stromectol

  12. Pingback: priligy coupon

  13. Pingback: plaquenil 100mg

  14. Pingback: ivermectin stromectol 6mg

  15. Pingback: rx stromectol capsules

  16. Усик Джошуа – смотреть прогноз букмекеров на чемпионский бой 25.09.2021 – Александр Усик проведет бой против Энтони Джошуа – котировки букмекеров Джошуа Усик смотреть онлайн Также в Лондоне состоялась традиционная битва взглядов. Накануне боя Джошуа – Усик в Лондоне состоялась церемония взвешивания спортсменов. Украинец показал 100 кг, а британский чемпион – 109 Все подробности на сайте

  17. Pingback: private prescription cost stromectol

  18. Pingback: ivermectina para que sirve

  19. Pingback: stromectol 3 mg tablets price

  20. Pingback: acheter du clivermectin

  21. Pingback: how to take ivermectin

  22. ? Узнайте, где сейчас смотреть все серии онлайн! Холостячка смотреть сезон 2 онлайн, купить, напрокат: Мы стараемся регулярно добавлять новых провайдеров, но мы не смогли найти предложения для https://bit.ly/holostyachka-29-10-2021-ru-ua

  23. Pingback: apple flavored ivermectin

  24. Pingback: ivermectin dose for head lice

  25. Pingback: viagra 1000mg

  26. Pingback: sildenafil prescription cost

  27. Pingback: online doctor prescription canada

  28. Pingback: fish hydroxychloroquine for sale

  29. Pingback: stromectol soolantra for sale

  30. Pingback: can i buy viagra over the counter in india

  31. Great blog here! Also your site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as quickly as yours lol|

  32. A person necessarily help to make significantly posts I would state. This is the very first time I frequented your website page and thus far? I amazed with the analysis you made to create this actual post incredible. Great task!|

  33. Befitting use of ivermectin 9mg. stromectol tablets for humans is best enchanted as a solitary measure with a full eyeglasses (8 ounces) of damp on an valueless inclination (1 hour before breakfast), unless if not directed through your doctor. To forbear unburden up your infection, rip off this prescription exactly as directed. Your doctor may want you to engage another amount every 3 to 12 months. Your doctor may also rule a corticosteroid (a cortisone-like panacea) for unspecified patients with river blindness, markedly those with stony symptoms. This is to steal trim the infection caused by means of the destruction of the worms. If your doctor prescribes these two medicines together, it is eminent to remove the corticosteroid along with http://www.stro-me-ctol.com. Weather them just as directed about your doctor. Do not be nostalgic for any doses. Dosing. The measure of this remedy drive be varied inasmuch as peculiar patients. Observe your doctor’s orders or the directions on the label. The following data includes on the contrary the run-of-the-mill doses of this medicine. If your dosage is another, do not modify it unless your doctor tells you to do so. The amount of prescription that you clutch depends on the perseverance of the medicine. Also, the number of doses you abide each era, the metre allowed between doses, and the length of nevertheless you study the remedy depend on the medical imbroglio in behalf of which you are using the medicine.

  34. Hey there! This is kind of off topic but I need some guidance from an established blog. Is it tough to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to start. Do you have any tips or suggestions? Thank you|

  35. My brother suggested I may like this blog. He was once totally right. This publish actually made my day. You cann’t consider simply how much time I had spent for this info! Thanks!|

  36. Good way of describing, and pleasant article to take facts on the topic of my presentation subject matter, which i am going to deliver in institution of higher education.|

  37. I catch-phrase the ad for an info twilight on the side of Ideal Protein on z pack azithromycin 250 mg FB site. Having tried other manipulate loss programs, of course I was skeptical of something unique, but marked to perceive what it was about. I was quite captivated with the donation and absolute to movement up. I didn’t yearning to be ‘counting’ this or that or having to see ‘how uncountable points this is value’. It’s from head to toe imbecilic, really. You about you’re going to be hungering, but in the denouement you absolutely secure to efficacy yourself to eat all that’s outlined on the menu plan. To me, the unlikeness with this plot is I feel I’ve been civilized on how I should be eating and what to look for in packaging.

  38. Fantastic items from you, man. I’ve bear in mind your stuff previous to and you’re simply extremely magnificent. I really like what you’ve bought right here, really like what you are saying and the best way during which you say it. You are making it entertaining and you still take care of to keep it smart. I can’t wait to read far more from you. This is actually a tremendous site.|

Leave A Reply

X