• Resolved jeremy2805

    (@jeremy2805)


    Hello,

    In simple_link.php it registers a custom post type for links using post type of ‘simple_link’ so AFAIK if I go to http://mysite.com/simple_link/ it should try to produce an custom post type archive page, but all I get is a 404.

    Do I need to create an archive-simple_link.php template to get that working?

    Also, I’d like to get link categories showing up in the dashboard’s menu editor so I can have a submenu item pointing to an archive of a link category. Any pointers how to do that?

    Many thanks.

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

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

    (@mat-lipe)

    Hello,

    simple_link is used as an internal style post type so there is not archive or single sections for it.

    To achive a list of links at /simple_link you may create a new page called Simple Links, set the slug to simple_link and then use the shortcode [simple-links count=1000] within the page content.

    Thread Starter jeremy2805

    (@jeremy2805)

    Hi Mat,

    Other than breaking the upgrade path, what would be the implications of me making the post type public and creating my own simple-links archive template?

    The solution you outline does not allow my client to add link categories via the dashboard menu editor. I could kludge it via a redirect, but that would rather dent my SEO efforts.

    Many thanks.

    Plugin Author Mat Lipe

    (@mat-lipe)

    You can filter the args used to register the post type using this filter
    ‘simple-links-register-post-type’,

    So essentially you may make the post type public without hacking the plugin.

    I should warn you, it is not designed to be used this way so you will have to do a fair amount of work in your templates to get things to output correct and/or link to what is specified to link to.

    Like the post type, the category args may also be filtered using this filter
    ‘simple-links-register-link-categories’

    That way you can make them show up in the nav menu and be public etc. But again it is not designed to work this way so you will have to create very custom taxonomy templates.

    Hope this helps!

    Good luck 🙂

    Thread Starter jeremy2805

    (@jeremy2805)

    Hi Mat,

    Oh great. That should work a treat. I’ve already pretty much of written the template – it’s just getting it setup so that I can use the archive mechanism.

    Many thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Archive page…’ is closed to new replies.