Simple Link Directory Shortcode

Below, you’ll find a detailed guide on how to add the Simple Link Directory 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 Simple Link Directory Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Simple Link Directory Plugin and the shortcodes it provides:

Plugin Icon
Simple Link Directory

"Simple Link Directory is a dynamic WordPress plugin that helps organize and manage your links efficiently. It's user-friendly, customizable, and perfect for creating a comprehensive link directory on your site."

★★★★☆ (113) Active Installs: 3000+ Tested with: 6.3.2 PHP Version: 5.6
Included Shortcodes:
  • [qcopd-directory]

Simple Link Directory [qcopd-directory] Shortcode

The Simple Link Directory plugin shortcode, ‘qcopd-directory’, is used to display a full list of links. This shortcode calls the ‘qcopd_directory_full_shortcode’ function, which captures the output of ‘show_qcopd_full_list’ function and returns it as content. This allows for the full directory of links to be displayed on your WordPress site.

Shortcode: [qcopd-directory]

Examples and Usage

Basic example – The shortcode can be used without any attributes to display the full list of links in the directory.

[qcopd-directory /]

Advanced examples

1. Display a specific list by referencing its ID. If the ID is not found, no list will be displayed.

[qcopd-directory id=3 /]

2. Display a list in a specific order. The ‘orderby’ attribute can take values such as ‘name’, ‘date’, ‘rand’ (for a random order), and ‘ID’. The ‘order’ attribute can take values ‘ASC’ (for ascending order) or ‘DESC’ (for descending order).

[qcopd-directory orderby="name" order="ASC" /]

3. Display a list with a specific number of items. The ‘limit’ attribute can be used to limit the number of items displayed.

[qcopd-directory limit=10 /]

4. Combine multiple attributes to display a specific list, in a specific order, with a specific number of items.

[qcopd-directory id=3 orderby="name" order="ASC" limit=10 /]

PHP Function Code

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

Shortcode line:

add_shortcode('qcopd-directory', 'qcopd_directory_full_shortcode');

Shortcode PHP function:

                    function qcopd_directory_full_shortcode( $atts = array() ){

		ob_start();
	    show_qcopd_full_list( $atts );
	    $content = ob_get_clean();
	    return $content;
	}
                    

Code file location:

simple-link-directory/simple-link-directory/qc-op-directory-shortcodes.php

Conclusion

Now that you’ve learned how to embed the Simple Link Directory 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 *