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 compatibility problem #66

Open
julianrob77 opened this issue Apr 14, 2018 · 1 comment
Open

wordpress compatibility problem #66

julianrob77 opened this issue Apr 14, 2018 · 1 comment

Comments

@julianrob77
Copy link

hi,

it seems the grid is not working with wordpress. the list items stack

I have enqueued the styles and js as per your demo, so I am unclear why this is happening. it is NOT due to theme CSS. i have tried this with basic theme and without theme styles.

http://landmarkdraft.dreamhosters.com/grid-test/

can you assist me in this please?

thanks

J

@julianrob77
Copy link
Author

Hi there,

Ive got this fully integrated into wordpress loop now. You may be curious as to how this is done.

the loop (for post type staff in this case):


<div class="container">
            <ul class="gridder">
<?php $args = array( 'post_type' => 'staff', 'orderby' => 'menu_order', 'order' => 'ASC');
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post(); ?>
       <li class="gridder-list" data-griddercontent="#gridder-content-1"><div class="img-fluid" id="loop"><?php the_post_thumbnail(); ?></div></li>
<div id="gridder-content-1" class="gridder-content">
                <div class="row">
                    <div class="col-sm-6">
                        <?php the_post_thumbnail( 'full', array( 'class' => 'img-responsive' ) ); ?>
                    </div>
                    <div class="col-sm-6">
                        <h3><?php the_title() ?></h3>
                         <p><?php the_content() ?></p>
                    </div>
                </div>
            </div>
<?php endwhile; ?>
</ul>
</div>

I had to change the content jQuery so that it properly reads the correct div. as it stands it does not

// Load #ID Content thecontent = $("li.selectedItem").nextAll( "#gridder-content-1" ).html(); processContent(myself, thecontent);

to be honest I would think you can make this a wordpress plugin and make a bit of money mate.

thought i would share my progress with you. you will be credited on the site.

thanks

J

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

No branches or pull requests

1 participant