• Resolved databell96

    (@databell96)


    I’m trying to save my repeater template but every time I try to save it, it doesn’t save and instead I get the dreaded “Error Writing File” issue. Changed my permissions to 777 in my wp-content, plugins, AjaxLoadMore, core and repeater folders, but still no luck. Did I forget to do something? I even tried code that worked on another ALM site and it wouldn’t save either. Regardless, and not taking any chances, here’s the current code:

    <a href="<?php echo get_permalink( $ID ); ?>" title="<?php the_title( ); ?>">
    <?php if (has_post_thumbnail( $post->ID ) ): ?>
    <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
    <?php endif; ?>
    <div class="feature" style="background: url(<?php echo $image[0]; ?>) no-repeat top center!important; background-size: cover!important;">
    <div class="feature-bottom"><?php $current_cat_id = the_category_ID(false); echo '<h3>' . get_cat_name($current_cat_id) . '</h3>';  ?><h2><?php echo get_the_title( $post->ID ); ?> </h2></div>
    </div>
    </a>

    https://www.ads-software.com/plugins/ajax-load-more/

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

    (@dcooney)

    Hi databell96,
    I tested your template and I too had issues.

    I re-worked it a bit and this was able to save.

    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    	<?php if (has_post_thumbnail() ){
    			global $post;
    			$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
    		}
    	?>
    	<div class="feature" style="background: url(<?php echo $image[0]; ?>) no-repeat top center!important; background-size: cover!important;">
    		<div class="feature-bottom">
    			<?php $current_cat_id = the_category_ID(false); ?>
    			<h3><?php echo get_cat_name($current_cat_id); ?></h3>
    			<h2><?php the_title(); ?> </h2>
    		</div>
    	</div>
    </a>

    Let me know if this works!

    Cheers,

    Thread Starter databell96

    (@databell96)

    No! Still getting the Error Writing File message. So it’s not saving for me.

    Plugin Author Darren Cooney

    (@dcooney)

    That sucks. I tested it on 3 different in sites on different servers.

    Plugin Author Darren Cooney

    (@dcooney)

    Maybe you could try the Local Template alternative.
    https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template

    Loads from your theme directory.

    Thread Starter databell96

    (@databell96)

    That’s a good idea. Unfortunately, I don’t have control over this server (it’s RackSpace, which I’m not a fan of) so someone else needs to change the permissions and I don’t think he has yet. I’ll try your other method shortly and report back.

    Thread Starter databell96

    (@databell96)

    Yay! It worked! Problem solved. Thank you!

    Plugin Author Darren Cooney

    (@dcooney)

    Sweet!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error Writing File: My code won't save even after changing permissions’ is closed to new replies.