<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>divi Archives - Maria Papandreou | Web Designer &amp; Front-end Developer</title>
	<atom:link href="https://mariapapandreou.com/tag/divi/feed/" rel="self" type="application/rss+xml" />
	<link>https://mariapapandreou.com/tag/divi/</link>
	<description>Web design, Wordpress customization, Virtual assisting</description>
	<lastBuildDate>Fri, 21 Feb 2025 12:48:01 +0000</lastBuildDate>
	<language>el</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Using ACF Fields in Divi When Shortcodes Don’t Work</title>
		<link>https://mariapapandreou.com/using-acf-fields-in-divi-when-shortcodes-dont-work/</link>
		
		<dc:creator><![CDATA[marpand]]></dc:creator>
		<pubDate>Fri, 21 Feb 2025 12:42:35 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[divi]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://mariapapandreou.com/?p=72041</guid>

					<description><![CDATA[<p>If you’ve tried adding an ACF (Advanced Custom Fields) shortcode inside a Divi Text Module or Code Module, you may have noticed that it doesn’t always work. This is because Divi doesn’t natively execute ACF shortcodes the way it does with standard WordPress shortcodes. Worry not! There’s an easy solution around that! Instead of relying [&#8230;]</p>
<p>The post <a href="https://mariapapandreou.com/using-acf-fields-in-divi-when-shortcodes-dont-work/">Using ACF Fields in Divi When Shortcodes Don’t Work</a> appeared first on <a href="https://mariapapandreou.com">Maria Papandreou | Web Designer &amp; Front-end Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you’ve tried adding an ACF (Advanced Custom Fields) shortcode inside a Divi Text Module or Code Module, you may have noticed that it doesn’t always work. This is because Divi doesn’t natively execute ACF shortcodes the way it does with standard WordPress shortcodes.</p>
<p><strong>Worry not! There’s an easy solution around that!</strong><br />
Instead of relying on Divi’s built-in functionality, we can create a custom shortcode that allows ACF fields to work inside Divi modules.</p>
<p>Let&#8217;s create a new shortcode called <strong>[acf_field]</strong>.</p>
<h3><strong>Add this PHP code to your child theme’s functions.php file:</strong></h3>
<pre><code>function get_acf_field_shortcode($atts) {
    $atts = shortcode_atts(array(
        'field' =&gt; '',
        'post_id' =&gt; get_the_ID()
    ), $atts);

    if (!empty($atts['field'])) {
        return get_field($atts['field'], $atts['post_id']);
    }

    return '';
}
add_shortcode('acf_field', 'get_acf_field_shortcode');
</code></pre>
<h3><strong>Use the Custom Shortcode in Divi</strong></h3>
<p>Now that your shortcode is ready, you can use it inside Divi modules to display the ACF field data you need. For example if your ACF name is price you can display it in a Divi Text Module using the following:</p>
<pre><code>The price is: [acf_field field="price"]€
</code></pre>
<p>Just replace &#8220;price&#8221; with the actual ACF field name you want to display and you&#8217;re done!</p>
<p>This happens because Divi doesn’t always execute ACF shortcodes, but it does execute shortcodes registered in functions.php!<br />
<strong>Try it out and let me know if you have any questions! </strong></p>
<p>The post <a href="https://mariapapandreou.com/using-acf-fields-in-divi-when-shortcodes-dont-work/">Using ACF Fields in Divi When Shortcodes Don’t Work</a> appeared first on <a href="https://mariapapandreou.com">Maria Papandreou | Web Designer &amp; Front-end Developer</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress TAGS Shortcode</title>
		<link>https://mariapapandreou.com/wordpress-tags-shortcode/</link>
					<comments>https://mariapapandreou.com/wordpress-tags-shortcode/#respond</comments>
		
		<dc:creator><![CDATA[marpand]]></dc:creator>
		<pubDate>Wed, 21 Feb 2018 10:57:00 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[divi]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://mariapapandreou.com/?p=2013</guid>

					<description><![CDATA[<p>The post <a href="https://mariapapandreou.com/wordpress-tags-shortcode/">WordPress TAGS Shortcode</a> appeared first on <a href="https://mariapapandreou.com">Maria Papandreou | Web Designer &amp; Front-end Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="et_pb_section et_pb_section_0 et_section_regular" >
				
				
				
				
				
				
				<div class="et_pb_row et_pb_row_0">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light">
				
				
				
				
				<div class="et_pb_text_inner">So I&#8217;ve been using <a href="https://www.elegantthemes.com/gallery/divi/">DIVI theme</a> (by <a href="https://www.elegantthemes.com/gallery/divi/"><em>Elegant Themes</em></a>) for quite a while and I needed to find a way to add the post&#8217;s tags inside the post&#8217;s body. Since Divi doesn&#8217;t have this module I had to make my own shortcode.

As we can see in the <a href="https://codex.wordpress.org/Function_Reference/get_the_tag_list">WordPress Codex</a> the function that returns the tag list we want is&nbsp;<a href="https://codex.wordpress.org/Function_Reference/get_the_tag_list">get_the_tag_list()</a>.
<h2>Usage</h2>
<strong>&lt;?php $tag_list = get_the_tag_list( $before, $sep, $after, $id ); ?&gt;</strong>

This function does not display anything &#8211; if you want to put it straight onto the page, you should use echo get_the_tag_list();.

Alternatively, you can assign it to a variable for further use by using $foo = get_the_tag_list();.

The variables are all optional. You can use HTML inside each of the fields.
<h2>Parameters</h2>
<strong>$before</strong>
(string) (optional) Leading text.
Default: &#8216; &#8216;

<strong>$sep</strong>
(string) (optional) String to separate tags.
Default: &#8216; &#8216;

<strong>$after</strong>
(string) (optional) Trailing text.
Default: &#8216; &#8216;

<strong>$id</strong>
(integer) (optional) Post ID.
Default: Current post ID
<h2>Create your own shortcode</h2>
Just add the following code in your theme&#8217;s functions.php file:
<blockquote>function wp_divi_tags() {

return get_the_tag_list(&#8216;&lt;p&gt;Tags: &#8216;,&#8217;, &#8216;,'&lt;/p&gt;&#8217;);
}
add_shortcode(&#8216;tags&#8217;, &#8216;wp_divi_tags&#8217;);</blockquote>
Then just use the SHORTCODE <img decoding="async" class="alignnone wp-image-2016 size-full" src="https://mariapapandreou.com/wp-content/uploads/2018/02/tags.png" alt="" width="58" height="14">&nbsp;anywhere you want.

&nbsp;</div>
			</div>
			</div>
				
				
				
				
			</div>
				
				
			</div>
<p>The post <a href="https://mariapapandreou.com/wordpress-tags-shortcode/">WordPress TAGS Shortcode</a> appeared first on <a href="https://mariapapandreou.com">Maria Papandreou | Web Designer &amp; Front-end Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mariapapandreou.com/wordpress-tags-shortcode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
