I am trying to add a p tag to the footer if the page is the home page, I am using spicycp, which uses .twig files.
I have tried a number of php if statements, but alas, to no avail:
<p class="kktag">Digital Marketing by <a href="http://kingkong.com.au/" target="_blank">King Kong</a>
</p>
{% endif %}
</p>
and
$host = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if($host == 'https://lfsigns.com.au/')
{
<p class="kktag">Digital Marketing by <a href="http://kingkong.com.au/" target="_blank">King Kong</a>
</p>
}
else
{
<p class="kktag">Digital Marketing by King Kong</p>
}
and
{% if is_front %}
<p class="kktag">Digital Marketing by <a href="http://kingkong.com.au/" target="_blank">King Kong1</a> </p>
{% endif %}
and
{% if entry.id == 4 %}
<p class="kktag">Digital Marketing by <a href="http://kingkong.com.au/" target="_blank">King Kong</a>
</p>
{% endif %}
</p>
and
{% if template == 'index' %}
<p class="kktag">Digital Marketing by <a href="http://kingkong.com.au/" target="_blank">King Kong</a>
</p>
{% endif %}
and
{% if is_front_page %}
<p> do something </p>
{% else %}
<p> do something else. </p>
{% endif %}
But none of these seem to work, any ideas/suggestions/advice would very much appreciated,
Thanks everyone