make or get permalink for post-format-standard with get_post_format_link (4 posts)

  1. thedannywahl
    Posted 4 years ago #

    I'm writing a theme and added support for alternate post formats (gallery and aside) and WP generates permalinks for them under /type/gallery and /type/aside but it doesn't generate a permalink for /type/standard (named by WP in new -> post) as the post-format. Here's a sample code that on a standard post will return NULL.

    $format = get_post_format();
    if ( false === $format ) {
        $format = 'standard'; // WP Default Name
    $format_link = get_post_format_link( $format );
    echo "Link:" . $format_link;

    How would you add a permalink for this format?

  2. shaneholden
    Posted 4 years ago #

    Any luck with this?

    I have icons for the different formats that link to those format specific archives, but am unable to link to the standard formats.

  3. shaneholden
    Posted 4 years ago #

  4. thedannywahl
    Posted 3 years ago #

    Thanks a lot that's going to help me out.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.