rpielanen
Forum Replies Created
-
<?php get_header(); ?> <?php $gallImages = get_post_meta($post->ID, 'gallImg', true); $video = get_post_meta($post->ID, 'videoEmbed', true); $featured_image = get_post_meta(get_the_ID(), 'reedwan_featured_image', true); $comment_type = get_post_meta(get_the_ID(), 'reedwan_comments_type', true); $show_review = get_post_meta(get_the_ID(), 'reedwan_show_review', true); $user_rating = get_post_meta(get_the_ID(), 'reedwan_user_rating', true); $date_info = get_option('reedwan_date_info', 'true'); $author_info = get_option('reedwan_author_info', 'true'); $post_share = get_option('reedwan_post_share', 'true'); $category_info = get_option('reedwan_category_info', 'true'); $tag_info = get_option('reedwan_tag_info', 'true'); $share_button = get_option('reedwan_share_button', 'true'); $author_box = get_option('reedwan_author_box', 'true'); $related_posts = get_option('reedwan_related_posts', 'true'); $navigation = get_option('reedwan_navigation', 'true'); $sidebar_position = get_option('reedwan_sidebar_position', 'true'); ?> <?php if($sidebar_position=='left'): ?> <!-- Left Sidebar --> <div class="grid_4 sidebar"> <?php get_sidebar();?> </div> <?php endif; ?> <div class="grid_8 single-post"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php setPostViews(get_the_ID()); ?> <?php if(has_post_format('video')): ?> <?php $embedVideo = htmlspecialchars_decode($video); ?> <?php if($embedVideo!=''): ?> <!-- Video --> <div class="featured-video embed-container"> <?php echo stripslashes( $embedVideo ); ?> </div> <?php endif; ?> <?php elseif(has_post_format('gallery') ): ?> <!-- Gallery --> <div id="gallery" class="royalSlider rsDefault fwImage"> <?php if (count($gallImages) > 0): ?> <?php foreach((array)$gallImages as $gallImg ):?> <a class="rsImg" data-rsBigImg="<?php echo $gallImg;?>" href="<?php echo $gallImg;?>"><img class="rsTmb" src="<?php echo $gallImg; ?>"/></a> <?php endforeach; endif; ?> </div> <?php else: ?> <?php if($featured_image=='Yes'): ?> <?php if (has_post_thumbnail()): ?> <?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');?> <!-- Featured Image --> <div class="featured-image-post"> <a class="standard-format-icon" href="<?php echo $large_image_url[0];?>" rel="prettyPhoto"> <?php the_post_thumbnail('small-slider', array('class' => 'overlay')); ?> </a> </div> <?php endif; ?> <?php endif; ?> <?php endif; ?> <!-- Single Title --> <div class="single-title"> <h1><?php the_title(); ?></h1> <?php if($date_info == 'true' || $author_info == 'true' || $category_info == 'true'): ?> <div class="clear"></div> <div class="single-info"> <?php if($date_info == 'true'): ?><span class="single-date"><strong><?php _e('Published On ', 'unicorn'); ?></strong><?php the_date(); ?> | </span><?php endif; ?> <?php if($author_info == 'true'): ?><span class="single-author"><?php _e('By ', 'unicorn'); ?><?php the_author(); ?> | </span> <?php endif; ?> <?php if($category_info == 'true'): ?><span class="single-category"><strong><em><?php the_category(', ') ?></em></strong></span><?php endif; ?> </div> <?php endif; ?> </div> <div class="clear"></div> <!-- Single Content --> <div class="single-content"> <?php if($show_review == 'Yes'): get_template_part('includes/reviews'); endif;?> <?php the_content(); ?> <?php if($tag_info == 'true'):?> <p class="single-tags"><?php the_tags('', '', ''); ?></p> <?php endif; ?> </div> <?php if($post_share == 'true'): get_template_part('includes/share'); endif;?> <?php if($author_box == 'true'):?> <!-- Author Information --> <div class="box-author"> <h3 class="widget-line"><span class="widget-title box-title"><?php _e('About The Author', 'unicorn'); ?></span></h3> <div class="author-description"> <div class="author-base"> <div class="author-pic"><a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '109', '' ); ?></a></div> <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')|| get_the_author_meta('google_plus') || get_the_author_meta('flickr')): ?> <div class="author-social"> <?php if(get_the_author_meta('twitter')): ?> <a target="new" class="author-twitter" href="https://twitter.com/<?php echo get_the_author_meta('twitter'); ?>"></a> <?php endif; ?> <?php if(get_the_author_meta('facebook')): ?> <a target="new" class="author-facebook" href="https://facebook.com/<?php echo get_the_author_meta('facebook'); ?>"></a> <?php endif; ?> <?php if(get_the_author_meta('google_plus')): ?> <a target="new" class="author-google" href="https://plus.google.com/<?php echo get_the_author_meta('google_plus'); ?>"></a> <?php endif; ?> <?php if(get_the_author_meta('flickr')): ?> <a target="new" class="author-flickr" href="https://www.flickr.com/photos/<?php echo get_the_author_meta('flickr'); ?>"></a> <?php endif; ?> </div> <?php endif; ?> </div> <div class="description-author"> <span><?php the_author_posts_link(); ?></span> <span><?php the_author_meta("description"); ?></span> </div> </div> </div> <?php endif; ?> <?php if($related_posts == 'true'):?> <!-- Related Post --> <?php $tags = get_the_tags(); ?> <?php if($tags): ?> <?php $related = get_related_posts($post->ID, $tags); ?> <?php if($related->have_posts() && $related->found_posts >= 1): ?> <div class="related-wrapper"> <h3 class="widget-line"><span class="widget-title box-title"><?php _e('Related Post ', 'unicorn'); ?></span></h3> <div class="clear"></div> <div class="related-item-wrap"> <?php $counter = 1; ?> <?php while($related->have_posts()): $related->the_post(); if(has_post_format('video')) { $format_icon = 'class="video-format-icon"'; } else if (has_post_format('audio')) { $format_icon = 'class="audio-format-icon"'; } else if (has_post_format('gallery')) { $format_icon = 'class="gallery-format-icon"'; } else { $format_icon = 'class="standard-format-icon"'; } ?> <div class="related-post<?php if($counter == 4) {echo' four-margin';}?><?php if($counter == 2) {echo' two-margin';}?>"id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a <?php echo $format_icon; ?> href="<?php the_permalink();?>" title="<?php the_title();?>"> <?php if (has_post_thumbnail()) { the_post_thumbnail('related-post', array('class' => 'overlay')); } else { echo('<img src="'.get_template_directory_uri().'/images/thumbnails/no-image-related-post.png" class="overlay" alt="no image" />'); } ?> </a> <h5 class="related-post-title"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a><span></span></h5> </div> <?php $counter++; endwhile; ?> </div> </div> <?php endif; ?> <?php endif; ?> <?php wp_reset_query(); ?> <?php endif; ?> <?php if($navigation == 'true'):?> <!-- Navigation --> <div class="single-nav"> <div class="nav-left" ><?php previous_post_link('%link', __('← Previous post','unicorn')); ?> </div> <div class="nav-right" ><?php next_post_link('%link', __('Next post →','unicorn')); ?></div> </div> <?php endif; ?> <?php if($comment_type == 'Both'): ?> <?php // Get the current page url for FB comments $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?> <!-- FB Comments --> <div class="fb-comments" data-href="<?php echo $url; ?>" data-num-posts="4" data-width="628"></div> <!-- WP Comments --> <div class="single-comments"> <?php comments_template(); ?> </div> <?php elseif($comment_type == 'Facebook'): ?> <?php // Get the current page url for FB comments $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?> <!-- FB Comments --> <div class="fb-comments" data-href="<?php echo $url; ?>" data-num-posts="4" data-width="628"></div> <?php elseif($comment_type == 'WP'): ?> <!-- WP Comments --> <div class="single-comments"> <?php comments_template(); ?> </div> <?php elseif($comment_type == 'None'): ?> <?php else: ?> <!-- WP Comments --> <div class="single-comments"> <?php comments_template(); ?> </div> <?php endif; ?> <?php endwhile; endif; ?> </div> <?php if($sidebar_position=='right'): ?> <!-- Right Sidebar --> <div class="grid_4 sidebar"> <?php get_sidebar();?> </div> <?php endif; ?> <?php get_footer(); ?>
[Moderator Note: No bumping, thank you.]
Oh forgot to mention, the issue seem to be connected to a function which shows related posts to the one display on the single post page.
Here you can see the error (development site):
https://www.robertpielanen.nl/dha/straf-werk-podcast-007-by-prunk/Here you can see how it should be working (public site):
https://www.deephouseamsterdam.com/straf-werk-podcast-007-by-prunk/Thanks!
Forum: Plugins
In reply to: [BackUpWordPress] Leaving some files on serverHi, I’m having the same problem.
I use this plugin on a lot of sites, but I few days ago I noticed that everyone of the sites using this plugin were using lots of serverspace. I’m talking several gigs more than the site really is.
When I go to the directory on the server where the backups are stored, I find up to 20 backups of really big sizes. Note that there are more backups than I scheduled for on the WP back-end. And I always use just one schedule.
I find files like this:
mydomain.com-backup-complete-2013-06-16-23-00-35.zipWhich is corresponding to the list of backups I see in the WP back-end.
But also lots like these:
mydomain.com-default-1-database-2013-06-08-23-03-02.zip
mydomain.com-default-2-complete-2013-04-28-23-06-04.zipAgain, i’m having this problem on several websites, all using this back-up plugin.
Thanks in advance.
Robert