Post template breaks after render
-
Hi,
I’m using Tag Groups Pro. I want to set up custom template for posts list. My code in Tag Groups settings for post template looks like this:<div class="home-news-box-container"> <a href="{permalink}"> <div class="home-news-box"> <div class="news-box-img" style="background-image: url('{image_src|400x400}')"> <div class="background-opacity"></div> </div> <div class="news-box-content"> <span class="tag">{post_category}</span> <div class="author"> <div class="author-image"></div> <span>{post_author}</span> </div> <h2>{post_title}</h2> <p>{post_excerpt}</p> </div> <div class="date-comments"><span>{post_date}</span></div> </div> </a> </div>
But when the site renders it returns this structure wrongly:
<div class="home-news-box-container"> <a > </a><div class="home-news-box"><a > <div class="news-box-img" style="background-image: url('https://my-site.com/wp-content/uploads/test-image.jpg')"> <div class="background-opacity"></div> </div> </a><div class="news-box-content"><a > <span class="tag"></span></a><a >Test category</a> <div class="author"> <div class="author-image"></div> <span>Author name</span> </div> <h2>Test post</h2> <p>This is test post with test excerpt [...]</p> </div> <div class="date-comments"><span>18 september 2023</span></div> </div> </div>
The <a> tag gets closed in the same line where it starts and closing tag that should be on the second-last line disappears. Also, random <a> tag with permalink gets added in the middle of the template where it should not exist. What is the cause of this behaviour and how can I fix it?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Post template breaks after render’ is closed to new replies.