Support

Home Forums Event Espresso Premium Nofollow for Event Espresso Shortcode

Nofollow for Event Espresso Shortcode

Posted: July 5, 2019 at 7:51 pm

Viewing 3 reply threads


Richard Duncan

July 5, 2019 at 7:51 pm

Hello,

We are in need of a code snippet that we can use to nofollow this shortcode.

Preferably a snippet that would allow us to specify a specific page id that it would not be followed on, so it can be followed on other pages.

[EVENT_CUSTOM_VIEW template_name=”vector-maps” order_by=”start_date” show_expired=”false”]

Google and Yoast appear to render and follow the shortcode output and that is problematic in some use cases.

Can you assist?


Tony

  • Support Staff

July 8, 2019 at 10:33 am

Hi there,

I’m not sure I follow what you are trying to do.

Are you trying to set a specific section (the shortcode output) to be nofollow? If so as far as I am aware you can’t.

Can you post an example of the problem so we can take a look?


Richard Duncan

July 8, 2019 at 1:45 pm

Hi Tony,

What we are seeking to accomplish is:

If we place the shortcode on multiple pages that each have different keyword focus and different SEO objectives, how can we prevent Crawlers and Google from following the shortcode and rendering the content which then makes it look like we have duplicate content on each of the pages where the shortcode is placed.

I was hoping that since links on a page can be nofollowed and noindexed, that perhaps there was a code snippet that could effectively do the same thing for a shortcode on a page – without having to noindex the entire page – just the rendered shortcode content.

Then on other pages without the restriction, the shortcode content would render for Google and crawlers as usual.

Perhaps a filter to prevent bots and Google from rendering the shortcode output on a specific page ID???

Or am I needlessly worrying about the shortcode rendered content on multiple pages appearing as duplicate content?

I look forward to your reply.
Thanks.


Josh

  • Support Staff

July 8, 2019 at 6:29 pm

Hi,

I think you’re needlessly worrying about the links within the shortcode rendered content, because information from Google says otherwise. This information from Google includes 3 reasons why you might consider adding nofollow to your links:

https://support.google.com/webmasters/answer/96569?hl=en

You’ll note that the links to event pages included in shortcode output do not fall into the categories of “untrusted content”, “paid links”, or “sign in” links.

If you want to add nofollow to the links anyway, you can make a copy of the Vector maps plugin’s index.php file, put the copy into /wp-content/uploads/espresso/templates/vector-maps/, then rename to be template.php.

Then in the copy, change line 116 from:

$live_button = '<a id="a_register_link-'.$event->id.'" href="'.$registration_url.'"><img class="buytix_button" src="'.WP_PLUGIN_URL. '/'.plugin_basename(dirname(__FILE__)).'/register-now.png" alt="Buy Tickets"></a>';

to:

$live_button = '<a rel="nofollow" id="a_register_link-'.$event->id.'" href="'.$registration_url.'"><img class="buytix_button" src="'.WP_PLUGIN_URL. '/'.plugin_basename(dirname(__FILE__)).'/register-now.png" alt="Buy Tickets"></a>';

Viewing 3 reply threads

The support post ‘Nofollow for Event Espresso Shortcode’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso