Help with Wordpress links

4 replies
  • WEB DESIGN
  • |
Is there some way to have a set of links show only on specific pages/posts in my Wordpress site?

For example can my links somehow be sorted by post category so that all the posts under that category will show a particular group of links. And posts under a different category will show a different set of links?

I only want some links to show on some posts and not on others.

So, what I'm aiming for is if I click on any post under a certain category, the links shown will be relevant to those posts in that category.
If I click on a different category, the links shown will be different and relevant to the posts of that different category.

Thanks for your help.
#links #wordpress
  • Profile picture of the author managepro
    Hello Bella, this is difficult in wordpress. This can be done in Joomla where you can have 2 instances of links modules (plugin) itself, and you can display one instance of the links for one category and another instance for the other category.

    If you can manage to get 2 instances of the links plugin in wordpress then probably you may be able to do it, display the first instance for one category and the second instance for the second category, but i think its difficult, wordpress is a little weak when it comes to embedding logic in this way, it sure is the best blogging though. All the best.
    {{ DiscussionBoard.errors[1505707].message }}
  • Profile picture of the author jeffanderson264
    Thanks for providing help about this here. I was looking for this. This forum is a nice place.
    {{ DiscussionBoard.errors[1506947].message }}
  • Profile picture of the author Aristocratic
    Originally Posted by straightbella View Post

    Is there some way to have a set of links show only on specific pages/posts in my Wordpress site?

    For example can my links somehow be sorted by post category so that all the posts under that category will show a particular group of links. And posts under a different category will show a different set of links?

    I only want some links to show on some posts and not on others.

    So, what I'm aiming for is if I click on any post under a certain category, the links shown will be relevant to those posts in that category.
    If I click on a different category, the links shown will be different and relevant to the posts of that different category.

    Thanks for your help.

    You are going to use two plugins to accomplish this: Widget Logic and Category Posts Widget

    The category posts widget allows you add a widget to your sidebar and specify the category of the post links you want to show. So if the category's posts you want to display are in category A, you'd add the widget to your sidebar, specify category A, and a title for the widget if you prefer and save. Now only posts in category A will appear in this widget in the sidebar.

    But you want to only show that sidebar on certain post pages. This is where Widget Logic comes in.

    At the bottom of the widgets, you will have a widget logic blank. In this blank you need to put the conditional tags to only show this widget on certain pages.

    If you only want the widgets to appear on post pages within a certain category, you'd enter:in_category('X')
    Where "X" represents the category number.
    You can get the category number by going to the page that shows all your categories, mouse over the category, look at the bottom left status bar and see the id=#

    So by combining the power of the two, we can show only one category's posts in a widget (category posts widget) on post pages within that specific category (widget logic).

    Is this what you were trying to accomplish?
    Signature

    COMING SOON

    {{ DiscussionBoard.errors[1507690].message }}
    • Profile picture of the author straightbella
      Thanks Aristocratic.
      This sounds like what I'm trying to achieve.
      I'll give it a go. Thanks again
      Bella
      {{ DiscussionBoard.errors[1514486].message }}

Trending Topics