WordPress.org

Ready to get started?Download WordPress

Forums

Link Library
Single or multi-page (3 posts)

  1. carlytx
    Member
    Posted 1 year ago #

    Can I use a single page to display different results?

    for example if I have five pages of information about 5 locations and I want to display only links associated with each of these locations do I have to set up 5 pages for the link results or is there a way to set up 1 page and pass it the category (location) I want to display?

    thanks

    http://wordpress.org/extend/plugins/link-library/

  2. CarolWP
    Member
    Posted 1 year ago #

    I've found two ways of doing this. The first is to set up a library with the categories in a drop-down menu, and have the first category of links be a dummy category like, "Select a location," that has no actual links in it. On the settings for that library, you would choose, "Only show one category at a time," and choose your dummy category as the "Default category to be shown when only showing one at a time." You would choose Ajax as the switching method.

    You would then create a page that has the following code in it:

    [link-library-cats settings=X]
    [link-library settings=X]

    where X is the number of the library you just created. This creates a page with a drop-down menu in which, after someone has chosen a category (location) and pressed the "Go" button, the appropriate links are shown. The only problem with this method is that before someone chooses a category, the page will say "No links found" after the drop-down menu.

    The only other way I have found to make this work is to manually create separate pages. You would create a main page for the categories. You would then create subpages of the main page, each of which would have the same slug as the slug for the category (location) involved. For example, if your categories had the slugs location1, location2, etc., your main page might be links, and your subpages would be links/location1, links/location2, etc. Each of the subpages would have this line of code:

    [link-library categorylistoverride="X" settings=Y]

    where X is the category (location) you want to display on that page, and Y is the overall library with all the links.

    The main page that would have only:

    [link-library-cats settings=Y]

    In the Library settings page for Library Y, you would specify HTML Get + Permalinks as the switching method, check the "Enable Permalinks" box, and specify the main page as the permalinks page. That way, the main page would display the list of categories, and would link to all of the subpages.

  3. CarolWP
    Member
    Posted 1 year ago #

    One more alternative:

    You can set up your main page to use the "HTML Get + Permalinks" switching option, check the "Enable permalinks" box, and put the location of your main page into the Permalinks Page box. You can then have the main use the following codes:

    [link-library-cats settings=X]
    [link-library settings=X]

    The library will then create the subpages for you, one for each category. However, each subpage will then have the entire list of categories (locations) at the top, which may not be what you want.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic