WordPress.org

Ready to get started?Download WordPress

Forums

syntax for "if '#comments' then load wp-comment (2 posts)

  1. alicson
    Member
    Posted 10 years ago #

    unavoidable that i'll have to learn php.. until i have that figured out though, i'd really appreciate it if someone who does know php could tell me/advise me what to write such that the "... include(ABSPATH . 'wp-comments.php'); " bit would activate/be returned/printed (whatever the proper language is) only if the url that the page came from/the url currently sitting in the address bar has "#comments" at the end of it.
    did that make any sense at all?

  2. alicson
    Member
    Posted 10 years ago #

    aww..
    sorry..
    no, here:
    i want to have two separate links for each post: permalink and comments.
    the idea being that you can visit a post's permalink without being subjected to the whole comments form and all the comments being shown.
    but if you click on the "comments" link, then it'll take you to the permalink WITH the comments shown. or if you're already at the permalinked page, it'll open up the comments below.
    so, i figure the way to do this is to tell the thing to load wp-comments IF "#comments" is at the end of the url in the link that is clicked. better suggestions are thoroughly welcome.
    does that help make sense?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.