Results 1 to 3 of 3
  1. #1
    edgarf76's Avatar
    edgarf76 is offline Private Member
    Join Date
    March 2013
    Location
    Montreal
    Posts
    2,196
    Thanks
    804
    Thanked 582 Times in 429 Posts

    Default Table Of Contents Plugin That Works With ACF Pro

    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.

  2. #2
    Ninja16 is offline Public Member
    Join Date
    July 2018
    Posts
    70
    Blog Entries
    3
    Thanks
    38
    Thanked 15 Times in 12 Posts

    Default

    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.

  3. The Following User Says Thank You to Ninja16 For This Useful Post:

    edgarf76 (30 May 2023)

  4. #3
    edgarf76's Avatar
    edgarf76 is offline Private Member
    Join Date
    March 2013
    Location
    Montreal
    Posts
    2,196
    Thanks
    804
    Thanked 582 Times in 429 Posts

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •