Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #909595
    zendog22
    Participant

    Hi, I’d like my hyperlinks to show in the blog excerpts as well as on the individual blog pages. Please can you tell me the code for this?
    The word FMJ in the screenshot would ideally be a hyperlink as it is in the individual post.
    Many thanks in advance!
    http://kentishandco.staging.wpengine.com/blog/

    #910128
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! To add hyperlink in individual posts, paste the following code in your child theme’s functions.php file

    
    function hyperlink_for_individual_post( $content ) {
      if ( is_singular('post') ) {
        echo 'Read the announcement in <a href="http://fmj.com/">FMJ</a>';
      }
    }
    
    add_action('x_before_the_content_end', 'hyperlink_for_individual_post');

    Let us know how this goes!

    #910439
    zendog22
    Participant

    Hi, thanks for writing but I need a solution that applies to all blog excerpts on the blog page. I can’t keep adding new code for each hyperlink that needs to show. Is there a code that i can add that ensures that all hyperlinks in all blog excerpts appear.
    So it’s the excerpts rather than individual posts that I need to show the hyperlink. Hyperlinks are currently showing fine in all individual posts.
    Hope that makes sense?
    many thanks

    #910729
    Christian
    Moderator

    I see. Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!

  • <script> jQuery(function($){ $("#no-reply-909595 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>