Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hretter

    (@hretter)

    Son of a gun. I modified shortcodes with this:

    elseif ($style=="qlist") :
    			echo '<div class="faq-questions">';
    			echo '<ul>';
    			while ($flfaq->have_posts()) : $flfaq->the_post();
                               $faqid = $post->ID;
    			?>
    				<li class="faq-block-item">
    				   <a href="#<?php echo $faqid; ?>"><div class="faq-block-question"><?php the_title(); ?></div></a>
    				</li>
    			<?php
    			endwhile;
    			echo '</ul>';
    			echo '</div>';

    and I now have a [faq style=qlist] that creates a list of links to the faqs.

    Thread Starter hretter

    (@hretter)

    I would like to suggest a short_code that generates a list of questions:

    <ul>
      <li class="faq-block-item" id="xxx">
      <div class="faq-block-question">Does xxx do yyy?</div>
    
      ...
    </ul>

    I could place this short_code in a sidebar. Thanks.

    Thread Starter hretter

    (@hretter)

    I ended up modifying shortcodes.php to include the id when displaying as style=”block”:

    while ($flfaq->have_posts()) : $flfaq->the_post();
       $faqid = $post->ID;
    ?>
      <li class="faq-block-item">
      <div class="faq-block-question" id="<?php echo $faqid; ?>"><?php the_title(); ?></div>

    Is there a better way to do this? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)