Remove Slug from Custom Post Type URLs

By |March 13th, 2014

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

By |September 2nd, 2013

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 […]

Adding Google Adsense Vbulletin Mobile Style

By |February 22nd, 2013

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:
ad_footer_end
ad_footer_start
ad_forumdisplay_afterthreads
ad_forumhome_afterforums
ad_header_end
ad_header_logo
ad_navbar_below
ad_showthread_beforeqr
ad_showthread_firstpost

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.

Stylish Showcase WordPress Theme

By |February 18th, 2013

A  stylish theme by Smart Magazine to showcase cars or any other products you want to show. Its a simple blog theme which can be used for many purposes. A brand new design for 2013.

Demo   Dowload

Website RSS to Twitter (Posting to Twitter)

By |February 18th, 2013

A lot of people would want to post  to twitter from their website. This means that the rss feed is tweeted to your twitter timeline. I will share a wonderful php script that can do it for you. Connecting your website with twitter is too easy now, using php you can post rss feed of your website to twitter. Check out the php code snippet given below and replace the values for your site and see how it works.

source: Posting to Twitter

Skrill Asking For IBAN

By |February 9th, 2013

Recently skrill (moneybookers.com) modified the withdrawl process for wire transfer to banks. When withdrawing money, they  ask for your  IBAN . Now

<h3>what is IBAN?</h3>

IBAN is international Bank Account Number, which can be generated from your local bank account number and swift code easily. IBAN its not a new information, it is generated by your bank account number and swift code after doing some calculations on it.

I faced a lot of trouble when i called Bank Alfalah, Lahore and asked them my IBAN. They told me Alafalah does not have an IBAN. I called them again and same reply. Then i decided to so something on my own. I used a tool to generate the IBAN and also followed the steps given by State Bank Of Pakistan to verify that my IBAN was correct. Luckily I was able to generate the correct number and received my money from skrill in my account 2 days back.

Use this tool to calculate IBAN.

Responsive Theme

By |February 5th, 2013

Free Responsive theme created by Theme ID. The features of the theme are responsive web design, grid layout, wigitized area (9 widgets), custom menu support and much more.

Download  Demo

Display Category Names in Multiple Columns

By |November 10th, 2012

Sometimes you have a lot of categories, you cannot simply list them down as one column. In such a case you would like to have it displayed in multiple columns. We will use wordpress built-in functions to list categories, so that any new ones are automatically added to the list.
You can display the category names in footer in 2 or columns in your theme. This can be done by using wp_list_categories() and playing with some mathematics. Normally you can find code that displays category names in two columns but this snippet will do it in as many columns as you want. Have a look at this tip and you will love it!!

source:http://www.bloggingpro.com/archives/2010/01/15/how-to-display-your-wordpress-category-list-in-multiple-columns/

Top HTML Form Generators

By |July 9th, 2012

I was trying to design a form, i came across a lot of form generators. Using these generators is an easy way to generate html for form. The markup might not be standard compliant, but for newbies, it makes form designing an easy task. Below are some form generators

1- pForm

In pForm, you are provided with a form template in many colors. You can choose any color for template and then add fields in next screen.

Link

2- Wufo Form Gallery

Here you have a lot of templates for example, employment application, event calendar, wedding invitation, mailing lists etc.

Link

3- Zoho Creator

At zoho creator you have multiple templates like event planner, customer feedback etc. Its a drag and drop interface , very easy to use.

Link

4- Free HTML Form Generator

This is a downloadable file which can be put on webserver or locally, it generates the html for the form you require. You can put it up on your server too, since its free and open source. It can be a good attraction for people trying to generate some html.

Link   demo

5- 123 Contact Form

You can design online survey […]