• Resolved pedronmarques

    (@pedronmarques)


    Hi

    This plugin is really helping me out! Thanks! I have a doubt however. Can I transform Simple Links into a Custom Post Type?

    I need a custom post type for “publishers” and another for “libraries”, each listing their own links. Can I use Simple Links twice and change each to “publisher” and “libraries”? Or, if not, can I create a custom post type and use Simple Links with it?

    I need to keep these two lists of links separate, that’s why!

    Really hope this is doable. (I have limited but competent knowledge of php for this also if necessary)

    thanks!

    https://wordpress.org/plugins/simple-links/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Mat Lipe

    (@mat-lipe)

    Hi Pedronmarques,

    The plugin is not really designed to be duplicated, however in theory if you change all instances of “simple_link” and all class names to something else you could probably make it work.

    It is fair amount of wark, because the classes aren’t namespaced. I tried that a while ago and it caused issues with people running PHP 5.2.4.

    Good Luck

    Thread Starter pedronmarques

    (@pedronmarques)

    Thanks, that sounds a bit too much for me…

    Forgetting the custom post types then, using simple links my problem is that I need something like this structure:

    One widget with simples links showing:
    publisher (category)
    A (subcategory)
    Texas (subcategory)
    etc.

    Another widget with:
    libraries (category)
    A (subcategory)
    Texas (subcategory)
    etc.

    I thought that perhaps I could have A under publisher and A under libraries, so as to separate different links with A or Texas from one another. Is there any way to do this? I’ve tried changing the category slug like so a-publishers, and a-libraries, but it’s not doing the filter…

    I’m using the premium display category plugin also by the way…

    Plugin Author Mat Lipe

    (@mat-lipe)

    Hello,

    I have release version 2.8.0 just now which allows for multiple categories with the same name to work.

    Enjoy!

    Thread Starter pedronmarques

    (@pedronmarques)

    Thanks Mat!
    I will now update and test it!

    Thread Starter pedronmarques

    (@pedronmarques)

    Hi it seems to be working now! Fantastic!
    The only thing is the premium plugin Display by Category does not seem to be working with it? I have tried deactivating reactivating it, etc, as well as other potential conflicting plug ins, but to no avail. I can’t seem to use the display by category title function which I really need…

    Any solution?
    many thanks for the great support also!

    Plugin Author Mat Lipe

    (@mat-lipe)

    I have released version 1.1.2 of Display By Category which works with the latest 2.8.0 version of Simple Links.

    Let me know if the updating the plugin does not fix the issue.

    Thanks!

    Thread Starter pedronmarques

    (@pedronmarques)

    How do I download the update? With the simple links the update button appeared in wordpress, not this one. In your site?

    thanks!

    Plugin Author Mat Lipe

    (@mat-lipe)

    Hello,

    It may take a little while before it shows up.
    I think the default check for WP is like once every 12 hours.

    Otherwise, it will update just like a standard plugin through the WP admin.

    Thread Starter pedronmarques

    (@pedronmarques)

    Step by step, I believe now it’s the csv importer that needs an update…

    it’s working perfect when I create links. But once I test export (and delete the links) and then import back, it does not recognize the difference between same title categories (it pulls all C subcategorized items to the first created C subcategory)

    Any chance to update this! I imagine after this it’s running smooth.

    thanks so much for your brilliant support!

    Plugin Author Mat Lipe

    (@mat-lipe)

    Hello,

    You are correct. The Export was using the category names which are impossible to distinguish between two with the same name.

    I release an update earlier today which switches over to the new structure of using Ids.

    You should see it available soon, if you don’t already.

    Cheers!

    Thread Starter pedronmarques

    (@pedronmarques)

    is there a way I could do it by slug for example (or at least have the category title or slug appear on the csv?

    In the csv now the link categories appear by id number (before I could see the category title) which is not so convenient or intuitive – I have to create all categories and take note of their Ids. Just that detail, otherwise it is importing and exporting finally.

    thanks

    Plugin Author Mat Lipe

    (@mat-lipe)

    Hi pedron,

    I’m afraid this is not possible.

    There is no way to know if someone is entering a slug vs a name in the import.
    Lets say you have two categorys named “products” and one of them has the slug “products” the plugin would not be able to tell if you if you mean the the title or the slug.

    Titles will still work in the imports as well as ids, but to make slugs works specifically would take a custom implementation

    Plugin Author Mat Lipe

    (@mat-lipe)

    I have release version 1.2.0 tonight which has a filter to allow for using the slug with categories.

    add a function to the filter ‘simple-links-cat-field’ and return ‘slug’ and it will use slugs for import and export.

    Enjoy!

    Thread Starter pedronmarques

    (@pedronmarques)

    Hi Mat

    Thanks a lot! I guess you got obsessed with this detail!

    My knowledge of php is limited, could you tell me exactly which function to add and where? Many thanks!

    If I could give you 10 stars I would.

    Plugin Author Mat Lipe

    (@mat-lipe)

    Somthing like this should do the trick

    add_filter( 'simple-links-cat-field', 'sl_export_use_slugs' );
    function sl_export_use_slugs(){
         return 'slug';
    }
Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘use simple links with custom post types – have two distinct lists of links’ is closed to new replies.