• 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

add link and icon to linkpost title in both single post and blog page

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 › add link and icon to linkpost title in both single post and blog page

This topic is: not resolved

Tagged: blog page, entry-title, genesis_post_title_text, icon

  • This topic has 9 replies, 2 voices, and was last updated 9 years, 4 months ago by Brad Dalton.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • October 27, 2016 at 1:44 pm #195399
    sigul
    Member

    Hi all,
    I am trying to add linkpost to the new design for my blog (a la Gruber, post with title that links to another's blog article, "flagged" with an arrow at the end of the title).

    I found this function to add this to single post page (on sridharkatakam.com)

    // Filter Post Title Text to wrap the title in a custom URL (if present)
    add_filter( 'genesis_post_title_text', 'sk_post_title_text' );
    function sk_post_title_text( $title ) {
    if ( is_singular( 'post' ) ) {
    $passthrough_url = esc_url( get_post_meta( get_the_ID(), 'passthrough_url', true ) );

    if ( $passthrough_url ) {
    $title = ''.$title.' ➝';
    }

    }

    I am still wondering how to add the icon (just the icon, not the link) in the posts page (being it not home, not front, just the blog) posts title

    http://37.60.241.80/~cristi43/diversoblog.com/
    November 3, 2016 at 5:29 pm #195691
    Brad Dalton
    Participant

    I'm guessing you want to add a icon to the entry title on the page using the blog page template and link the icon to the single post?


    Tutorials for StudioPress Themes.

    November 5, 2016 at 3:57 am #195760
    sigul
    Member

    yes, actually I'd wanted to link title and icon, but your suggestion is very welcome. any idea about how to do that on the posts page? I suppose I need a template for this page, but I am not sure if it'll be working as wordpress posts page.

    November 5, 2016 at 6:44 pm #195773
    Brad Dalton
    Participant

    Do you want to use the same icon for every single entry title?


    Tutorials for StudioPress Themes.

    November 6, 2016 at 4:04 am #195780
    sigul
    Member

    Sure.

    This way, when you scroll down the blog's posts page, you know what is a post and what is a comment to others posts.

    Thanks for helping

    November 6, 2016 at 7:20 pm #195811
    Brad Dalton
    Participant

    Happy to point you in the right direction. What you can try is add something like the following code to your filter function.

    $icon = 'Path to your icon goes here';
    return $icon . $title;
    

    Tutorials for StudioPress Themes.

    November 13, 2016 at 8:06 am #196100
    sigul
    Member

    hey Brad, thanks for helping, again. which filter are you thinking to use? this one: genesis_post_title_text or genesis_post_title_output?

    something like that?

    add_filter( 'genesis_post_title_text', 'custom_post_title' );
    function custom_post_title() {
    $icon = 'Path to your icon goes here';
    return $icon . $title;
    }

    November 13, 2016 at 10:00 am #196104
    Brad Dalton
    Participant

    That's the right one. You could also use dashicons


    Tutorials for StudioPress Themes.

    November 13, 2016 at 4:01 pm #196113
    sigul
    Member

    actually the function should check if the post of which it's getting the title has a $passthrough_url and if yes add a space and arrow (➝) to the $title.

    if ($passthrough_url of the post of what you are getting the title ) {
    $title = ''.$title.' ➝';
    }

    but I am not sure of what code should be used to check that. do you know which?

    November 13, 2016 at 10:24 pm #196118
    Brad Dalton
    Participant

    I spent some time writing and testing this code which does what you want.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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