<?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>Can I create a custom short code? &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/feed/</link>
		<description></description>
		<lastBuildDate>Sat, 18 Oct 2025 03:09:28 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-166778</guid>
					<title><![CDATA[Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-166778</link>
					<pubDate>Thu, 18 Dec 2014 02:45:20 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>And have it in the short code list along with the others?</p>
<p>something like this&#8230;</p>
<p>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Can this be a custom short code?</strong>&lt;/span&gt;</p>
<p>thanks</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-167011</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-167011</link>
					<pubDate>Thu, 18 Dec 2014 13:43:23 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Thanks for writing in!</p>
<p>Because this requires a template change, 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 you can add following code in your child theme&#8217;s <strong>functions.php</strong> file:</p>
<pre><code>// Custom Shortcode
// =============================================================================

function custom_shortcode() {
   $output =  &#039;&lt;span style=&quot;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&quot;&gt;Can this be a custom short code?&lt;/span&gt;&#039;;
   return $output;
}

add_filter(&#039;init&#039;, &#039;add_custom_shortcode&#039;);

function add_custom_shortcode() {
   add_shortcode(&#039;custom_shortcode_name&#039;, &#039;custom_shortcode&#039;);
}
</code></pre>
<p>Now you can replace <strong>custom_shortcode_name</strong> with your custom shortcode&#8217;s name and you can insert it in your website like this:</p>
<pre><code>[custom_shortcode_name]
</code></pre>
<p>Adding it to the shortcodes option, requires more in depth customization, that regretfully will fall beyond 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. </p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-168011</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-168011</link>
					<pubDate>Sat, 20 Dec 2014 05:26:37 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>That works great thanks and I have aText app so I only need to put a shortcut for the shortcode shortcut.</p>
<p>Now how do I put multiple shortcuts in the child themes functions.php file?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-168449</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-168449</link>
					<pubDate>Mon, 22 Dec 2014 00:32:44 +0000</pubDate>
					<dc:creator>Christian</dc:creator>

					<description>
						<![CDATA[
						<p>Hey there,</p>
<p>For more details on creating shortcodes, please see the links below.</p>
<p><a href="http://codex.wordpress.org/Shortcode_API" rel="nofollow">http://codex.wordpress.org/Shortcode_API</a><br />
<a href="https://code.tutsplus.com/tutorials/wordpress-shortcodes-the-right-way&#8211;wp-17165" rel="nofollow">https://code.tutsplus.com/tutorials/wordpress-shortcodes-the-right-way&#8211;wp-17165</a><br />
<a href="http://www.elegantthemes.com/blog/tips-tricks/how-to-create-shortcodes-in-wordpress" rel="nofollow">http://www.elegantthemes.com/blog/tips-tricks/how-to-create-shortcodes-in-wordpress</a><br />
<a href="http://www.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/" rel="nofollow">http://www.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/</a></p>
<p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169179</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169179</link>
					<pubDate>Mon, 22 Dec 2014 21:35:14 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks for the links, however after looking at them and after attempting to understand, this is far from my understanding.<br />
Is it possible to just show two short codes combined. Thanks</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169221</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169221</link>
					<pubDate>Mon, 22 Dec 2014 22:07:11 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>OK, I&#8217;ve been trying and this is what I came up with that seems to work, however I have some inconsistencies, for instance in the line: add_shortcode(&#8216;custom_shortcode_logo&#8217;, &#8216;custom_shortcode&#8217;);</p>
<p>which works, then on the second one there is:<br />
add_shortcode(&#8216;full_logo&#8217;, &#8216;full_logo&#8217;);</p>
<p>notice that the second ones name is repeated perfectly where the first one is different but does work.<br />
SO my guess is this is sloppy and shouldn&#8217;t be.<br />
So, can someone tell me the proper way to code this and or is there a shorter way to do multiple short codes using the below example: </p>
<p>// Custom Shortcode &#8211; I added<br />
// =============================================================================</p>
<p>function custom_shortcode() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>)</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_custom_shortcode&#8217;);</p>
<p>function add_custom_shortcode() {<br />
   add_shortcode(&#8216;custom_shortcode_logo&#8217;, &#8216;custom_shortcode&#8217;);<br />
}</p>
<p>function full_logo() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logo</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_full_logo&#8217;);</p>
<p>function add_full_logo() {<br />
   add_shortcode(&#8216;full_logo&#8217;, &#8216;full_logo&#8217;);<br />
}</p>
<p>function logo+() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logo+</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_logo+’);</p>
<p>function add_logo+() {<br />
   add_shortcode(&#8216;logo+’, &#8216;logo+’);<br />
}</p>
<p>Thank You</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169266</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169266</link>
					<pubDate>Mon, 22 Dec 2014 22:43:02 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>SORRY, Please disregard the previous example, here is the corrected one.<br />
*By the way if there is a way that I could have deleted the above post please let me know.</p>
<p>// Custom Shortcode &#8211; added<br />
// =============================================================================</p>
<p>function custom_shortcode() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logo</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_custom_shortcode&#8217;);</p>
<p>function add_custom_shortcode() {<br />
   add_shortcode(&#8216;custom_shortcode_logo&#8217;, &#8216;custom_shortcode&#8217;);<br />
}</p>
<p>function full_logo() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logo</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_full_logo&#8217;);</p>
<p>function add_full_logo() {<br />
   add_shortcode(&#8216;full_logo&#8217;, &#8216;full_logo&#8217;);<br />
}</p>
<p>function logo() {<br />
   $output =  &#8216;&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logo</strong>&lt;/span&gt;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_logo&#8217;);</p>
<p>function add_logo() {<br />
   add_shortcode(&#8216;logo&#8217;, &#8216;logo&#8217;);<br />
}</p>
<p>function logoplus() {<br />
   $output =  &#8216;<strong>Website Name</strong>&lt;span style=&#8221;color: #ff0000; line-height: 10px; vertical-align: middle; letter-spacing: -1px;&#8221;&gt;<strong>Logoplus</strong>&lt;/span&gt;&#8217;;<br />
   return $output;<br />
}</p>
<p>add_filter(&#8216;init&#8217;, &#8216;add_logoplus&#8217;);</p>
<p>function add_logoplus() {<br />
   add_shortcode(&#8216;logoplus&#8217;, &#8216;logoplus&#8217;);<br />
}</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169609</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-169609</link>
					<pubDate>Tue, 23 Dec 2014 08:09:18 +0000</pubDate>
					<dc:creator>Christian</dc:creator>

					<description>
						<![CDATA[
						<p>Glad you&#8217;ve sorted it out. 🙂</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-170420</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-170420</link>
					<pubDate>Wed, 24 Dec 2014 02:12:35 +0000</pubDate>
					<dc:creator>bearthedog</dc:creator>

					<description>
						<![CDATA[
						<p>As mentioned:<br />
&#8220;So, can someone tell me the proper way to code this and or is there a shorter way to do multiple short codes using the below example:&#8221; post# #169266 12/22/14 4:43pm<br />
Thanks </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-170532</guid>
					<title><![CDATA[Reply To: Can I create a custom short code?]]></title>
					<link>https://theme.co/archive/forums/topic/can-i-create-a-custom-short-code/#post-170532</link>
					<pubDate>Wed, 24 Dec 2014 06:02:27 +0000</pubDate>
					<dc:creator>Christian</dc:creator>

					<description>
						<![CDATA[
						<p>Hey there,</p>
<p>Sorry for the confusion. We&#8217;d love to help you with your concern however, your request falls beyond the scope of our support since creating shortcodes is not part of X. We can only give you an example.</p>
<p>You might want to contact our trusted partners who caters X setup and customization needs. Please see <a href="https://theme.co/x/member/custom-development/" rel="nofollow">https://theme.co/x/member/custom-development/</a>.</p>
<p>Thank you for understanding.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

