• Resolved binutz

    (@binutz)


    Hi,
    I have created about 60 categories and then tried displaying the links under each category on separate pages (one category on a single page) using following syntax :

    [link-library categorylistoverride=”25″] [link-library-cats categorylistoverride=”25″]

    In addition to single category list on the page, I get the following message also under the list:
    No categories found.

    Is there anyway to remove that? Is the Syntax used wrong?

    Additionally, I would like to know whether there is any limit for the creation of categories and links using Link Library plugin.

    Thanks,
    Binu

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    What do you mean by “single category list” on the page? It does not really make sense to show the list of categories on the same page as a single category of links, since the purpose of the list of categories is to be able to jump to a category or change the category being displayed. Now, the error you’re getting suggests to me that the ID of 25 is not one of your category ID. Another possibility from what I can see in the code is that the quotes before and after the number don’t seem to be the same type of quote. Now, it could just be the WordPress forum playing tricks on the quotes, or they might be different. Your shortcodes should be:

    [link-library categorylistoverride="25"] [link-library-cats categorylistoverride="25"]

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    To answer your other question, no there is no limit. That being said, I have not done exhaustive performance tests on how well WordPress would handle very large amounts of links.

    Thread Starter binutz

    (@binutz)

    Hi Yannick,
    Thanks for the quick and detailed response.
    What I am trying to achieve is to show 60 categories in 60 pages, ensuring that each page displays only a specific category associated with that particular page.

    My purpose is to show the links submitted by the users under 60 topics(categories) in 60 sperate pages, with a page dedicated for each topic. And my users are members of Buddypress groups in 60 categories(ie,60 user groups).
    I am trying add separate pages corresponding to each Buddypress group so that users can view only the relevant links meant for a particular group on the page associated with that group.

    For link submission,I am using the standard form where user can select their category (topic)of interest from the drop down list and submit links.

    Is there any better way to accomplish my purpose?

    With the current shortcode everything works as expected, except that the unwanted message that appears below the links! I hope it can be hidden using CSS.

    Binu

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Have you tried using the permalinks approach (https://github.com/ylefebvre/link-library/wiki/Customizing-the-layout#using-permalinks)? With this approach, you define two pages. One with your list of categories, the other with a single instance of Link Library showing one category at a time. Then the magic of permalinks takes over.

    Thread Starter binutz

    (@binutz)

    Thanks a lot for the suggestion.
    I will try that out.

    Thread Starter binutz

    (@binutz)

    Hi Yannick,
    I was about to try the method suggested by you; but now I am bit confused about the way it works.
    As per the following instructions given:

    “Set the Permalinks page address (e.g. for mysite.com/links, type links in the Permalinks Page field)”

    My questions are :

    Do I have to manually enter the links summitted by the users in the in the Permalinks Page field or Will they automatically be displayed on the pages dedicated for each category?

    Thanks
    Binu

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    The permalinks page is where the links will be displayed. The list of categories (displayed with [link-library-cats] would usually be on another page. Each of these category links will link to URLs that look like mysite.com/links/category-name and show links from these categories. If users submit links, they will automatically show up in the sub-pages for the correct category.

    Thread Starter binutz

    (@binutz)

    Thanks for the clarification. I will try that.

    Thread Starter binutz

    (@binutz)

    Hi Yannik,
    Sorry for the late reply.
    I tried Permalink method; but it did not work for me. I switched back to the old method that I had specified in my first message.
    This time, I tried showings categorized links on Buddypress group pages ( pages attached Buddypress groups that I had created using “Groups Extra plugin) in such a way that each group page displays the links (of a category)associated with that particular group.

    I used the same syntax that used earlier ( [link-library categorylistoverride=”25″] [link-library-cats categorylistoverride=”25″] ) and as expected, the unwanted message “No categories found” appeared under the links.

    Interestingly, the group page where I pasted the short code ,showed up the following code in the ‘Text mode’
    ————————————————————————————-

    <!-- Div Linklist -->
    <div class="LinkLibraryCat LinkLibraryCat250 level0">
    
    <!-- Div Category -->
    <div id="handicrafts-decorations">
    
    <!-- Div Category Name -->
    <div class="linklistcatname"><!-- Div Cat Name --><span class="linklistcatclass">Handicrafts & Decorations</span></div>
    <!-- DivOrHeader -->
    
    </div>
    <!-- Div Category Name -->
    <ul>
     	<li><a id="link-15368" class="track_this_link " href="https://youtu.be/tav5D9315RA" target="_blank" rel="noopener noreferrer">Handicraft Training</a>
    <span class="editlink"><a href="https://localhost/maxski/wp-admin/post.php?action=edit&post=15368">(Edit)</a></span></li>
    </ul>
    </div>
    <!-- Div End Category -->
    <script type='text/javascript'>
    jQuery(document).ready(function()
    {
    jQuery('.arrow-up').hide();
    jQuery('#linklist1 a.track_this_link').click(function() {
    linkid = this.id;
    linkid = linkid.substring(5);
    path = '..\..\..\..\maxski/';
    jQuery.ajax( {    type: 'POST',    url: 'https://localhost/maxski/wp-admin/admin-ajax.php',     data: { action: 'link_library_tracker',             _ajax_nonce: '11a167ce5e',             id:linkid, xpath:path }     });
    return true;
    });
    jQuery('#linklist1 .expandlinks').click(function() {
    target = '.' + jQuery(this).attr('id');
    subcattarget = '.' + jQuery(this).attr('data-subcat');
    if ( jQuery( target ).is(':visible') ) {
    jQuery(target).slideUp();
    jQuery(subcattarget).slideToggle();
    jQuery(this).children('img').attr('src', 'https://localhost/maxski/wp-content/plugins/link-library/icons/expand-32.png');
    } else {
    jQuery(target).slideDown();
    jQuery(subcattarget).slideToggle();
    jQuery(this).children('img').attr('src', 'https://localhost/maxski/wp-content/plugins/link-library/icons/collapse-32.png');
    }
    });
    jQuery('#linklist1 .linklistcatclass').click(function() {
    jQuery(this).siblings('.expandlinks').click();
    });
    jQuery('#linklist1 .linklistcatnamedesc').click(function() {
    jQuery(this).siblings('.expandlinks').click();
    });
    });
    </script>
    
    </div>
    <!-- Div Linklist -->
    <!-- End of Link Library Output -->
    
    <!-- Link Library Categories Output -->
    <div>No categories found.</div>
    <!-- End of Link Library Categories Output -->

    ———————————————————————–

    I think the last part of the code is causing “No categories found” message to appear below the links on my pages. Is there any work around to hide that message on all pages ?
    It is the only hitch I have encountered so far, otherwise everything works perfectly!
    Thanks,
    Binu

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    I think I have mentioned it before, but I will mention it again. If your plan is to only display links from a single category on different pages, then it does not make sense to use the [link-library-cats] shortcode. That code is meant to display a list of categories to change the category being displayed. Using this shortcode with a single category being listed defeats the purpose of that shortcode.

    Thread Starter binutz

    (@binutz)

    I do understand! Thanks for clarifying..

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Excellent. Please consider donating to support this plugin’s development.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Showing single category links on a page’ is closed to new replies.