Ready to get started?Download WordPress


two minor issues (15 posts)

  1. ashadeofgrey
    Posted 9 years ago #

    Hey, I'm having two problems that I'm sure can be resolved quite easily.
    My blog is here: http://www.ashadeofgrey.net/wp
    As you'll notice, I only have two photos up with three comments, as a test.
    The things I'd like to have a bit different:
    -If you click to get to the previous post (bottom left of screen- i'm going to make that a bit more obvious later) the comments section on the archived post doesn't show up.
    -When you submit a comment, the page refreshed in the popup box is my website, not the popup box.
    I'm sure they're both easy fixes, I just don't really know what I'm doing with this stuff yet.
    Any other recommendations?
    Thanks in advance.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Popup issue - I believe it's sorted here:

  3. ashadeofgrey
    Posted 9 years ago #

    podz...thanks for the link, that fixed the issue.
    does anyone know why i can't get the comments to show up on my previous files?

  4. ashadeofgrey
    Posted 9 years ago #

    I'm not sure I was being completely clear above.
    This is the file that DOES show the "Comments" option:
    This files does not:

  5. Joshua Sigar
    Posted 9 years ago #

    The comment link won't show up in single-post display (index.php?p=6).
    If you use this
    for navigation, then problem solved.
    The result might not what you want. I have another solution but it's kinda hack-ish, not preferable to me.

  6. ashadeofgrey
    Posted 9 years ago #

    Thanks for the wiki link. If nothing else, that should work perfectly.
    However, I wouldn't be opposed to the hack if you don't mind explaining it.

  7. Joshua Sigar
    Posted 9 years ago #

    inside template-functions-comment.php there is this function: comments_popup_link(), that will display the link if you're not in single-post display
    function comments_popup_link (...) {
    if (!$single) { // if not viewing single-post
    // display the commentlink

    So if you delete if (!$single), that'll probably do it

  8. ashadeofgrey
    Posted 9 years ago #

    hmm...Neither of those methods did anything for me.
    Let's just focus on the first one for now. I read on the wiki that you have to use that method outside of the loop. Unforunately, I have a cell setup to hold those links in dead center of the engine. Do I need to rearrange my page a bit, or is there an easy way to still use those tags?
    With the hack, I deleted that line and it gave me an error. So, I put it back in.
    Thanks for all your help this far.

  9. ashadeofgrey
    Posted 9 years ago #

    ack..what a headache.
    i think it's all worked out though..i didn't really want to start messing with the CSS, so I just worked out the hack that you had reccommended earlier.
    while we have this thread nice and open though, is there any sort of a permalink that you know of to take you to the previous page? I want to set this up so that when a user clicks on the image on my index page, they are taken to the previous page.
    anything more you can do to help would be oustanding.
    thanks so much for everything you've done so far, though.

  10. Joshua Sigar
    Posted 9 years ago #

    You're gonna pissed off of this.
    For navigation and retaining comment link, you could add this inside the loop

    <?php $single = false; previous_post(); next_post(); ?>

    So, instead of deleting the single-post checking in the comment file, just set $single to false (it's supposed to be true, though)
    To control the output, consult wiki

  11. ashadeofgrey
    Posted 9 years ago #

    hahahah..wow, thats really funny
    i think im just going to leave it how it is though, seeing as how i've already been through it..unless you would recommend putting the code back in.
    one quick question about the above code...what would the actual permalink be? something along the lines of '">'

  12. Joshua Sigar
    Posted 9 years ago #

    it will generate
    if post with ID 6 is the previous post
    The code is untested so it could generate something else :P (I'm serious)

  13. ashadeofgrey
    Posted 9 years ago #

    no no..i mean, what coding would i type to generate that permalink?
    (i'm pretty sure i got the thing in my-hacks.php worked out..i didn't get any errors.)

  14. Joshua Sigar
    Posted 9 years ago #

    How's the photoblog thing work? Create a new post, insert image in the post, and then publish?
    If so, a plugin will do it. The plugin will search for <img src=...> in your post and then
    $current_img = <img src=...>; // image in your post
    $previous_img_link = "" . $current_img . "";

    I have never created a plugin before so it will take me a while if I have to create one.

  15. ashadeofgrey
    Posted 9 years ago #

    actually...i'm doing this a bit backwards..i'm not using a photoblog plugin, if that's what you mean.
    i've just revised the standard wordpress template quite a bit.
    basically, i upload my file and insert the code into my post. i'm not against putting the 'a' tag into the wordpress template if it's easier. i just don't know too much about permalinks right now.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.