Float menu – awesome floating side menu Shortcode

Below, you’ll find a detailed guide on how to add the Float menu – awesome floating side menu 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 Float menu – awesome floating side menu Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Float menu – awesome floating side menu Plugin and the shortcodes it provides:

Plugin Icon
Float menu – awesome floating side menu

"Float Menu is an impressive WordPress plugin that allows you to create a floating side menu for easy navigation. Its user-friendly interface enhances your website's functionality and design."

★★★★☆ (31) Active Installs: 30000+ Tested with: 6.3.2 PHP Version: 5.6
Included Shortcodes:
  • [float_menu]

Float menu [float_menu] Shortcode

The Float Menu Plugin shortcode adds a customizable floating menu to your WordPress site. It extracts the ‘id’ attribute from the shortcode and queries the database for corresponding menu parameters. If found, it renders the menu.

Shortcode: [float_menu]

Parameters

Here is a list of all possible float_menu shortcode parameters and attributes:

  • id – Unique ID to identify specific float menu

Examples and Usage

Basic Example – Utilize the shortcode to display a specific float-menu by specifying the ID.

[float-menu id=1 /]

PHP Function Code

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

Shortcode line:

add_shortcode( $this->plugin['shortcode'], array( $this, 'shortcode' ) );

Shortcode PHP function:

function shortcode( $atts ) {
		extract( shortcode_atts( array( 'id' => "" ), $atts ) );
		$id = absint( $atts['id'] );

		global $wpdb;
		$table  = $wpdb->prefix . 'wow_' . $this->plugin['prefix'];
		$sSQL   = $wpdb->prepare( "select * from $table WHERE id = %d", $id );
		$result = $wpdb->get_results( $sSQL, 'OBJECT_K' );

		if ( empty( $result ) ) {
			return false;
		}

		$param = unserialize( $result[ $id ]->param );
		$check = $this->check( $param, $id );

		if ( $check === false ) {
			return false;
		}
		ob_start();
		include( 'partials/public.php' );
		$menu = ob_get_contents();
		ob_end_clean();

		$this->include_style_script( $param, $id );

		return $menu;

	}

Code file location:

float-menu/float-menu/public/class-public.php

Conclusion

Now that you’ve learned how to embed the Float menu – awesome floating side menu 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 *