Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

A solution for this issue for the previous default theme, Twenty Thirteen, was found by me here. It's perfect for what I'm trying to do: set my own desired URL as the link in the title, rather than the first link appearing in a post being the URL the post title will point to.

Unfortunately, the way things are done in Twenty Fourteen is quite different. Here's how the code in content-link.php currently looks:

<header class="entry-header">
    <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    <div class="entry-meta">
        <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
    </div><!-- .entry-meta -->

        if ( is_single() ) :
            the_title( '<h1 class="entry-title">', '</h1>' );
        else :
            the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );

    <div class="entry-meta">
        <span class="post-format">
            <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>"><?php echo get_post_format_string( 'link' ); ?></a>

        <?php twentyfourteen_posted_on(); ?>

I'm pretty lost. To make things a little more complicated, I currently have the custom link post custom_field name aq_format_link. Here's what my previous theme's format-link.php file looked like:

        $link = get_post_meta( get_the_ID(), $key = 'aq_format_link', $single = true );
share|improve this question
Could you elaborat on what are you trying to achieve exactly and what is wrong with given code? –  Krzysiek Dróżdż Dec 16 '13 at 18:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.