Read more to open external link

You just need to add target=”_blank” to the anchor tag. function remove_more_link_scroll( $link ) { $link = str_replace(‘>’,’ target=”_blank”>’, $link); return $link; } add_filter( ‘the_content_more_link’, ‘remove_more_link_scroll’ ); I feel compelled to state that I consider forcing new tabs/windows to be very unfriendly behavior, and if you search the web you will see that I am … Read more

How to I make my post title link to a custom field

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 … Read more

Custom Field – Do Not Show if Value is Empty?

Add a little check to your code function custom_do_grid_loop() { // Intro Text (from page content) echo ‘<div class=”page hentry entry”>’; echo ‘<h1 class=”entry-title”>’. get_the_title() .'</h1>’; if ( has_post_thumbnail() ) { echo ‘<div class=”import-image”>’ . get_the_post_thumbnail() . ‘</div>’; } echo ‘<div class=”entry-content”><p>’ . get_the_content() . ‘</p>’; //Add this condition to your code $meta = genesis_get_custom_field( … Read more

Can I use a Custom Field as the Featured Image URL?

Editing the Template The easiest solution would be to use a conditional to display the featured image: if has custom field use it, else use Featured Image You can get the custom field using get_post_meta(), which will return an empty string if the specified key isn’t set: $custom_url = get_post_meta( get_the_ID(), ‘old_featured_image_custom_field’, true ); You … Read more