We can use plugins or we can use custom code on theme file submit post from front end. I have used plugins such as User Submitted Posts , WP User Frontend etc and also custom code for submitting post. Many … Continue reading
Redirect non logged in user
There are many plugins which can be used for redirection. We can use small code on our theme file rather using plugins. To redirect non logged in member to custom login page or to specific page or to normal login … Continue reading
How to use Nextgen gallery using custom php code on theme file
On nextgen gallery, we use [nggallery id=x] short tag on post/page to display our desired gallery. To display desired gallery on any place in a theme, we can use the following custom code: Where $key is gallery id x is … Continue reading
How to redirect a page on joomla 1.6
We can use the following example to redirect a page if user is logged in or not. The following code can be put on the corresponding components or on module.
How to get category name and id on product page on Magento
On product page, generally its location is app/design/frontend/{designPackageName}/{themeName}/template/catalog/product/view, put the following code on addtocart.phtml file:
How to show blank search on wordpress
By default, wordpress do not search for blank. It redirects to the home page for blank search. To prevent this we can use pre_get_posts hook. We can use pre_get_posts action to manipulate the query variables for specific pages. We can … Continue reading
Add tinymce editor to wordpress form’s textarea field
Just make sure to use the id of the textarea you want to select in the elements: “elm1,elem2″ variable. Assuming you have a textarea with the id of ‘elm1′ and ‘elem2’: Put the following code into your functions.php of your … Continue reading
How to get total active members and total number of members in buddypress
The following example will count the total members: To get total active users, we can use following code:
Some fun with regular expression
Show only numbers in a string Show only letters in a string Show only letters and numbers in a string
How To Flush Permalink Structure in WordPress When Using custom Taxonomies …or what to do when WordPress custom Taxonomies show A 404 Page
I have faced many times that permalink for custom taxonomy wont work, rather it shows a 404 error page. Suppose you have custom taxonomy named as video and want to display a link as http://www.yoursite.com/videos but it shows page not … Continue reading