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.

MYOB Accountright API Integration With WordPress/PHP

Since a year or so, we are doing multiple projects on integration of wordpress with MYOB Accountright Live API. The projects were difficult in the beginning, because the API docs do not give much details about problems encountered in interacting with API using PHP.

The first project we did was integrating Membermouse plugin with Accountright API. Our custom MYOB plugin created invoice for every new Membership and a renewal. Since the memberships were subscriptions, we had to keep a track of dates and billing period. Dealing with Membermouse was a pain, it has a lot encrypted code in it, which makes it close to impossible for a developer to see its workflow. Working on it with dedication, we were able to complete and deliver the integration to client. It worked perfectly 🙂

After this project we had several others, where we integrated Woocommerce with Accountright API. This was overall a very good and smooth experience. Woocommerce is open-source and has lots and lots of documentation which makes it easy to work with its API and functions. Whenever a customer ordered a […]

WordPress Membership based sites – Membermouse Plugin

I recently used membermouse plugin for wordpress so I thought I will share my insights about it. This plugin provides a platform for membership based websites, subscriptions and a lot more. It has payment gateways integrated and also a test payment method which is very usefeul and can be used while development for test payments.

Overall the plugin provides a lot of functionality and seems to be a very good fit for a membership subscription based website. On the other hand there are some shortcomings too. The plugin is a premium product so the company has hidden/encrypted a lot of code. This is a serious problem when you are trying to integrate it with existing system. Its not flexible and scale able. The product does have hooks for executing desired actions at certain points but they are quite few and are not much useful. The documentation is not comprehensive too. You also cannot find much troubleshoot information about it. Overall for me it wasn’t a good experience because I had to extend it and integrate it with company’s accounting system. I […]

Search by Exact Words in WordPress Search

Improve WordPress Search to Make it Search Exact Words.
The native wordpress search, does not look for exact complete words. It means that when you look for ‘Los’ you also get words like ‘lost’ ‘loser’ in search results. I found a lot of plugins which can improve search but found glitches in each of it. I decided to write my own solution. I needed a search which could look for exact word in posts. I implemented wordpress search for exact word in post titles using this code in functions.php.

You can change this to search for exact words in titles plus content both, by modifying the line 18 to
Method 1:

The rest of code will remain same. Using the above snippets you will be able to improve wordpress search and make it exact word search.

I have come across another simpler solution, which be helpful, but the snippet posted above can be customized easily as much you need. So I would use method 1.

Method 2:

If you need to highlight search words, read here. I hope you like these wonderful snippets, happy coding!

SpeedUp Your Website

Are you looking for “Best wordpress plugin to speed up site” or “wordpress site speed optimization plugin” ? Do you want to speedup your website? Good news is, you have come to the right place!

Boost Google Pagespeed Rank
Site Optimization is a major consideration these days. This is because if your site loading speed is not fast enough, you are losing a lot of visitors hence ad revenues. So, website owners are pretty much concerned about speed now. We will try to answer the common questions website owners have about speed:

How can I know the speed of my Website?
There are some utilities available on the internet for free, where you can just type in your url and test your speed. The ones I use are Google PageSpeed Insight and GTMetrix . Out of these two I have found GTMETRIX to be more detailed and solid.

Why is my website slow?
When you have tested your website loading speed then you might wonder what is making it slow. Now look at the list of suggestions that are given by the two speed testing […]

WordPress Send Email in Foreign Language – Japanese

Sending emails in Japanese language was a challenge for me. Any email, which had a subject in Japanese language failed and was not being sent at all. I tried encoding the email subject, but nothing worked. I tweaked things until i found a solution. I then re-defined the wordpress core wp_mail() function to allow sending emails with Japanese language in subject. My solution is given below (see modifications from line 337 and onwards in code below):

Happy coding!

Upworks Vs Toptal

I started my journey as a freelancer from Elance. After several months, I started getting jobs there. I got excellent reviews and a five star rating on those jobs. One Major problem with Elance was constant competition with low-priced inexperienced developers. Every time I placed a bid, i had to prove myself through my proposal and give a competitive price so i could stand out of 50-60 other applicants. The competition was tough and growing everyday. Elance-Odesk merger into Upwork resulted in further increasing this competition. People were biding at extremely low rates like $5 for a project. I decided to look for a new freelancing platform.

I tried searching for good and reliable freelancing platforms other than Upwork and I came to know about toptal.com. When I read about their screening process, I was convinced that this is what I was looking for. I wanted a place where only seasoned developers or at least people who knew how to code could bid. I searched more for toptal.com and found many good reviews for it on quora.com and other websites.

Most of […]

Remove Slug from Custom Post Type URLs

Many times, you would like to remove the custom post type slug from urls. You don’t want frontend users to see you custom post type slug and to know you are using one. I kept looking for solutions, modified rewrite rules and did lots of things finally found a very easier solution. This solution works for hierarchical posts and non-hierarchical both. It also removes parent slug from hierarchical posts.  I hope this would help you guys. Here is the code.

The above code snippet will be put into your functions.php and it will remove slugs from all post urls. So where ever in the template you are displaying the_permalink() . But clicking those links you will get a 404, page not found if you don’t set the right query vars which are set in code given below:

So adding the above two snippets to funtions.php will remove custom post type slugs from urls. But last thing is:

don’t forget to replace your_custompost_type_slug in above code with your custom post type slug.  Happy coding!

courtesy:<a href=”http://ryansechrest.com/2013/04/remove-post-type-slug-in-custom-post-type-url-and-move-subpages-to-website-root-in-wordpress/”>Ryan Sechrest. </a>

WordPress Display Posts From Category

A lot of times we need to display posts from a certain category on a page or a part of page. This is possible by using a bit of code in the relevant template file. For example if you need to display the posts from a category on homepage then edit the index.php (or any other file which has been set up as homepage in dashboard settings).
Display Posts by Category
Its easy to display posts by category using ‘wp_query’ object in code. You can easily use the arguments of the ‘wp_query’  to pass the category id and then display relevant posts. Now question is how to find the catagory id (which is a number) of a certain category. There two ways of doing that:

Two Ways of Finding Category ID in WordPress
1-Click on posts->categories and hover over the category name at the bottom of the screen you will see a link, which has a word call tag_id. See what is the value of tag_id and that gives you the category id.

2-Install the ‘reveal IDs’ plugin and it will show you catgory ID […]

Adding Google Adsense Vbulletin Mobile Style

If you want to put google adsense in Vbulletin Mobile Theme, go to your adsense account and choose ads for content. After that go to Styles and Templates, choose edit template from dropdown, choose ‘Ad Location Templates’. Vbulletin 3.7 has 7 locations for  ads.

The 7 locations are called:

Click to see the various ad locations available, find the one which is relavant to your ad and paste the google code in that template.

You will see header template. Now you can put adsense code in it and wait for sometime for tha ads to become active. The ads do not show for some time usually. It might take 48hours max for the ads to show, so don’t worry and wait. When ads are visible you can change their postion or color scheme as you wish.