Sponsors widget link directly to sponsor

Support Area Forums Grassroots Sponsors widget link directly to sponsor

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question: http://108.167.189.17/~beaconam/
  • Author
    Posts
  • #27628
    Karlson Rapp
    Participant

    Hi Bill,
    Thanks for the great theme!
    Is it possible to set up the sponsors images to directly link to the sponsors website instead of the internal sponsors page?
    Thanks Karlson

    #27632
    Bill Robbins
    Moderator

    Hello Karlson,

    I’m glad you’re liking the theme. Excellent question too. There is a very good plugin called WordPress SEO by Yoast (https://wordpress.org/plugins/wordpress-seo/) that handles page titles, descriptions and other bits for search engines.

    One additional feature of the plugin is the ability to forward WordPress content to a new URL. You can use that to direct your visitors directly to the sponsor’s website when the click the image.

    After you install and activate the plugin when you edit a sponsor, you’ll see a new box below the main content box for the SEO settings. Click on the Advanced tab there and you’ll find the field for the redirect URL. Just enter your sponsor’s URL in that field and that will do it.

    If you have any questions or trouble, let me know.

    Have a great day,
    Bill

    #27638
    Karlson Rapp
    Participant

    Hi Bill,
    That did the trick Thanks! Just a shot in the dark with one more question. Is it possible to get 301 redirects to open in a new window/tab. I know it defeats the purpose of the SEO benefits. I looked through Google with now luck.
    Thanks again for your help!

    #27644
    Bill Robbins
    Moderator

    Excellent question again. I don’t believe there is a built in way to do that with the plugin, but you can edit the theme to make that possible. Here’s how to make the change:

    1. Go to the Appearance section in your WordPress dashboard and choose Edit.
    2. From the list of files on your right, choose sponsor-group-item.php
    3. Find this line:
      
      <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'sponsor-medium' ); ?></a>
      

      and change it to be like this:

      
      <a target="_blank" href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'sponsor-medium' ); ?></a>
      
    4. Save your changes.

    That should cause the link, with or without the redirection, to open in a new tab/window. You can make the change in a child theme too. Just copy the sponsor-group-item.php file to a folder in your child theme called layouts if you’re using a child theme.

    Let me know if you run into any trouble,
    Bill

    #27655
    Karlson Rapp
    Participant

    Hi Bill,
    Great suggestion! For your suggestion to edit the sponsor-group-item.php file, would you recommend editing it in a child theme to make sure it does not get over written in an update?

    I also found this plug installed in another site I am working on and it does the trick. https://wordpress.org/plugins/page-links-to/

    #27658
    Bill Robbins
    Moderator

    Hey Karlson,

    Thanks for the tip on that plugin. That’s a good one to know about.

    Adding that change via a child theme would be a good way to do it so you don’t have to worry about updates.

    Thanks again,
    Bill

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Sponsors widget link directly to sponsor’ is closed to new replies.