Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordpress and Flowtime #70

Closed
leoniddesign opened this issue Dec 28, 2016 · 1 comment
Closed

Wordpress and Flowtime #70

leoniddesign opened this issue Dec 28, 2016 · 1 comment

Comments

@leoniddesign
Copy link

Hello Marcolago,

thanks for this great stuff!

I want to use it with wordpress an try to show differents of ids like this:
`<?php

    $args = array(
        'post_type' => 'flow',
        
    );
    $the_query = new WP_Query( $args );
?>

<div class="flowtime">

<?php $i=0; ?>
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

  <div class="ft-section" data-id="section-<?php echo $i; ?>">
		<div id="/section-<?php echo $i; ?>/page-<?php echo $i; ?>" class="ft-page" data-id="page-<?php echo $i; ?>" data-title="<?php the_title(); ?>">            
			<div class="container">
           <?php the_content(); ?>
			</div>
	   </div>
      </div>
  
<?php $i++; endwhile; else: ?>

    <p>Aktuell keine Einträge Vorführungen</p>

<?php endif; ?>
<?php wp_reset_postdata(); ?>

</div><!--end of Flowtime-->

`

But i get only one id nothing change, have you a solution for use this in wordpress?

many thanks

greetings
Leonid

@marcolago
Copy link
Owner

marcolago commented Dec 29, 2016

Hi.
Your code looks correct to me but I’m not a PHP expert.
I don’t know why you only get the same ID for every section and page but keep in mind that Flowtime works fine even if you do not manually specify the IDs because it automatically generates IDs for the missing ones.

Could you try to remove the ID printing and let me know if it works.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants