[ad_1]
I have this template code that stopped working because of PHP use:
<h3>Stories written:</h3>
[if stories_written]
<ul class="stories">
[each stories_written]
<li>
<?php $name_tr = str_replace('-', ' ', $obj->display('post_name'));
$name_tr = ucfirst($name_tr); ?>
<a href="https://projectdmc.org/support/topic/how-to-remove-dashes-from-post-name-without-php-use/{@permalink}"><?php echo $name_tr ?></a></li>
[/each]
</ul>
[else]
No stories found
[/if]
I have quickly changed it to:
<h3>Stories written:</h3>
[if stories_written]
<ul class="stories">
[each stories_written]
<li>
<a href="https://projectdmc.org/support/topic/how-to-remove-dashes-from-post-name-without-php-use/{@permalink}">{@post_name}</a>
</li>
[/each]</ul>
[else]
No stories found
[/if]
It works now, but I have dashes in post names. Is there a way to remove dashes without using PHP?
Thank you