I assume that the post title markup looks something like so:
<h1><a href="https://wordpress.stackexchange.com/questions/117332/<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
You merely need to replace <?php the_permalink(); ?>
with your post custom meta value:
<?php $post_bookmark = get_post_meta( get_the_ID(), 'post_bookmark_url', true ); ?>
<h1><a href="https://wordpress.stackexchange.com/questions/117332/<?php echo $post_bookarmk; ?>"><?php the_title(); ?></a></h1>
Other caveats:
- You’ll want to consider the context in which you use this code. If you only need it in your Blog Posts Index, then create a
home.php
template file, and put it there. That way, your post titles are not impacted in other contexts. - You’ll probably want to use some fallback in case
post_bookmark_url
isn’t set.