How to check if current post have specific shortcode in Wordpress

Shortcode is the one of powerful feature in Wordpress which provides so much flexibility to enhance functionalities. Sometime you need to detect if current post/page have already specific shortcode. Here is the following two snippets which you could use for check specific shprtcode into your shortcode callback function. Snippet -1(Using has_shortcode() function) <?php  add_shortcode('shortcode_name','shortcode_callback'); function  shortcode_callback($atts){ global $post; $shortcode_feature = ' '; if (has_shortcode(  $post->content ,  ' shortcode_name '  )){ // Apply your specific code here. } // Do whatever you want return  $shortcode_feature; } Snippet -2 (Using strpos() function) $shortcode = '[shortcode_name'; $check = strpos( $post->content,$shortcode ); if ( $check !== false ) { //Return already matched } Prefer to use Snippet-1 using default function of wordpress. Cheers

How to show Squarespace gallery in Masonry view

Squarespace have awesome powerful feature to manage images using gallery feature. There is lot of flexible option to present images into different layout. Show images into masonry view is a passion. There is no inbuilt option for show images into masonry view. Here is the following steps to show your gallery images into Masonry view:- 1. Create a gallery page and upload your all images. 2. After uploading all images. Now time to show your all images using Squarespace Gallery Block. You could select your existing gallery page and select gallery type Grid. Now you could there is all gallery images showing. 3. Here is the following code you have to add into Advanced =>  PAGE HEADER CODE INJECTION  of page setting to show your images in Masonry view. <script src=""></script> <script src=""></scrip

How to Create Secondary Menu in Squarespace

Here is the following steps to create secondary menu into Squarespace website. 1. Enable Developer Mode    a) First, Login into your Squarespace admin panel using /config at end of your website URL.  like- b) Navigate to Settings=>Advanced=> Developer Mode and enable developer mode. c) Now you will get details of your Squarespace SFTP account. Configure these details with your Filezilla or any other server connecting tool. 2. Menu Registration  a)Please open  template.conf file and find the  navigations into JSON array. b) Apend your menu name and title into Navigation JSON array as given below. {       "title": "Primary Navigation",       "name": "topnav"     }, c)  Now update file on server and you could see new menu register into your Squarespace website under Pages section. 3. Display Menu  You have successfully registered your menu. Now you want to display this m

2 Wordpress, 1 Database configuration settings

  Here are the following instructions for setup two Different Wordpress into one Database:

Add Pagination in Products and Order in Opencart Admin panel

Pagination is the one of most important fact to easily switching in our products and order listing in admin panel. We can easily achieve it through some changes in following files:- 1) For product pagination Open product.php from admin=>controller=>catalog=> product.php. and go to line no.336. Probably you will be  find this code- 'start'           => ($page - 1) * $this->config->get('config_limit_admin'), Replace this line code with the following code 'start'           => ($page - 1) * 10, Go to line no.500. Probably you will find this code $pagination->limit = $this->config->get('config_limit_admin'); Replace this line with the followings code $pagination->limit = 10; 2) For order pagination Apply all above process in order.php file. You could find this file in admin=>controller=>sale=>order.php . Note: May be line number will be different try to find these code and edit according to ab

Don't Crawl Posts,Categories Using Meta Tags in Wordpress

If we want to google or other search engines do not crawl our posts and categories in wordpress . For this we can use following script, Go to functions.php file in your theme-: function add_meta_tags() {       if(is_single() || is_archive())        { ?>          <meta name="robots" content="noindex,nofollow"/>        <?php  } } add_action('wp_head ','add_meta_tags'); If you want to use other pages like author,tags and date just replace if statement if(is_author() || is_tag() || is_date()) Thanks.

How to Get Access of Database of Dynamic Site Without cPanel Details

If  you want to get access of  database of  any dynamic site and do not cPanel details. Do not be panic. Here is the quick way of getting access of database.              Connect your FTP and navigate to your site root directory. Download adminer.php   and upload this file on  root directory of your website. Run this file like - . Now you could see your screen similar to below screenshot.       4 . Fill the database connections details from wp-config.php file and click on Login.       5. Now you have Database panel,You can Export,Import,Operations with database.       Cheers❤