Showing posts with label Plugins. Show all posts
Showing posts with label Plugins. Show all posts

Thursday, March 21, 2013

First Steps With WordPress

Let's take a step-by-step trip through your WordPress location and glimpse how the distinct purposes work and how to make your new location your own. During the first part of this tutorial, delight don't change anything inside the program unless it is part of the tutorial. After following these steps, you'll shortly be changing everything.

Log In
start by logging into the “administration locality” or the back end of your website. Visit your site's login page by putting "wp-admin" after your domain name (e.g. http://example.com/wp-admin). You can furthermore place "login" after your domain as of WordPress 3.4. Some topics supply a "log in" connection or pattern on the front end as well. Now log into WordPress using your username and password.

Start at the peak
After logging in you are on the main management Screen called the Dashboard. This is the brain behind your website, the place where you can let your creativity blow up, composing brilliant prose and conceiving the best and most beautiful website possible. This is where the association of your location starts - and this is just the start.

check propel Your WordPress location
Take time to look at the location before you get into the changing of things and figuring out how all of this works; it's significant to glimpse how the WordPress Twenty Twelve theme is prepared out and works. Consider this the test propel before you start supplementing on all the special characteristics.

The layout you are looking at is called a WordPress topic. It is the appearance of your website, fashioning the gaze of the site and the border of the content. The WordPress Twenty Twelve theme characteristics a "header" at the top with the name and tagline for your location. Below this is your Menu. Along the side you will glimpse some names and connections. This comprises Widgets Within the major middle part of the page is the content area. At the base of the page is the footer.

Let's gaze at the mail for a moment. There is a "name," and underneath the name is date the post was in writing, then the body of the post, and eventually some data about the post. This is called the mail meta facts and figures and comprises data about the mail such as the class allotted to that mail.

Scroll down the sheet and notice the bar at the end of the sheet. This is called the "footer." It says "Proudly powered by WordPress."

Back to the sidebar, you will see distinct sections with data. Among these you may find a register of latest Posts, latest remarks, Archives, classes, and connections to the Admininstration Screens, Log Out, and RSS feeds. This is part of the menu or navigation computer display that persons will use to move around your location, travelling to mails from distinct categories or time periods.

It's All in the minutia
Take time to notice the lesser minutia of this world wide web page layout and design. Move your mouse over the title of the item post. observe how it alterations color. This is called a hover. Most topics characteristic a distinctive hue or underscore when you move your mouse over a connection. Move your mouse over any of the connections in the sidebar. Do they change? Is the change the identical? You can change your link hovers to gaze distinct in distinct parts of your page. furthermore look at the hue of the connections. How are they tinted or underscored to stand out from the rest of the text?

Observe the little design minutia and where they are put inside the sheet. In the beside future, you may desire to change some of these details, such as the color of the title in the white carton at the peak of the sheet. If you recall that is called the header then you will understand to gaze within the header section of your method sheet, the document that controls the gaze of your world wide world wide web sheet, when you want to make alterations to it.

Take a fast journey round
For now you only have one post. It is residing inside a sheet that is prepared out as your home sheet or the front page. If you bang on the title of the mail, it will take you to the exact page for that mail. The first sheet or dwelling sheet of your location features the most latest mails on your location. Each mail name will connection to the genuine sheet of the mail. Some topic conceiveers conceive their lone mail pages to gaze distinct from the dwelling sheet. By banging on the title, you are taken to another world wide web sheet that examines distinct from the dwelling sheet.

afresh, in the lone post, pay vigilance to the layout and observe what is now different about the conceive components. Is the header distinct? Smaller, bigger, or a distinct color? Is there a sidebar?

mails are generally stored in classes and/or Tags so you can keep associated topics simultaneously. Right now you only have one category, but will shortly desire more. bang on the lone category that seems in the sidebar of the home page. You are now in a sheet that has been developed to brandish only the posts inside that class. Again, take a gaze at the layout and glimpse how it may be distinct from the home page and the lone mail.

Do the identical with the Archives. You may only have one post, but gaze at how the sheets are laid out. They may or may not change, but gaze at all of it to glimpse how it all works.

All of these changes are created from only a couple of documents called template documents and you can learn more about how they work in pacing Into Templates. For now, although, let's get on with how the rest of WordPress works.

WordPress Admin Dashboard
Now that you have an idea of how your site examines and what the distinct layout parts are called, it's time to check drive the WordPress management. This is like familiarizing yourself with the backend of your new website. In detail, the first page you see after logging in is called the Dashboard, a assemblage of data and facts and figures about the activities and activities on your WordPress location.

The Dashboard assists to hold you up to designated day on new and intriguing morsels of data from the numerous WordPress resources. In the corner it also characteristics a register of the most latest undertaking you've carried out on your location.

On the left edge of the computer display is the major navigation menu detailing each of the administrative purposes you can perform. Move your mouse down the register and the sub-menus will "fly out" for you to move your mouse to and bang. Once you choose a "parent" navigation section, it will open up to disclose the choices within that section. 

The various menu items are as follows:
  •     Dashboard
  •     Posts
  •     Media
  •     Links
  •     Pages
  •     Comments
  •     Appearance
  •     Plugins
  •     Users
  •     Tools
  •     Settings  
The links in the overhead register will take you to a sequence of items that will guide you step-by-step through every facet of the Admin Screens. You're troubled to get started, so for now, let's start with the Users computer display.

User Profile computer display
Click on the Users tab. The computer display will change and you will glimpse the computer display called All Users that displays a register of all your users; from here you can add or change living users and authors anecdotes. In the navigation list, click on the Your Profile list choice. This is where you will go in data about you, the scribe and administrator of the location. load up in the information and bang revise Profile when finished.

Now, let's gaze at some other powerful features of the WordPress Admin.

The Appearance computer display
The Appearance, topics computer display permits you to change the look of your location utilising different topics. topics are production styles that completely change the look of your location. conceived by WordPress developers and users, there are hundreds of topics accessible for you to select from. In your Appearance Screen, you will see register of actually established topics, encompassing the WordPress Twenty Twelve theme. To this quick-change method, easily bang on the Activate button under one of the themes recorded, then bang on your location title in the peak toolbar to glimpse how it gazes. Wow, you have another gaze and not anything else on the site has altered. It's that very simple.

proceed back to the look > topic Screen and bang the trigger button under the WordPress Twenty Twelve theme to convey the design back to what you had. To glimpse it afresh, click your location title in the toolbar, and there it is.

Add New mail computer display
Back in the management computer display, take a look at the mails computer display. You can use the tabs under the mails Menu to compose and manage your mails. Let's start by making your first check mail in the Add New tab.

If the computer display examines a little threatening, the Codex item on composing a mail will take you step-by-step through the method of composing a mail. Take a moment to read through the item and post your first application and then come back to this item and we'll take you onto the next step.

If you are in a rush, then simply fill in the spaces, one by one, in the post starting with the title and then compose a little test message in the post window. This is just for a test, so you can write anything you want. When you are done, bang the Publish button that is to the right of the post application window and it is done. You will then glimpse a bare compose a mail screen and you're prepared to write another post. proceed ahead. But do only three to four applications. There's more stimulating work ahead!

Now that you've gotten a seem for composing mails, you can view your mails by banging your location title in the toolbar at peak of the computer display. Now it's time to get down to the genuine work.

Designing meeting
All good websites come from a good design. noise redundant, but it's true. If you desire to create a good and solid website, you need a good and solid plan. I understand it's hard to do, and I understand you desire to keep poking and playing with this stimulating program, but it is time to take a shatter away from your computer and turn to the vintage paper and ballpoint. That's right, we're going back in time to when people really wrote things down.

On a part of notebook paper, or anything is lying round, recount your site. Take five to twenty minutes to come up with a reason for your site, or better yet, call it your operation Statement. 

Tuesday, March 12, 2013

How to create a wp theme

In this tutorial, we will apprentice how to accomplish our own acknowledging WordPress affair application Bootstrap. Bootstrap is a acknowledging framework for architecture web sites and applications, and it's a abundant starting point for architecture a acknowledging WordPress theme.

You don't accept to accept congenital a affair from blemish afore to auspiciously chase along. However, we do accept that you are adequate accomplishing things like abacus and alteration posts in the admin breadth or installing plugins.

The affair we will body is based on the Basic business website archetype you can acquisition over on the Bootstrap examples page. For this audience we will body out templates for the afterward pages and functionality:

  • Custom homepage design
  • About page
  • Contact page
  • News area with comments
  • A widgetized sidebar
  • Getting Started
Before we get started there are a few things you will charge to do:
Install WordPress
Download and Unzip Bootstrap
Install the Affair Test Drive plugin*
* You alone charge this plugin if you will be architecture the affair application a reside website and don't wish humans to see the new affair while you are developing it.

Once you accept these things ready, accessible the agenda with all your WordPress files and cross to wp-content > themes.

Once you cross to that binder actualize a new binder alleged “wpbootstrap.” Inside of that binder adhesive in the bootstrap folder.

Inside of that binder actualize a new book called index.php.

Now we're traveling to archetype the antecedent cipher from the archetype basal business website and archetype and adhesive it into the index.php file. Actuality is the antecedent cipher you wish to use. We've just affiliated to a txt adaptation of the cipher back it is too continued to bury in the column here.

Now that we accept a changeless HTML page, we're traveling to move on to creating the capital CSS page. WordPress requires a distinctively formatted animadversion to arise at the top of the style.css page. It uses this animadversion to get all of the meta advice about your theme.

In the aforementioned binder as your index.php page actualize a new book called style.css. WordPress requires a CSS book with the specific name style.css, so we can’t name it annihilation abroad or our affair won't work.

Once you accept created a style.css book at the aforementioned akin as your index.php file, add this animadversion to the top.

/*
Theme Name: My Theme
Theme URI: http://wp-tutorials.blogspot.com/
Description: A demo theme
Author: Badsha Mia
Author URI: http://wp-tutorials.blogspot.com/
Version: 1.0
Tags: responsive, white, bootstrap

This simple theme was built using the example Bootstrap theme "Basic marketing site" found on the Bootstrap web site http://twitter.github.com/bootstrap/examples/hero.html
*/

The endure affair we charge to do afore we install and alpha architecture our new affair is to upload an angel that will arise with our affair in the WordPress admin area. This angel needs to be 300 x 225 px and called "screenshot.png" You can use this angel or actualize your own.

We're now accessible to go into the admin breadth and install our new theme. Login to the admin breadth and go to Appearances > Theme. You should see WP Bootstrap listed as one of the themes.
It’s bright that none of the CSS is alive on this website currently, so in the next footfall we’ll alpha the action of converting this changeless book into a alive WordPress theme.


Most WordPress capacity cover the afterward files:
index.php
style.css
header.php
footer.php
sidebar.php

You will usually see a lot added than these files, but we're traveling to alpha with these files and body from there. Go advanced actualize abandoned files for the header.php, footer.php, and sidebar.php.
What we are traveling to do is yield all of the HTML that would usually be included at the top of every page and cut and adhesive it into the header.php file. Then we will do the aforementioned for all of the HTML that would commonly arise at the basal of every page and cut and adhesive it into the footer.php file.

Let's attending at what anniversary of these files attending like now. Again these are just .txt files that accept been affiliated to because all of the antecedent cipher would be too abundant to account here. You can archetype and adhesive the cipher from these files into your own .php files.


Sunday, March 10, 2013

WordPress Plugins & The Security Risk

WordPress a common and famous platform for blogging and wordpress plugins are very common and make the life of blogger easy

because a plug in can perform the work fast and accurately and it does not require so much technical knowledge and skills.

WordPress plugins are available for different purposes like to tweak your blog , for SEO purpose, social sharing purpose

and for security purpose. There are so many plugins are available to provide the security of wordpress blog and they

usually called the plugins to secure a wordpress but these plugins itself has several vulnerabilities and these plugins

also plays an important role to compromise a wordpress blog.



The point is very simple that the plugins may be very dangerous for the security of wordpress blog, so what are the

security risks? And how an attacker can take the advantages of insecure wordpress plugins ?



The biggest example is timthumb vulnerability, timthumb is a script and a plugin used for crop the images but meanwhile

timthumb can be used to hack into a website, there are so many other techniques that an attacker may use to hack into a

wordpress blog, for example a malicious person has created a plugins that contain the code of the malwares and can easily

hijack the session of the visitors, now the attacker might use some social engineering and the promotion techniques to

promote the plugins and suppose that the thousands innocent bloggers has installed the plugins on their blog it means that

their visitors can be redirect to the malicious website and can be the victim of the iFrame injection security attack.



The other point of consideration:



    Whenever you install a plugin, the extra php code will insert into the core wordpress files.
    Extra plugins are the burden on the administration and it consume space.
    Old plugin may cause the compatibility problem with your current (latest) wordpress software, so the plugin will break

and disclose the sensitive information of the server.
    Third party plugins may use some data from the third party website, let suppose the other website has been compromised

and the worm spread itself then your website will be the next victim.



Although the importance of automatic scanners and plugins exist but manual review and manual security checklist has its own

importance and we should not neglect it, beside automatic scanning do review the security of your wordpress blog by

manually and do not forget to review of the source code of plugins.



The main tips to remain secure from the plugins risk is to active on the plugins community, learn about the latest changes,

update the plugin whenever available.

Friday, March 8, 2013

How to Increase Page views and decrease rebound Rate in WordPress



When beginning out, most bloggers accept as true that it is super hard to get persons to your blog. while most professional bloggers believe that getting persons to your blog is the easy part. Getting the users to stay on your location is harder. Most users come to your site and end up departing without even going to the second sheet. When a client leaves without even going to the second page, it rises your bounce rate. It furthermore decreases your page views per visit. On a bigger image, it declines your publicity revenue. In this item, we will share with you tips and tricks that will help you boost page views and decrease bounce rate in WordPress.

 Before we start
permits cover some basics considering terminology and expertise. Bounce rate comprises the percentage of tourists who go in your site and “bounce” (leave the location) rather than continue examining other sheets within the identical location. sheet view is a demand to load a single sheet on an internet location. We use Google Analytics to track our data. You are greeting to use another analytics service, or you can simply establish Google analytics in your WordPress site.

Now that we have taken care of the rudimentary terminology, you are likely marvelling why the heck do these figures matter?

If you are running a site that is mainly monetized by banner publicity, then the number of page views issue. If you are endeavoring to build a loyal assembly, then the number of rebound rate affairs. Also the smaller your rebound rate, the better ads eCPM (cost per thousand) or CPC (cost per bang) you will get. When the identical client views the next sheet, your publicity provider most expected has a better publicity to assist them therefore giving you a higher eCPM or CPC.

We have consulted with a allotment of clients helping them increase their page views and decrease bounce rates. We have furthermore finished a allotment of experiments on our own sites like List25. So all the procedures that we will share are the ones that we have utilized in the past and understand that they work.

Interlink Your Posts
Anytime that you can interlink your other mails inside the post content, you are going to glimpse an increase in page views. In WordPress 3.1, interlinking got even simpler because you can simply seek for the mail you desire to link while supplementing links. Interlinking techniques work large when you have a location with a lot of items. If you are just beginning out, then you will be a bit restricted. So how do you proceed back and interlink older items when you have something new? You can manually do it, but it will take some time. There are plugins that permits you mechanically link keywords in WordPress (Although that item is displaying you how we did this for affiliate links, you can use it for internal connecting purposes as well). Not only does interconnecting help you increase page views and reduce bounce rates, it also assists with SEO as well.

If you want to glimpse an example of interlinking, then just gaze at the paragraph overhead.

Show Related mails After the Post

One of the major causes why the user depart your blog after reading the post is because you are not displaying them what to do next. By showing the user with a register of “related posts” or “other popular posts”, you may get them to go on to visit another mail in your site. There are a lot of ways you can add related mails to your blog. You can use a plugin called YARPP that has its sophisticated algorithm that picks the associated mail. You can display associated mails by class or tags without using a plugin. You can furthermore display associated mails by displaying other mails by the same scribe.

Show Excerpts on Front / Archive sheets
Showing excerpts on front/archive sheets have two benefits. First, it decreases sheet burden time. Second, it helps boost the page views. You should nearly not ever display full posts on your front sheet or archive sheet. envisage having like 25 images in one mail, and then have 5 of those on one page. It would be a awful client know-how because of (slow load time and super long sheet) which would make the user leave your location. We have a tutorial on how to display mail excerpts in WordPress topics. Most good topic structures like Genesis, Thesis, Headway etc. currently have this option built-in.
Dividing up Long mails
Are you composing a super long mails? Well, you can split it into multiple pages utilizing the WordPress <!--nextpage--> tag in your mail. Simply add it while you desire, and your mail will divide into multiple sheets. You can see an demonstration of how we divide our mails into two pages or even into five sheets. You have to be very cautious when doing this because if you do not have a adequate allowance of content on each sheet, then the client might get pissed of. We have glimpsed a alallotmentment of large-scale title sites like Forbes, NY Times, partition road periodical and others utilize this technique.
Interactive Sidebar
Your sidebar can play a vital function in expanding page views and decreasing bounce rate. You can display your popular mails in the sidebar. You can even customize it to display well liked mails by week, month, all time. You can also display your most recent mails only on single mail pages. We have glimpsed sites that conceive made-to-order images to navigate to exact mails of theirs. You can integrate other parts of your location in your sidebar for example look at our WordPress Coupons part or the gallery part in the sidebar.
Boost Random Browsing
On List25 we conceived a feature called I’m Feeling inquisitive. When a client bangs on this button, they will be redirected to a random post in WordPress. We put the button in our header bar which was a very warm spot. After glimpsing good outcomes, we completed up putting it on WPBeginner as well and called it Explore.

Create WordPress Plugins with OOP Techniques



Object-oriented code, among other equipment, can help systematize and add reusability to your code. In this lesson, I will instruct you the basics of inscription a WordPress plugin using object oriented techniques. We’ll be using Dribbble’s API as an instance for this lesson. Prepared?

What We’re Going to Learn:

  • Advantages of using OOP for WordPress plugins.
  • How to install a shortcode.
  • How to install a template tag.
  • How to allow shortcode in WordPress widgets.
  • Real-world instance by using Dribbble’s API.

Why Use OOP?

Before touching onward with this lesson, you should have at least an simple accepting of writing a WordPress plugin. Give it a study.
Building WordPress plugins with object oriented code is fairly well-organized and orderly, when compared to using procedural code. It’s easier to control the code base, and make bigger it using inheritance techniques, which can be chiefly helpful when writing a bulky plugins.

Dribbble

To inscribe a WordPress plugin, we first require a sense of way. We’re going to inscribe a plugin that will show the newest shots from(Take care This)  Dribbble, using their REST API. We’ll then add short code maintain for posts and widgets, and template tag for themes.

Step 1 - Setting up the Plugin Class

Object oriented code is supported on classes and methods (functions). Let’s build our core class, which will cooperate with WordPress’ hooks and filters.
PHP classes contain a constructor function, __construct, which is effected as soon as a new example of a class is instantiated. All WordPress hooks and filters will be registered under the constructor of our plugin class. Lets thrust in advance and schedule a shortcode for our plugin. The add_shortcode() function/hook will go beneath the constructor function.
The new example of a class/object is registered using the new keyword. Refer to the final line in the code underneath.
Perceive how we’re using an array in the recall function parameter? To register recall functions within an object, we have to apply an array.

The initial thing of the array mention the object, via $this. The next thing in the array is the method name inside the class. All hooks and filters have to be mentioned like this when surrounded by a class.

Step 2 - Dribbble API Class

Ever since we at present do not need any imagine API functions, we’re going to build a rather straightforward API wrapper for Dribbble. There is by now a library obtainable for Dribbble, but, for the sake of this lecture, we’re going away to write our own possess. It’ll help you appreciate the concepts behind this lesson.
We’re available to write a DribbbleAPI object, and register a method called getPlayerShots() to interact with Dribbble’s API and return an array of the latest shots.
Let’s create a novel file for this class, called DribbbleAPI.php
Above, we’re surroundings up two class variables.
  • $apiUrl – The linkage to the Dribbble API, where the calls will be sent.
  • $user – The username or user id of a Dribbble user. This charge will be place from surrounded by the constructor (__construct) method.
The constructor is approved a $user variable, which is then approved on by the constructor to the class property, identified user.
We prefix the property, or variable name with public to identify that the value of this property can be repossess from external of the class. If we as an alternative wish to perimeter access to the property to only this class, and possibly any classes that inherit from it, we’d employ the protected prefix. This perform is passed on to as encapsulation.
We have the pedestal prepared for our Dribbble API wrapper. At the present, We’re going to inscribe a new method, called getPlayerShots(). The reason of this method will be to query the API and change the effect into an array for tradition surrounded by our plugin.
The getPlayerShots function retrieves’ the user from the class variable. It exploits WordPress’ wp_remote_get function to query the Dribbble API. The API then responds to our query with a JSON string, which is then parsed into an array and sent reverse to the function by means of the return keyword.
This is all that we need from the API at the instant – merely an array of player shots. If we happen to need more functionality in the upcoming, we can moreover add more methods to the current class, or create a new class that extends this one. Once more, this is referred to as inheritance.


Step 3 – Integrating the DribbbleAPI Class

This is the amusing part; the recently parched DribbbleAPI class will approach into use. We’re available to loop through the shots regained from the API, and produce an html list of shots, which will be approved on to the shortcode and the template tag. At some stage in the loop, the full-sized Dribbble images will be cached and saved in the plugin folder, and the thumbnails will be generated using TimThumb.


To agree on if the full images are by now stored locally, the plugin path is obligatory. Also, to produce the thumbnails with timthumb, the plugin url is obligatory. For this reason, we’ll create two class variables called pluginPath and pluginURL in our WPDribbble class, and then place their morals from inside the constructor method.

Setting PluginPath and PluginUrl

getImages() Method

Build a novel method within the WPDribbble class, called getImages.
Surrounded by a class, you can utilize generic names for functions. They will not disagreement with other plugins or WordPress’ built-in functions, since they are beneath the class namespace.
  • user – Username or User ID of Dribbble. $user will be employed when registering a novel occurrence of the DribbbleAPI class.
  • $images – Number of images to render. $images will be used when querying the API through the getPlayerShots method.
  • $width and $height – Timthumb will be employed to produce thumbnails.
  • $caption – Opportunity to turn into heading of an image.
After that, we’re available to embrace the DribbbleAPI class in the getImages() function, and create a novel occurrence of it to clutch the images.

The $shots variable in the code is inhabited with an array of three current Dribbbles from the $user.
As mentioned in advance, we’re available to loop through the $shots array, and save the chock-full size images close by for caching motivations. The cached images will be empoyed with TimThumb to provide the thumbnails. For amassing full-images and thumbnails produced by TimThumb, make two folders. We’ll utilize full-images/ for amassing the full size images, and cache/ for the thumbnails, since that is the default folder name for TimThumb.
The HTML for the list will be generated within the $shots ring.


Adding Classes

It’s always a good idea to add classes to each element of your plugin. This provides the advanced users of your plugin with the freedom to customize it. Avoid using inline CSS for content that is generated through your plugin.

Step 4 – Setting up the Shortcode

Shortcodes, as the name advocates, allows users to simply attach intricate content into blog posts.
We before now have the add_shortcode hook prepared in our plugin class constructor. Now, we’re going away to inscribe the shortcode method within our class, which will take out the shortcode attributes and come again the Dribbble images by using the getImages() method.
We’ll be calling our shortcode [Dribbble]. As declared previously, the name of the shortcode is strong-minded by the initial parameter in the add_shortcode function. It will be used with the attributes mandatory for the getImages() method. For example: [Dribbble user=haris images=5 width=100 height=100 caption=true].

Add Shortcode support for WordPress Widgets

By evade, WordPress widgets don’t sustain shortcodes, however, by using the widget_text filter, we can oblige shortcode support in WordPress widgets.
We can add the filter in our WPDribbble object constructor.

Step 5 Setting up the Template Tag

The template tag can be employed directly in WordPress themes. The essential purpose of the template tag will be to generate a novel example of our WPDribbble class, and call the getImages() method. The template tag will be a easy PHP function and it has to be registered outer surface the plugin class. It needs to contain a unique name; otherwise, it will difference with functions / plugins with similiar name. Since our plugin is entitled WP-Dribbble, we’ll entitle the template tag, wp_Dribbble().

Voila!

Congratulations! You have effectively written a WordPress plugin with OOP. If you fall in any problem, let me know, I’ll try to do my best to help you.