Emerald

About Yumna Tatheer

I am a Computer Science graduate and a part time blogger from Lahore, Pakistan. I am a PHP programmer and a wordpress expert.

Author Page – All Comments by an Author

You can create a complete and nice Author’s page which will be displayed whenever someone clicks on an Author’s name link. The trick here is to create an author.php, this page will be displayed whenever you click on an author’s name link.
The Author page for an author can have all posts and comments by an author. To list all comments by an author you can use the code below.

Frontend Posting With Image Uploader

Recently i had to implement frontend posting for the sidebar. I chose Quick Post Widget for this purpose. This plugin has a very flexible UI with a lot of options. The only problem i had was, it used a tab in the visual editor for image attachments, which my client did not like much. He wanted an image uploading field upfront.

So i decided to add a front end image uploader to Quick Post Widget. The file i edited was ‘quick-post-widget.php’. Here are the steps i followed

1- I modified the opening form tag and added enctype to it (this is the form that will displayed on frontend).

2- In the form, before the submit button, added a field of type ‘file’ for images.

3- Added the image upload function to my functions.php so i can also call it later wherever i need.

4- Now i called the above function for quick post widget ‘mypostimage’ field. Added this code just after wp_insert_post was called in the quick-post-widget.php. This code would insert the image as an attachment image for the post.

Below is the screenshot, how the […]

Check Valid Email Using PHP

You can check if the email is valid or not by using regular experessions. Just copy and use the function below

function is_valid_email($email)
{
if( preg_match(“/+@+.+/”, $email) > 0)
return true;
else
return false;
}

Why Use WordPress For Websites?

“I can’t change content of my website”

 

“My webmaster isn.t available , i need my company address to be changed!! ”

 

“I don’t know html, i have messed up my webpage”

If you know someone who owns a small business or personal website, you will hear such cries a lot. After making a static html site, which has no editing or updation capibility, you have a hard time maintaining your website. Changes are needed occasionally and you have to pay webmaster for them every now and then. This causes you a lot of variable cost. What is the solution?

Using CMS for your website saves you from a lot of headache. You now have to pay the deveoper only once. The rest of the things are under your control. The cost of a CMS based website is obviously more than that of static webpage, but it doesn’t hurt since you have almost no variable cost involved in future.

There are many CMS available out there, but decision of choosing one of them is tricky. WordPress is a wonderful CMS for beginners. It is widely used […]

Get Users’ Search Terms

This code is very useful when you want to show the users posts related to their search. Some blog would show pop ups at the bottom using these search terms and will take users to other posts of their blog. Here is a code snippet to get the search terms of your users.

Featured Image Link Missing

If you see that Featured Image link is not visible on the post edit page, that means your theme does not support thumbnails.You can add one line to your functions.php in the active theme folder. This can be done by the code below.

 

 

5 Best WordPress Plugins to Improve Performance

WordPress has proven itself a popular and dependable Web publishing platform since its 2003 debut due to its ease of setup and use. The best thing about wordpress is its plug-ins. Once you are done with installing and setting up the basic blog, you can add plug-ins and enhance your website.

But plug-ins can also cause your website to slow down,so keep the number of plug-ins as small as possible. If you can do anything without a plug-in, don’t use a plug-in. Here i have listed few good plug-ins thatcan be very helpful for your blog.

W3  Total Cache

This plugin optimizes your blog and decreases the loading time of pages. It goes from the basic page caching (keeping a static copy of the page), to CSS/JS/HTML minification (making your files smaller), as well as handling uploads to a Content Delivery Network.

Download | Plugin Site

 

SEO Friendly Images

Adding titles and Alt text to your images attracts google traffic for your blog.

Download

 

Google XML Sitemaps

Create a Google sitemaps compliant XML-Sitemap of your blog

Download

 

WP-Optimize

Users who are not comfortable with phpmyadmin interface can use this plugin to clean up […]

Web Design Trends 2012!

Developers its high time you should grasp the floor and get ready for the web design actions in 2012! In 2012, we see that smarter interfaces are coming up, and the interfaces are emerging in a new way.
RESPONSIVE DESIGN

A design is successful if it’s a responsive one. Most of the successful web designers follow this trend. As we see that smartphones are gradually occupying the whole market as well as the human minds, the number of mobile internet users is increasing day by day, so the main focus will be to make such designs through which the navigation will be facilitated on different screen sizes. This is actually the main theme behind the ‘responsive design’. How to get it? Make flexible layouts, insert flexible images!
Check www.earthhour.fr as its example.

FLASH

Flash has always been in and will still be in. Yes, flash is again here this time. If you intend to create an entertainment site, you do have to use flash.
ANIMATIONS

Animations have been a part of web designs since the beginning. Animations of HTMLL5 and CSS3 have always been in picture, and have […]

Review Samsung Galaxy

Budget Android phones have become very popular lately and Samsung Galaxy Y is the cheapest one in the market if you ignore the IDEOS handsets being offered by a couple of telecom providers. ProPakistani got its hands on a test unit and here’s what we make of it.

Appearance:

Samsung Galaxy Y is a small phone and fits into the hand snugly. It has a 3.0 inch screen and as with most touch phones of this size, it’s not for you if you have big hands. The back is plastic but certainly doesn’t look so and with the chrome rim, it gives the phone an expensive look. Samsung Galaxy Y has a candy bar design and has three buttons on the front. One is the physical home button and two are capacitive. There’s no ambient light sensor or front facing camera but a proximity sensor is provided. The left side of the Samsung Galaxy Y has the volume rocker and the right side of the phone has the power/sleep button. The top has the 3.5mm jack and the microUSB port.

Interface:

The interface of […]