Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    I just downloaded the theme…
    Are you copying the code from content.php?

    Thread Starter dru1313

    (@dru1313)

    I tried copying the code from content.php into the repeater template and I placed the call to the shortcode right before the footer in Index.php . The call seems to be working as expected and I get the refreshing “older posts” button, but the code I pasted in from content.php does not load the thumbnails in the theme’s masonry format, it just loads a single post.

    Thread Starter dru1313

    (@dru1313)

    I am close to having it working. I combined code from the index.php and content.php files. The problem I am having now is that the thumbnail posts are displaying in one straight column and not spreading out into the responsive grid (depending on the size of the screen it can span from one to three columns). The other thing I need to figure out is how to start pulling in posts after the 9th post. Right now with the code below it displays it from the first post which is repeating what was already displayed prior to the load more plugin triggering.

    This is the code I have right now in the repeater template:

    <?php
    
    /**
     * @package Oblique
     */
    ?>
    
    			<?php /* Start the Loop */ ?>
    
    <div id="ob-grid" class="grid-layout">
    
                <?php while ( have_posts() ) : the_post(); ?>
    
    				<?php
    					/* Include the Post-Format-specific template for the content.
    					 * If you want to override this in a child theme, then include a file
    					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    					 */
    					get_template_part( 'content', get_post_format() );
    				?>
    
    			<?php endwhile; ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<div class="svg-container post-svg svg-block">
    		<?php echo oblique_svg_3(); ?>
    	</div>	
    
    	<?php if ( has_post_thumbnail() && ( get_theme_mod( 'index_feat_image' ) != 1 ) ) : ?>
    		<div class="entry-thumb">
    			<?php the_post_thumbnail('oblique-entry-thumb'); ?>
    			<a>" title="<?php the_title(); ?>" ><i class="fa fa-link"></i></a>
    		</div>
    	<?php endif; ?>	
    
    	<?php if ( has_post_thumbnail() && ( get_theme_mod( 'index_feat_image' ) != 1 ) ) : ?>
    	<div class="post-inner">
    	<?php else : ?>
    	<div class="post-inner no-thumb">
    	<?php endif; ?>
    		<header class="entry-header">
    			<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
    
    			<?php if ( 'post' == get_post_type() && !get_theme_mod('meta_index') ) : ?>
    			<div class="entry-meta">
    				<?php oblique_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    		</header><!-- .entry-header -->
    
    		<div class="entry-content">
    			<?php the_excerpt(); ?>
    
    			<?php
    				wp_link_pages( array(
    					'before' => '<div class="page-links">' . __( 'Pages:', 'oblique' ),
    					'after'  => '</div>',
    				) );
    			?>
    		</div><!-- .entry-content -->
    	</div>
    	<?php if (!get_theme_mod('read_more')) : ?>
    	<div class="read-more">
    		<a>"><?php echo __('Continue reading …','oblique'); ?></a>
    	</div>
    	<?php endif; ?>
    	<div class="svg-container post-bottom-svg svg-block">
    		<?php echo oblique_svg_1(); ?>
        </div>	</div>
    </article><!-- #post-## -->
    Thread Starter dru1313

    (@dru1313)

    I am even closer now. I didn’t realize there was an offset option! That resolves the issue I was having of when posts should start loading. Now the only issue is how do I get the posts to spread out in the responsive layout?

    It looks great on my smart phone but on the larger computer screens it stays all in one column.

    Plugin Author Darren Cooney

    (@dcooney)

    Hi Dru,
    Sorry I haven’t had time to help you out on this…
    Do you have a link you could share?

    Thread Starter dru1313

    (@dru1313)

    No problem. Thanks for replying!
    I am even closer now. I found you had answered someone else a while ago about creating columns using bootstrap. I created the div with the .col-md-4. It worked! The problem is that my theme is masonry and the height difference in the thumbnails throws the whole layout off vertically when the load more populates. What I need is to apply the masonry layout for the three columns in the repeater template and I see no easy way of doing that. Everything I find talks about creating themes from scratch or creating css files. The thing is, the theme I am using has everything already because it’s a masonry theme. I just can’t figure out how to call it into a div in the repeater template.

    The site I am working on is password protected. I will try to get you a link to a test site tomorrow.

    Thanks again!! Love your plugin! You thought of everything.

    Thread Starter dru1313

    (@dru1313)

    Hi dcooney,

    I can’t figure out how to add the masonry layout. I found that you had explained how to in another post to someone else but honestly I am not great when it comes to JavaScript and I just can’t figure it out.
    In the post I found, you had said to use the reload function and provided the code to enter into a .js file.
    I tried creating a new file to enter in the code and then I tried entering it into the masonry-int.js file. Nothing worked.

    From what I can tell “grid-layout” is the call to the masonry layout in the oblique theme but when I try to use it in the repeater template it doesn’t do anything.

    This is the post I am referring to:
    https://connekthq.com/plugins/ajax-load-more/examples/masonry/#javascript

    Thread Starter dru1313

    (@dru1313)

    It’s been a while and I still have not figured this out. Any chance I could get some help?
    You had said you downloaded the theme just checking if you figured something out?

    Plugin Author Darren Cooney

    (@dcooney)

    Can you share a link? I need to see what is happening with your theme.

    If you don’t want to post the link you can use the contact form on the ajax load more website.
    Let me know!

    Thread Starter dru1313

    (@dru1313)

    I used the form to send you a link. Thanks!!

    Thread Starter dru1313

    (@dru1313)

    If anyone ever figures this out for the Oblique theme I would still love to get it working and would be grateful.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Oblique theme repeater template’ is closed to new replies.