I’ve been working with WordPress since the dawn of time, and even though I peek at the source code regularly, I still discover new tips and tricks. I’ve compiled my own list of 21 techniques that are handy, clever, fun or best practices rarely followed. I hope everyone finds something new in the list!
1. WordPress Themes Has A Ton Of Built-In Scripts
Using the great wp_enqueue_script() and wp_enqueue_style(), you can include styles and scripts easily with dependency management. But did you know that WordPress has a lot of scripts already built in? jQuery, many elements of jQuery UI, jQuery Form, SWF Object, Tiny MCE, Jcrop and Thickbox are just some the better known ones. The whole list can be found in the WordPress Codex. If you’re interested in learning how to use the enqueue functions effectively, I recommend “The Developer’s Guide to Conflict-Free JavaScript and CSS in WordPress” right here on Smashing Magazine! WordPress Themes
2. Replace Built-In Scripts By Deregistering Them
If you live on the bleeding edge, you can use versions of scripts other than the built-in ones. Using a newer jQuery version is common (though not necessarily good) practice, which can be done in the following way
But do not do this just to brag about using latest stuff. WordPress includes the version of jQuery that it does to ensure maximum compatibility.
Use another version of jQuery only when encountering compatibility issues, such a plugin that specifically requires it.
3. Force Perfect JPG Images
This is a classic example of why working on a team is beneficial. My good friend Lars told me that WordPress doesn’t use 100% quality for images served on the website, to conserve space and bandwidth. He also showed me a solution, of course:
WordPress uses a default quality of 90%. This is fine in most cases; I doubt many people can see the difference. But if top-notch image quality is a must on your website (for a portfolio, photography, etc.), modifying the value might be best.
4. FeedBurner Redirection
FeedBurner is used on almost every blog that I’ve worked on, and yet I never know how exactly to set it up by heart. Thanks to Elio for writing “10 Tips to Optimize Your WordPress Theme,” which contains this snippet
- Using General Taxonomy Functions
A number of taxonomy functions can handle your custom taxonomies as well as the built-in tags and categories. The Codex’s reference of functions contains the full list of taxonomy functions. I particularly like using get_term(), get_terms() andwp_get_object_terms(). To make things more modular, I use these functions as much as I can, even for tags and categories.
6. Setting Up Sessions In WordPress Themes
Sessions are great for storing information between pages and are widely used on websites. WordPress doesn’t use them at all internally, so the session is never set. Using the following method, you can start a session on all pages before any output.
Note that, while sessions are generally pretty safe, implement IP checking or added nonce protection just to be on the safe side. As long as you’re transmitting non-sensitive data, though, you’ll fine. Check out Mark Jaquith’s great article on nonces for more info.
from : http://www.smashingmagazine.com/2013/09/26/powerful-wordpress-tips-and-tricks/
This Demo Content Brought to you by Momizat Team
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
Now powering over 17% of the Web, WordPress is increasingly becoming the content management system (CMS) of choice for the average user. But what about websites built with an outdated CMS or without a CMS at all? Does moving to WordPress mean starting over and losing all the time, energy and money put into the current website? Nope!
Migrating a website (including the design) over to WordPress is actually easier than you might think. In this guide, we’ll outline the migration process and work through the steps with a sample project. We’ll also cover some of the challenges you might encounter and review the solutions.
WordPress Themes
About This Guide
Before we get to work, let’s establish some context. First, this guide was written primarily with beginners in mind and will be most helpful for basic websites. Some of you will likely encounter advanced aspects of WordPress migration, but they are beyond the scope of this guide. If you’re tackling an advanced migration and get stuck, feel free to share your difficulty in the comments below.
OBJECTIVES
The objective of this guide is to help you with the following:
- Plan an effective migration to WordPress.
- Walk through the technical steps involved in migrating.
- Get ideas and resources to solve common migration challenges.
- WordPress Themes
ASSUMPTIONS
I assume you have basic familiarity with WordPress. Previous development experience with WordPress would be helpful, but not necessary. I also assume you have an existing website and design that you want to migrate to WordPress.
BASIC STEPS
Here are the basic steps that I recommend you follow for a typical WordPress migration:
- Evaluate website.
Work carefully through the pages on your existing website, identifying all of the types of content (standard pages, photo galleries, resource pages, etc.) and noting any areas that need special attention. - Set up environment.
Set up WordPress and get ready to import. - Import content.
Bring over and organize your content, whether via an importing tool, manual entry (for a small amount, when no tool is available) or a custom importing process. - Migrate design.
Incorporate your existing design into a custom WordPress theme. - Review website, go live.
Carefully review the import, making adjustments where needed, set up any URL redirects, and then go live. - WordPress Themes
With this outline in mind, let’s work through each step in detail.
Start With A Plan
The key to a successful migration is to carefully evaluate your current website. You need to figure out how to import and structure the content in WordPress before carrying over the design.
While the principles are the same across migration projects, the details often vary. So, below are two lists of questions to ask as you work out a plan.
IMPORTED CONTENT
- How much content needs to be imported (number of pages, number of images, etc.)?
- Is the volume low enough to be imported manually, or do you need a tool?
- If you need a tool, does one already exist?
- Can the content be categorized into the standard “posts” and “pages,” or does it call for custom post types?
- Does extra content need to be stored for certain pages (custom fields, taxonomies, etc.)?
- Will the URL structure change? If so, will the old URLs need to be redirected?
EXISTING FUNCTIONALITY
- Does the website integrate any third-party services (data collection, reservations, etc.)?
- Do any forms need to be migrated (contact forms, application forms, etc.)?
- Is access to any content restricted (such as members-only content)?
- Does the website sell products (digital or physical)?
- Do any administrative tools need to be carried over (such as custom CMS functionality)?
- WordPress Themes
A WORKING EXAMPLE
My brother, Joshua Wold, has volunteered a website to serve as an example; it’s for a side project of his in which he sells posters and postcards of a Vegan Food Pyramid. He built the website in plain HTML, with some basic PHP includes for the header and footer. Below is a screencast of me evaluating the website to give you a sense of how the process will work. Enjoy!
Set Up WordPress
Before importing the content, we need to get WordPress ready to go. If you’re just experimenting or if you prefer offline development, start with a local installation of WordPress. Otherwise, the next step is to install WordPress with your current hosting provider; or you could use the migration process as a great opportunity to move to a new host.
Once WordPress is up and running, you’re ready for action!
WordPress Themes
For our example, we’ve installed WordPress with the same host, setting it up in a wp directory for the duration of the migration process.
SETTINGS AND PLUGINS
With WordPress Themes installed, we’ll make a few minor adjustments:
- Update permalinks.
Go toSettings ? Permalinks
to make changes. In most cases, I’ll switch to “postname”-style permalinks. - Update users.
I create an admin-level account for myself and any admin or editor accounts that are needed for clients and collaborators. I also remove the default “admin” user name if it exists (a basic but wise step for WordPress security).
Depending on the needs of the project, we might have to preinstall plugins. Here are the major categories of plugins:
- Form management
Migrating a form “as is” is usually a mess; simply recreating it using a forms plugin is usually easier. My current favorite is Gravity Forms ($39+ per license). Other options are Formidable (with free and pro versions) and Contact Form 7 (entirely free). - SEO management
Search engine optimization (SEO) is a touchy subject. My philosophy is to build content for people, not for search engines. That being said, there is a common-sense approach to SEO that is solidly supported by the WordPress plugin ecosystem. And if your old website includes custom meta descriptions, giving them a new home during the importing process is important. I recommendWordPress SEO (free). - Multiple languages
If your old website supports multiple languages, WordPress has you covered. My plugin of choice is WPML ($79 per license, free for non-profits). Another option isqTranslate (free). - Security
WordPress security is a topic near and dear to me. The increasing popularity of WordPress has made it a target for security attacks. WordPress itself is rarely the problem; a poorly secured hosting environment or an outdated or poorly developed plugin usually is. I use managed WordPress hosting for the majority of my projects, which offers a good foundation for solid WordPress security. Options include WPEngine, ZippyKid, Pagely and Synthesis. In addition to managed hosting (and especially if you opt for a non-managed host), consider installing a security plugin, such as Better WP Security (free) or Wordfence (also free). Last but not least, review the “Hardening WordPress” guide in the Codex. - Backups
If you opt for managed hosting, backups are usually included (make sure, though). If you’re managing backups yourself or you want an extra layer of data protection, great options are available, including VaultPress ($15+ a month), CodeGuard ($5+ a month), BackupBuddy ($75+ per license) and BackWPup (free). - from : http://www.smashingmagazine.com/2013/05/15/migrate-existing-website-to-wordpress/
This Demo Content Brought to you by Momizat Team
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
How To Create A Twitter Widget for your WordPress Themes . Twitter needs no introduction.Wordpress Themes It has become the way to reach audiences for some people and companies and a place to hang out for others. Placing a Twitter feed on one’s website has almost become compulsory. Embedding a feed isn’t all that difficult if you are comfortable with Twitter’s default widget, but making your own will enable you to blend it into your website seamlessly.Wordpress Themes
The Result
The result of our effort will be a WordPress widget that can be placed in a widgetized sidebar. It will display the user’s details on top and the latest few items from the user’s feed. You can see it in action in our Musico theme, although the screenshot below says it all.Wordpress Themes
About The Twitter Terms Of Service
Because this is a custom widget, you control what and how elements are displayed. Make sure to read Twitter’s “Developer Display Requirements” to find out what you need to display. I will be breaking some of the rules for simplicity’s sake, but bolting on stuff will be a trivial matter once you’ve finished this article.Wordpress Themes
Note that conforming to the requirements is a must. If you do not, you run the risk of your ID being banned which means that your widget will not display any tweets.
First Step: Create A Twitter App
Before writing any code, we’ll have to get our hands on a Twitter app or, more appropriately, Twitter API credentials. The process is explained in a video that I made:
In case you prefer reading to watching a video, here are the basic steps:
- Log into Twitter’s developers section.
- Go to “My Applications,” and click “Create a new application.”
- Fill out the required fields, accept the rules of the road, and then click on the “Create your Twitter application” button. You will not need a callback URL for this app, so feel free to leave it blank.
- Once the app has been created, click the “Create my access token” button.
- You’re done! You will need the following data later on:
- consumer key,
- consumer secret,
- access token,
- access token secret.
-
WordPress Themes
Add Our App’s Details
To add some options to our theme quickly, we’ll be using the theme customizer, introduced in WordPress 3.4. Smashing Magazine has an exhaustive article on it, if you’re interested to learn more. For now, we’ll just add the bare necessities.
Adding the code above to your theme’s functions.php
file will generate a link to the customizer in the “Appearance” section of the admin area. To add some options, we’ll need to create a class. Add a file named MyCustomizer.class.php.
from : http://www.smashingmagazine.com/2013/06/27/create-twitter-widget/
This Demo Content Brought to you by Momizat Team
Recent Comments