Support » Plugin: Link Library » Search muliple libraries?

  • Hi,

    First I would like to say I love your plugin, it is exactly what I needed.

    I was wondering if it is possible to use the search feature to search all Libraries? I currently have 2 libraries but I would like to offer my visitors the chance to use the search bar to search for results from both Libraries as my links are semi-related.

    Thank you

    – Raina

Viewing 3 replies - 1 through 3 (of 3 total)
  • The first thing you need to do first is to create a third library that has all of the categories from both of the first two libraries in it. Let’s assume for purposes of this discussion that it is Library 3.

    You then need to create a search results page. The search results page will have a title something like “Search Results,” and the following two lines in it:

    [link-library-search settings=3]
    [link-library settings=3]

    Next, go to the search results page. When seen on its own (not as a result of a search), it will have a complete list of all your links. Ignore that, because no one will ever see it. Now view the source of that page. There will be a bit in it that will read something like this:

    <form method=”get” id=”llsearch”>
    <input onfocus=”this.value=”” value=”Search…” name=”searchll” id=”searchll” type=”text”>
    <input value=”X” name=”page_id” id=”page_id” type=”hidden”>
    <input value=”Search” type=”submit”>

    where the input value (X) for the page_id will be the number of your newly created page. Copy and paste all of that code into each of your two library pages, and save each page.

    Voila! You will have a search form that will search all your links. When someone uses the form, it will take them to your newly created Search Results page. However, the list of all the links will not appear on that page when it is found through the search function. Instead, that page will have only a search box and the results of the search.

    This just stopped working on my pages. However, it can be fixed by changing the line that reads:

    <form method=”get” id=”llsearch”>


    <form method=”get” id=”llsearch” action=””>

    substituting the URL for your search page for

    From my testing the search output is determined by settings of library X in [link-library settings=X] and NOT by library Y in [link-library-search settings=Y]. The latter uses very few settings of library Y, probably only the button label and target url.

    So I think you can simply create a library that shows all categories and use the link-library shortcode with that library number.

    Of course, for showing only select categories on that page you need to use another library. Or use [link-library-cats categorylistoverride=”A,B,C,F”]

    The override cats will be sorted as specified in library X, and they will also honor excluded cats, but they will override “Categories to be displayed”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search muliple libraries?’ is closed to new replies.