• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

get_post_format_link

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › get_post_format_link

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 13 years, 2 months ago by rfmeier.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 28, 2013 at 6:10 pm #42986
    mmjaeger
    Member

    get_post_format_link is supposed to return the archive link to the post-format - it works if a post-format is provided

    now the question is how do I get/create a link that would show all posts that do NOT have a post type assigned or are set to standard?

     

    thanks

    June 3, 2013 at 8:00 am #43812
    rfmeier
    Member

    Hello,

    Someone may have a better explanation at the WordPress Support Forums, but I will give it a try;

    The get_post_format_link() will only return an archive address if you have created a post with the specified format, else it will return false.  From some quick testing, I was not able to get an archive link for a standard, non-formatted post-- I was expecting that result.

    If you want to display all posts-- excluding excluding post formats-- it would be wise to hook the 'pre_get_posts' action within the WordPress API and alter the query to exclude all post formats.

    As a *shameless* plug, I have a plugin that does this for the homepage; Filter Post Formats.  This will allow excluding of post formats on the home page.  It could be extended for archive pages too.

    I am currently unaware if a an archive page (display all posts like the home/blog page) exists.  Someone else may be able to shed some light on that subject.

    I hope this helps or points you in the correct direction.


    Ryan Meier – Twitter

    June 3, 2013 at 8:00 am #43813
    rfmeier
    Member

    Hello,

    Someone may have a better explanation at the WordPress Support Forums, but I will give it a try;

    The get_post_format_link() will only return an archive address if you have created a post with the specified format, else it will return false.  From some quick testing, I was not able to get an archive link for a standard, non-formatted post-- I was expecting that result.

    If you want to display all posts-- excluding excluding post formats-- it would be wise to hook the 'pre_get_posts' action within the WordPress API and alter the query to exclude all post formats.

    As a *shameless* plug, I have a plugin that does this for the homepage; Filter Post Formats.  This will allow excluding of post formats on the home page.  It could be extended for archive pages too.

    I am currently unaware if a an archive page (display all posts like the home/blog page) exists.  Someone else may be able to shed some light on that subject.

    I hope this helps or points you in the correct direction.


    Ryan Meier – Twitter

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble