Support » Fixing WordPress » Link Limit Being Ignored

  • Resolved Lasalas

    (@lasalas)


    The “Limit” field in link categories appears to be ignored. Anyone else getting this? I’m using 2.0.2

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just had a look at the code, and the template itself appears to be telling the get_links() function how many to show, among other things. Should it be overriding the preference I set in the actual category?

    Always check the description, usage, parameters of the tags used in the template:
    http://codex.wordpress.org/Template_Tags#Links_Manager_tags

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    get_links() does not respect the link limit settings in any shape or form. You really want to use wp_get_links() instead. If you pass it a category number like the codex says, then the link limit you set for that category will be respected properly, as will all the before and after stuff for the links.

    Thanks guys, that helped a lot. Now I just have to fix this terrible template I can’t believe I paid money for…

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    The links thing is tricky. A lot of theme authors prefer to use get_links because it gives the theme control over all those settings, and lets the theme author make the links list fit the theme better. Whereas users then wonder why none of the options in the links stuff seem to do anything. It’s a problem, certainly.

    It doesn’t help matters that all the functions involving links have some very odd and inconsistent behavior as well.

    What really needs to happen is that the wp_links* functions need to use the settings from the options unless the theme overrides them. Then theme authors could override the settings like before and after and between and such, but respect the stuff like limits and so forth. Clearly work needs to be done here.

    I agree. It was confusing at first, but being in the web development business means I can usually figure it out. It would have been a lot more frustrating for someone who “just wants it to work”.

    Otherwise, theme integration seems to be really good – Now I just need to convert mine to liquid 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Link Limit Being Ignored’ is closed to new replies.