HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/ruwebsiteok/wp-content/themes/interactive-education/sidebar.php
<?php
/**
 * The primary widget space in the sidebar
 *
 * @package Interactive Education
 */
?>

<?php
if ( is_active_sidebar( 'sidebar-1' )) { ?>
	<div id="secondary" class="sidebar left-sidebar">
		<?php dynamic_sidebar( 'sidebar-1' ); ?>
	</div>
<?php } else { ?>
	<div id="search-2" class="widget widget_search">
		<div class="widget-title-wrap"><h2 class="widget-title"><?php esc_html_e('Search Here', 'interactive-education'); ?></h2></div>
		<?php get_search_form(); ?>
	</div>

	<div id="recent-posts-2" class="widget widget_recent_entries">
		<div class="widget-title-wrap"><h2 class="widget-title"><?php esc_html_e('Recent Posts', 'interactive-education'); ?></h2></div>
		<ul>
			<?php
				$interactive_education_recent_posts = wp_get_recent_posts(array(
					'numberposts' => 5,
					'post_status' => 'publish',
				));
	
				foreach ($interactive_education_recent_posts as $interactive_education_post) :
					?>
					<li>
						<a href="<?php echo get_permalink($interactive_education_post['ID']); ?>">
							<?php echo esc_html($interactive_education_post['post_title']); ?>
						</a>
					</li>
				<?php endforeach; 
			?>
		</ul>
	</div>

	<div id="recent-comments-2" class="widget widget_recent_comments">
		<div class="widget-title-wrap"><h2 class="widget-title"><?php esc_html_e('Recent Comments', 'interactive-education'); ?></h2></div>
		<ul>
			<?php
				$interactive_education_comments = get_comments(array(
					'number' => 5,
					'status' => 'approve',
				));

				foreach ($interactive_education_comments as $interactive_education_comment) {
					$post_title = get_the_title($interactive_education_comment->comment_post_ID);
					
					echo '<li class="recentcomments"><span class="comment-author-link"><a href="' . esc_url(get_comment_author_url($interactive_education_comment->comment_ID)) . '" class="url" rel="ugc external nofollow">' . esc_html($interactive_education_comment->comment_author) . '</a></span> on <a href="' . esc_url(get_comment_link($interactive_education_comment->comment_ID)) . '">' . esc_html($post_title) . '</a></li>';
				}
			?>
		</ul>
	</div>

	<div id="archives-3" class="widget widget_archive">
		<div class="widget-title-wrap"><h2 class="widget-title"><?php esc_html_e('Archives', 'interactive-education'); ?></h2></div>
		<ul>
			<?php
				wp_get_archives(array(
					'type' => 'monthly',
					'format' => 'html',
					'show_post_count' => true,
				));
			?>
		</ul>
	</div>

	<div id="categories-3" class="widget widget_categories">
		<div class="widget-title-wrap"><h2 class="widget-title"><?php esc_html_e('Categories', 'interactive-education'); ?></h2></div>
		<ul>
			<?php
				wp_list_categories(array(
					'title_li' => '',
					'show_count' => true,
				));
			?>
		</ul>
	</div>
<?php } ?>