• Resolved dbaltozer

    (@dbaltozer)


    Hi All,

    I’ve been trying for some days now to append an image link to the post’s title, within the loop. I’m able to append just fine … except … whatever I append also is being updated in the DB.

    I just want to add this image link to the right of the post’s title, not change the real post’s title.

    This page is a gallery page, BTW, which will take me to issue #2 in a bit.

    I have tried setting meta-data, works fine in appending the title, but it still changes the post’s actual title in the DB.

    Here’s a brief code snippets:

    Idea #1: $post_object->post_title .= $image_link;
    Idea #2: add_post_meta( $post_object->ID, ‘show me more’, $image_link, true );
    Then, for #2, I use the get_post_meta. Of course I can get the data, but can’t get it to attach to the right of the title without it updating the DB!

    The second, less important issue, is the gallery slider – the title displays on mouse over – and the anchor image code is visible. No prime, but needs to be there as it becomes the title once clicked to display in the larger display area.

    I’ve been PHPin for quite some time, so I will understand technical responses, I just can’t seem to find a way to append the title without it updating the DB!

    Is there a different function to do this?

    Thanks!

  • The topic ‘append post title’ is closed to new replies.