Catch Breadcrumb Shortcode

Below, you’ll find a detailed guide on how to add the Catch Breadcrumb Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Catch Breadcrumb Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Catch Breadcrumb Plugin and the shortcodes it provides:

Plugin Icon
Catch Breadcrumb

"Catch Breadcrumb is a WordPress plugin designed to enhance your site's navigation. It creates an easy breadcrumb trail, improving user-experience by providing a quick way back to previous pages."

★★★★★ (5) Active Installs: 2000+ Tested with: 6.1.4 PHP Version: false
Included Shortcodes:
  • [catch-breadcrumb]

Catch Breadcrumb [catch-breadcrumb] Shortcode

The Catch Breadcrumb shortcode is a powerful tool in WordPress. It generates a breadcrumb trail for your website, enhancing navigation. This shortcode calls the function ‘catch_breadcrumb_shortcode’. It creates an instance of the ‘Catch_Breadcrumb_Public’ class and builds the breadcrumb trail. The result is output using the ‘wp_kses_post’ function, ensuring the breadcrumb is safe to display.

Shortcode: [catch-breadcrumb]

Examples and Usage

Basic example – A simple usage of the ‘catch-breadcrumb’ shortcode without any parameters or attributes.

[catch-breadcrumb /]

PHP Function Code

In case you have difficulties debugging what causing issues with [catch-breadcrumb] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'catch-breadcrumb', array( $this, 'catch_breadcrumb_shortcode' ) );

Shortcode PHP function:

function catch_breadcrumb_shortcode( $atts, $content ) {

		$catch_breadcrumb_public = new Catch_Breadcrumb_Public( CATCH_BREADCRUMB_BASENAME, CATCH_BREADCRUMB_VERSION );
		$breadcrumb              = $catch_breadcrumb_public->build_breadcrumb();
		echo wp_kses_post( $breadcrumb );

	}

Code file location:

catch-breadcrumb/catch-breadcrumb/includes/shortcodes.php

Conclusion

Now that you’ve learned how to embed the Catch Breadcrumb Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *