<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>How to add nofollow links? [buttons and footer menu] &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/feed/</link>
		<description></description>
		<lastBuildDate>Fri, 17 Oct 2025 05:28:41 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/#post-177722</guid>
					<title><![CDATA[How to add nofollow links? [buttons and footer menu]]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/#post-177722</link>
					<pubDate>Tue, 06 Jan 2015 16:02:48 +0000</pubDate>
					<dc:creator>s1344678</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>I would like to make my footer menu nofollow. Same goes for some buttons. I have buttons linking to amazon. I would like to make those nofollow.</p>
<p>How can I do that?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/#post-177836</guid>
					<title><![CDATA[Reply To: How to add nofollow links? [buttons and footer menu]]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-add-nofollow-links-buttons-and-footer-menu/#post-177836</link>
					<pubDate>Tue, 06 Jan 2015 18:31:28 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>If you want to add nofollow attribute on <a href="http://theme.co/x/member/kb/shortcode-walkthrough-button/" rel="nofollow">[button]</a> shortcodes, it requires a template case. I&#8217;d advise that you setup a <a href="http://theme.co/x/member/kb/how-to-setup-child-themes/" title="Child Themes" target="_blank" rel="nofollow">child theme</a>. This allows you to make code changes that won&#8217;t be overwritten when an <strong>X</strong> update is released. After your child theme is setup, please review how we recommend making template changes in <a href="http://theme.co/x/member/kb/customization-best-practices/" rel="nofollow">Customization Best Practices</a>.</p>
<p>After that, add following code in your child theme&#8217;s <strong>functions.php</strong> file:</p>
<pre><code>// Buttons - Adding nofollow attribute
// =============================================================================

function x_shortcode_button2( $atts, $content = null ) {
  extract( shortcode_atts( array(
    &#039;id&#039;               =&gt; &#039;&#039;,
    &#039;class&#039;            =&gt; &#039;&#039;,
    &#039;style&#039;            =&gt; &#039;&#039;,
    &#039;type&#039;             =&gt; &#039;&#039;,
    &#039;shape&#039;            =&gt; &#039;&#039;,
    &#039;size&#039;             =&gt; &#039;&#039;,
    &#039;float&#039;            =&gt; &#039;&#039;,
    &#039;block&#039;            =&gt; &#039;&#039;,
    &#039;circle&#039;           =&gt; &#039;&#039;,
    &#039;icon_only&#039;        =&gt; &#039;&#039;,
    &#039;href&#039;             =&gt; &#039;&#039;,
    &#039;title&#039;            =&gt; &#039;&#039;,
    &#039;target&#039;           =&gt; &#039;&#039;,
    &#039;info&#039;             =&gt; &#039;&#039;,
    &#039;info_place&#039;       =&gt; &#039;&#039;,
    &#039;info_trigger&#039;     =&gt; &#039;&#039;,
    &#039;info_content&#039;     =&gt; &#039;&#039;,
    &#039;lightbox_thumb&#039;   =&gt; &#039;&#039;,
    &#039;lightbox_video&#039;   =&gt; &#039;&#039;,
    &#039;lightbox_caption&#039; =&gt; &#039;&#039;,
    &#039;no_follow&#039;         =&gt; &#039;&#039;
  ), $atts ) );

  $id    = ( $id    != &#039;&#039; ) ? &#039;id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;
  $class = ( $class != &#039;&#039; ) ? &#039; &#039; . esc_attr( $class ) : &#039;&#039;;
  $style = ( $style != &#039;&#039; ) ? &#039;style=&quot;&#039; . $style . &#039;&quot;&#039; : &#039;&#039;;
  $type  = ( $type  != &#039;&#039; ) ? &#039; x-btn-&#039; . $type : &#039;&#039;;
  $shape = ( $shape != &#039;&#039; ) ? &#039; x-btn-&#039; . $shape : &#039;&#039;;
  $size  = ( $size  != &#039;&#039; ) ? &#039; x-btn-&#039; . $size : &#039;&#039;;
  switch ( $float ) {
    case &#039;left&#039; :
      $float = &#039; alignleft&#039;;
      break;
    case &#039;right&#039; :
      $float = &#039; alignright&#039;;
      break;
    default :
      $float = &#039;&#039;;
  }
  $block            = ( $block            == &#039;true&#039;  ) ? &#039; x-btn-block&#039; : &#039;&#039;;
  $icon_only        = ( $icon_only        == &#039;true&#039;  ) ? &#039; x-btn-icon-only&#039; : &#039;&#039;;
  $href             = ( $href             != &#039;&#039;      ) ? $href : &#039;#&#039;;
  $title            = ( $title            != &#039;&#039;      ) ? &#039;title=&quot;&#039; . $title . &#039;&quot;&#039; : &#039;&#039;;
  $target           = ( $target           == &#039;blank&#039; ) ? &#039;target=&quot;_blank&quot;&#039; : &#039;&#039;;
  $info             = ( $info             != &#039;&#039;      ) ? &#039;data-toggle=&quot;&#039; . $info . &#039;&quot;&#039; : &#039;&#039;;
  $info_place       = ( $info_place       != &#039;&#039;      ) ? &#039;data-placement=&quot;&#039; . $info_place . &#039;&quot;&#039; : &#039;&#039;;
  $info_trigger     = ( $info_trigger     != &#039;&#039;      ) ? &#039;data-trigger=&quot;&#039; . $info_trigger . &#039;&quot;&#039; : &#039;&#039;;
  $info_content     = ( $info_content     != &#039;&#039;      ) ? &#039;data-content=&quot;&#039; . $info_content . &#039;&quot;&#039; : &#039;&#039;;
  $lightbox_thumb   = ( $lightbox_thumb   != &#039;&#039;      ) ? $lightbox_thumb : &#039;&#039;;
  $lightbox_video   = ( $lightbox_video   == &#039;true&#039;  ) ? &#039;, width: 1080, height: 608&#039; : &#039;&#039;;
  $lightbox_caption = ( $lightbox_caption != &#039;&#039;      ) ? &#039;data-caption=&quot;&#039; . $lightbox_caption . &#039;&quot;&#039; : &#039;&#039;;
  $no_follow         = ( $no_follow         == &#039;true&#039;  ) ? &#039;rel=&quot;nofollow&quot;&#039; : &#039;&#039;;

  if ( is_numeric( $lightbox_thumb ) ) {
    $lightbox_thumb_info = wp_get_attachment_image_src( $lightbox_thumb, &#039;full&#039; );
    $lightbox_thumb      = $lightbox_thumb_info[0];
  }

  if ( $lightbox_video != &#039;&#039; ) {
    $lightbox_options = &quot;data-options=\&quot;thumbnail: &#039;&quot; . $lightbox_thumb . &quot;&#039;{$lightbox_video}\&quot;&quot;;
  } else {
    $lightbox_options = &quot;data-options=\&quot;thumbnail: &#039;&quot; . $lightbox_thumb . &quot;&#039;\&quot;&quot;;
  }

  if ( $circle == &#039;true&#039; ) {
    $output = &quot;&lt;div {$id} class=\&quot;x-btn-circle-wrap{$size}{$block}{$float}\&quot; {$style}&gt;&lt;a class=\&quot;x-btn{$class}{$type}{$shape}{$size}{$block}{$icon_only}\&quot; href=\&quot;{$href}\&quot; {$no_follow} {$title} {$target} {$info} {$info_place} {$info_trigger} {$info_content} {$lightbox_caption} {$lightbox_options}&gt;&quot; . do_shortcode( $content ) . &quot;&lt;/a&gt;&lt;/div&gt;&quot;;
  } else {
    $output = &quot;&lt;a {$id} class=\&quot;x-btn{$class}{$type}{$shape}{$size}{$block}{$float}{$icon_only}\&quot; {$style} href=\&quot;{$href}\&quot; {$no_follow} {$title} {$target} {$info} {$info_place} {$info_trigger} {$info_content} {$lightbox_caption} {$lightbox_options}&gt;&quot; . do_shortcode( $content ) . &quot;&lt;/a&gt;&quot;;
  }

  return $output;
}

add_filter(&#039;init&#039;, function() {
   remove_shortcode( &#039;button&#039; );

   add_shortcode( &#039;button&#039;, &#039;x_shortcode_button2&#039; );
});
</code></pre>
<p>Now, simply add a attribute of <strong><code>no_follow="true"</code></strong> to your button shortcode when you want to add nofollow links. E.g:</p>
<p><code>[button shape="square" size="mini" no_follow="true"]Hello World![/button]</code></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

