As I always post galleries into a special gallery category, I was thinking of some automation generating the gallery tag.
I want to automatically echo the tag:
[gallery columns="6" orderby="post_name"]
If the post is in the gallery category.
I managed to get it working in single.php and the in_category check. But the php echo shows the real plain text [gallery columns="6" orderby="post_name"] and wordpress doesn't interpreter it.
How can I get this working?