Our Thoughts

Invezza focuses on your business growth by delivering your message to the world and make your idea speak with our creativity.

Category: Wordpress

How to remove password protected posts from pagination or adjacent posts

Jan 09th, 2018 PHP, Wordpress

You can approach this in different ways. The easiest solution would probably use the WordPress default filters There are multiple filters to remove password protected posts from adjacent posts for pagination. Sometimes we need to hide all password protected links from pagination because some website creates the secure content data using private posts. If anyone...

Read more

How to check post has password protection or not

Jan 07th, 2018 PHP, Wordpress

Yes, Some time we need to check post has password protected or not. While loop displays all posts from depending on post_type. If you assigned "posts" to post_type  it will display all posts from posts type But sometimes we need to show a different message to password protected posts in a loop, for this we...

Read more

How to exclude password protected posts from WordPress loop

Jan 06th, 2018 PHP, Wordpress

Exclude password protected posts from WordPress posts list or loop is using the filter function that is "post_where" post_where filter for use exclude password protected posts from loop This filter applies to the posts where clause and allows you to restrict which posts will show up in various areas of the site. Combined with restrict_manage_posts...

Read more

htaccess – Pretty – Permalinks – Page Not found Error

Sep 27th, 2017 Wordpress

.htaccess The .htaccess file is used primarily for creating pretty permalinks. By default WordPress permalinks set to /?p=9 but this not look good for SEO and browse url. For this, we need to some settings. Lets I will explain to you how you can create to the pretty permalinks in WordPress and override .htaccess. Simply...

Read more

How to solve Error Establishing a Database Connection in WordPress.

Sep 20th, 2017 Wordpress

Have you added correct database details in Config file(wp-config). If you added correct config details on your website wp-config.php file, but still your getting same database error connection on the WordPress website every time. This issue related to your database so you need to repair a database onetime then only solve this problem. For solving...

Read more

How to get menu object using menu name or menu location wordpress

Sep 20th, 2017 Wordpress

Some time we required to display menu item in custom as per design. Recently i worked on one wordpress project but this projects designs are differently from other projects. Here main Problem is that display menu links in custom way. I researched some time in Google about wp nav menu but i didn't find solutions...

Read more

How to rename Tab names in woocommerce single product details page

Sep 30th, 2016 Wordpress

How to rename Tab names in woocommerce single product details page Use below code in functions.php file [php] add_filter( 'woocommerce_product_tabs', 'woo_rename_tab', 98); function woo_rename_tab($tabs) { $tabs['description']['title'] = 'More info'; return $tabs; } [/php]

Read more

How to remove specific tabs in Woocommerce in Single product details page

Sep 30th, 2016 Wordpress

Use this snippet in the functions.php if you want to remove any one of the product tabs, such as the description and reviews etc.. [php] add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); function woo_remove_product_tabs( $tabs ) { unset( $tabs['description'] );          // Remove the description tab unset( $tabs['reviews'] );             // Remove the reviews tab...

Read more

How to replace woocommerce Shop Page Title

Sep 30th, 2016 Wordpress

Use below code for replace woocommerce shop page title Copy below code and paste in your theme funtions.php file [php] add_filter( 'woocommerce_page_title', 'woo_shop_page_title'); function woo_shop_page_title( $page_title ) { if( 'Shop' == $page_title) { return "Products"; } } [/php]

Read more

How to replace woocommerce “Out of stock” by “sold”

Sep 30th, 2016 Wordpress

For replacing woocommerce "out of stock" with sold or another custom name. Copy below code and paste in your functions.php file. //  You can replace this word Sold word with your own word [php] add_filter('woocommerce_get_availability', 'availability_filter_func'); function availability_filter_func($availability) { $availability['availability'] = str_ireplace('Out of stock', 'Sold', $availability['availability']); return $availability; } [/php]

Read more