-
Notifications
You must be signed in to change notification settings - Fork 2
Basics
Welcome to the world of Link Library. At this point, I assume that you have successfully installed and activated the plugin in your WordPress installation.
When activated, Link Library adds a number of elements to the WordPress administration pages:
- A Links menu at the top of the admin menu
- A Link Library menu section towards the bottom of the admin menu
- An extra widget on the admin Dashboard
The Links Menu is actually a legacy component of WordPress. Up to version 3.5, this menu was available on all installations of WordPress. After this version, the link management functionality of WordPress is now disabled by default, but its code remains in the tool’s code base.
Link Library includes code that reactivates this functionality, allowing users to access the All Links, Add New link menu and Link Categories menu item.
To function properly, Link Library needs one of more link categories to be defined. Until this is done, it will display a message at the top of the admin section as a reminder that this must be done.
To create link categories:
- Visit the Link Library Categories section under the Link Library menu.
- Specify a Name for the Category
- Optionally, set the Slug, Description
- Do NOT specify a Category Link for the moment. This will be covered in more advanced sections.
- Click on Add New Link Category to save the new item
- The warning to create categories should disappear. If it does not go away immediately, click your browser’s refresh button.
Once you have categories in place, you can use the Add New links under the Links section to start creating links.
The only required fields for link creation are:
- Name
- Web Address
- Categories
For the Categories field, WordPress allows you to assign one or more categories to a link, if you select multiple categories, the link you create will appear multiple times in your link display, under each of the categories that it is assigned.
Images can be assigned using a number of techniques when creating links
- Assigning image URL in Image Address field
- Located towards the bottom of the link creation form
- Simple field where you can enter the URL of the image to be associated with the link you are creating or editing.
- Using Media Uploader
- Clicking button launched Media Uploader
- User can select existing image or upload new one
- After selecting image, link must be saved or updated for image address to be stored
- Automatic Image Generation
- Can be triggered after first saving a link and editing it
- Can generate a thumbnail or capture the site favicon and store locally
- Must have selected thumbnail generation service in General Settings
In the following example, two links were created and each one was associated with one of the link categories that were available in the system.
Link Library provides a set of shortcodes that users can insert in their posts and pages to display lists of links. Shortcodes are simple blocks of text, enclosed in square brackets.
The main shortcode for Link Library is simply [link-library]. You can either type the shortcode manually right in the content editor, or use the Add Link Library Shortcode dialog that can launched using the button right above the editor.
The following link library display was created by saving the page shown above, only containing the [link-library] shortcode. It displays the names of the two categories that were created earlier, along with the links belonging to each category underneath.
The (Edit) links that appear next to each link allow you to directly edit them in the link editor page. These links are only shown when you are logged in as a user who has permissions to modify links.
Similar to the [link-library], the [link-library-cats] can be inserted in any page or post to display a list of link categories. This shortcode is most often used to display a list of categories at the top of a page above a long list of link categories and their respective links. Category names appearing in the top table are links that will make the page scroll down to the selected categories, for quick navigation.
Entering the two shortcodes as shown above results in the following display on the page where they are used.
WARNING: You should be careful to have at least one space of line return between the two shortcodes. If they are immediately next to each other, they will likely not work correctly.
It should be noted that the table for links only has very light styling defined by Link Library, so that it will fit well with your page design. In the example above, all tables in the theme used are set to have centered content and show alternating table row colors. In the example below, taken from a site running the TwentyFifteen theme, the table is much simpler.
Inserting a search box will allow you to provide a way for visitors to search within your library of links. Unfortunately, links are not searchable using the WordPress built-in search engine, hence the need to use this separate search box.
The shortcode to use to include a search box on a page is [link-library-search].
WARNING: You should be careful to have at least one space of line return between the two shortcodes. If they are immediately next to each other, they will likely not work correctly.
After saving the page content with the new shortcode, you will see a search box appear, as shown in the following image.
If you type keywords in the box and press the Search button, you will see the results of the search, displayed in the same layout. However, the list of category names will be hidden by default on the results page. Also, link categories that do not contain any links that match the search string will not be displayed either.
Coming soon









