Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, WordPress assumes that:

    #respond

    will link to the comment form on a blog, and

    #comments

    to the start of the comments section. But if you’re looking for a guarantee these will do what you expect in every theme out there, I certainly can’t provide one for you.

    Thread Starter golddave

    (@golddave)

    From my testing I am certain that what you said is not how WordPress is functioning. I have found cases where #respond does nothing at all. Likewise I’ve seen instances where #comments does nothing at all. I’ve also seen instances where both of them link to the start of the comments section. It looks to me like it really depends on the theme. I was hoping that there was a function I could use to see what any given theme was using. Or at least a suggestions for how to code around the possibilities.

    From my testing I am certain that what you said is not how WordPress is functioning.

    Sorry, but that is how it functions. For example, one need only look at the code in comments_popup_link() to see it appends #respond when there are no comments.

    That it doesn’t work 100% of the time is a testament to the lack of standards among theme designers, and *not* an example of what WordPress is doing. As you correctly put it:

    It looks to me like it really depends on the theme.

    It *is* a weak link, and there’s little I can suggest that will improve things for what you’re working on.

    Thread Starter golddave

    (@golddave)

    My statement about how WordPress is functioning was made based on observation (testing my code in several themes) which, as a QA engineer by trade, tells me how it is actually working in the wild. (How it’s working in the wild is far more important than how it is coded to work to a QA engineer. That’s how bugs are found.) Yes, there appears to be a tremendous lack of standards among theme designers. But if a function is supposed to work both ways then the API that uses the function should be tightened up to avoid designers using it in an unintended way. It goes a little against the grain of what WordPress is about but the philosophy is that if they can’t govern themselves then someone should govern them. anyway, that’s enough ranting.

    Thanks for the help. (By the way, the code I saw for comments_link() only made use of #comments. That’s another reason why I thought is wasn’t working right.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link To Comments From Plugin’ is closed to new replies.