Whats up everybody, I am looking for a good table of contents plugin that works with advanced custom fields. Does anyone have a rec?
(Cross Post On AGD)
Whats up everybody, I am looking for a good table of contents plugin that works with advanced custom fields. Does anyone have a rec?
(Cross Post On AGD)
Visit Play Slots 4 Real Money and Casino Slots Money for trusted recommendations and tips on the best casinos.
Hi there,
I have written code for table of contents. You can adjust this according to your needs. You may see example of this TOC at the first site's any subpages in my signature.
-You need to create field "table_of_contents_linkleri" as repeater. And "Link" as subfield. This subfield type must be link.
You call this function page wherever you want TOC to be placed.
Code:<?php // Check rows exists. if( have_rows('table_of_contents_linkleri') ): ?> <span role="button" tabindex=0 id="icindekiler" [text]="visible ? 'İçerik Listesi -' : 'İçerik Listesi +'" on="tap:AMP.setState({visible: !visible})">İçerik Listesi +</span> <ul style="margin-left:-40px" [class]="visible ? 'show' : 'hide'" class="hide"> <?php // Loop through rows. while( have_rows('table_of_contents_linkleri') ) : the_row(); // Load sub field value. $test = get_sub_field('link');?> <li class="df1"><a class="df" href="<?php echo $test['url'];?>"><?php echo $test['title'];?></a></li> <?php endwhile; ?> </ul> <?php else : endif; ?>
Güvenilir Bahis Siteleri arasından Türkçe ve Yurtdışı merkezli en iyi bahis siteleri bonus ve promosyonları ile listelenmiştir.
edgarf76 (30 May 2023)
Thank You, I will give it a try.
Visit Play Slots 4 Real Money and Casino Slots Money for trusted recommendations and tips on the best casinos.