How to use fully customised HTML Structure
-
i am using post_html, but in the Frontend, the output is coming in a Json form. My custom HTML also contains SVG and many other elements that showing unstructured HTML design. Is this possible to get the post id or URL of top 4 trending posts within last 30 days by views?
my footer.php HTML structure is:
<!-- Maximum 4 posts in Trending post widget, note that only first post contains Image, other 3 doesn't contain image -->
<div class='widget PopularPosts' data-version='2' id='PopularPosts00'>
<h2 class='title dt noTOC'>Trending</h2>
<div class='itemPp' role='feed'>
<article class='itm mostP'>
<div class='iThmb pThmb'>
<a class='thmb' href="get the url">
<img alt='Post title as Image alt' class='imgThm lazy' src='get the large size image URL' />
</a>
<div class='iFxd'>
<a aria-label='Comments' class='cmnt' data-text='get the comments number' role='button'>
<svg class='line' viewBox='0 0 24 24'><g transform='translate(2.000000, 2.000000)'><path d='M17.0710351,17.0698449 C14.0159481,20.1263505 9.48959549,20.7867004 5.78630747,19.074012 C5.23960769,18.8538953 1.70113357,19.8338667 0.933341969,19.0669763 C0.165550368,18.2990808 1.14639409,14.7601278 0.926307229,14.213354 C-0.787154393,10.5105699 -0.125888852,5.98259958 2.93020311,2.9270991 C6.83146881,-0.9756997 13.1697694,-0.9756997 17.0710351,2.9270991 C20.9803405,6.8359285 20.9723008,13.1680512 17.0710351,17.0698449 Z'></path></g></svg>
</a>
</div>
</div>
<div class='iInf pSml'>
<time class='aTtmp iTtmp pbl' data-text='Jun 11' datetime='2021-06-11T13:20:00+05:30' title='Published or Updated if modified: June 11, 2021'></time>
<div class='pLbls' data-text='in'>
<!-- Show the main category -->
<a aria-label='GFX' data-text='GFX' rel='category'>
</a>
<!-- Show the first tag if available -->
<a aria-label='Review' data-text='Review' rel='tag'>
</a>
</div>
</div>
<div class='iCtnt'>
<div class='iInr'>
<h3 class='iTtl aTtl'><a >15 Best Free Transitions for Alight Motion | Free Download Preset Pack</a></h3>
<div class='pSnpt'>
Love Alight Motion Transitions? here we have 15 Professional Transition…
</div>
</div>
</div>
</article>
<article class='itm'>
<div class='iInf pSml'>
<time class='aTtmp iTtmp pbl' data-text='Mar 1' datetime='2022-03-01T19:07:00+05:30' title='Published: March 1, 2022'></time>
<div class='pLbls' data-text='in'>
<a aria-label='Blogger' data-text='Blogger' rel='category'>
</a>
<a aria-label='Widget' data-text='Widget' rel='tag'>
</a>
</div>
</div>
<div class='iCtnt'>
<div class='iInr'>
<h3 class='iTtl aTtl'><a >How to Add Bookmark Widget on Blogger</a></h3>
</div>
</div>
</article>
<article class='itm'>
<div class='iInf pSml'>
<time class='aTtmp iTtmp pbl' data-text='Feb 28' datetime='2021-02-28T12:31:00+05:30' title='Published: February 28, 2021'></time>
<div class='pLbls' data-text='in'>
<a aria-label='GFX' data-text='GFX' rel='category'>
</a>
<a aria-label='Review' data-text='Review' rel='tag'>
</a>
</div>
</div>
<div class='iCtnt'>
<div class='iInr'>
<h3 class='iTtl aTtl'><a >YouTube Channel Art Banner | Pixellab Free PLP Template</a></h3>
</div>
</div>
</article>
<article class='itm'>
<div class='iInf pSml'>
<time class='aTtmp iTtmp pbl' data-text='Oct 5' datetime='2022-10-05T06:59:00+05:30' title='Published: October 5, 2022'></time>
<div class='pLbls' data-text='in'>
<a aria-label='Blogger' data-text='Blogger' rel='category'>
</a>
<a aria-label='Tutorial' data-text='Tutorial' rel='tag'>
</a>
</div>
</div>
<div class='iCtnt'>
<div class='iInr'>
<h3 class='iTtl aTtl'><a >How to Create Auto Safelink Post in Plus UI | Safelink Script for Plus UI</a></h3>
</div>
</div>
</article>
</div>
</div>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.