• Resolved gabernx

    (@gabernx)


    Hi, loving the plugin, but I need to find a way to make the Category link work. I am using it in a custom post type where the post type name is the actual category, any way to make this button link to the post type archive itself? The actual text is correct, showing the custom post type name, so I assume there should be an easy way to make it into a link in the plugin code.

    Thanks!

    https://www.ads-software.com/plugins/swifty-bar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gabernx

    (@gabernx)

    Follow up: I changed the <span> on line 76 of sb-bar-public-display.php to be a link with:

    href=”<?php echo get_post_type_archive_link( get_post_type( $post->ID )); ?>”

    That did the trick!

    Plugin Author Goran87

    (@goran87)

    Hey gabernx,

    Yes that will do it, glad you resolved the issue. I would add it in next update ,but i think that if custom post type “has_archive” is set to false, link would not work, need to test it up.

    Thread Starter gabernx

    (@gabernx)

    Yeah with no archive it probably would not, but you can just ad another condition to just make it <span> if has_archive is false. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category Link Not Working’ is closed to new replies.