HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/echelonwellness.com/wp-content/themes/pilcrow/sidebar.php
<?php
/**
 * The Sidebar containing the primary and secondary widget areas.
 *
 * @package WordPress
 * @subpackage Pilcrow
 * @since Pilcrow 1.0
 */
?>

	<?php
		/* If the current layout is no-sidebar, let's just get out of here.
		 * If the current layout is a 3-column one with 2 sidebars on the right or left
		 * Pilcrow enables a "Feature Widget Area" that should span both sidebar columns
		 * and adds a containing div around the main sidebars for the content-sidebar-sidebar
		 * and sidebar-sidebar-layouts so the layout holds together with a short content area and long featured widget area
		 */
		$options = pilcrow_get_theme_options();
		$current_layout = $options['theme_layout'];
		$feature_widget_area_layouts = array( 'content-sidebar-sidebar', 'sidebar-sidebar-content' );

		if ( 'no-sidebar' == $current_layout )
			return;

		if ( in_array( $current_layout, $feature_widget_area_layouts ) ) :
	?>
	<div id="main-sidebars">
	
		<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>

		<div id="feature" class="widget-area" role="complementary">
			<ul class="xoxo sidebar-list">
				<?php dynamic_sidebar( 'sidebar-3' ); ?>
			</ul>
		</div><!-- #feature.widget-area -->

		<?php endif; // ends the check for the current layout that determines the availability of the feature widget area ?>

		<?php endif; // ends the check for the current layout that determines the #main-sidebars markup ?>

		<div id="sidebar" class="widget-area" role="complementary">
	<?php do_action( 'before_sidebar' ); ?>
			<ul class="xoxo sidebar-list">

<?php
	/* When we call the dynamic_sidebar() function, it'll spit out
	 * the widgets for that widget area. If it instead returns false,
	 * then the sidebar simply doesn't exist, so we'll hard-code in
	 * some default sidebar stuff just in case.
	 */
	if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>

			<li class="widget widget_search">
				<h3 class="widget-title"><?php _e( 'Search', 'pilcrow' ); ?></h3>
				<?php get_search_form(); ?>
			</li>

			<?php
				$title = __( 'RSS', 'pilcrow' );
				$before_widget = '<li class="widget widget_rss_links">';
				$after_widget = '</li>';
				$before_title = '<h3 class="widget-title">';
				$after_title = '</h3>';
				the_widget( 'RSS_Links_Widget',
							"title=$title&display=posts&format=text-image&imagesize=medium&imagecolor=orange",
							"before_widget=$before_widget&after_widget=$after_widget&before_title=$before_title&after_title=$after_title" );
			?>

			<li class="widget widget_recent_entries">
				<h3 class="widget-title"><?php _e( 'Recent Entries', 'pilcrow' ); ?></h3>
				<ul>
					<?php
					$recent_entries = new WP_Query();
					$recent_entries->query( 'order=DESC&posts_per_page=10' );

					while ($recent_entries->have_posts()) : $recent_entries->the_post();
						?>
						<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
						<?php
					endwhile;
					?>
				</ul>
			</li>

			<li class="widget widget_links">
				<h3 class="widget-title"><?php _e( 'Links', 'pilcrow' ); ?></h3>
				<ul>
					<?php wp_list_bookmarks(); ?>
				</ul>
			</li>

		<?php endif; // end primary widget area ?>
			</ul>
		</div><!-- #sidebar .widget-area -->

		<?php
			/* If the current layout is a 3-column one, Pilcrow enables a second widget area called Secondary Widget Area
			 * This widget area will not appear for two-column layouts
			 */
			$secondary_widget_area_layouts = array( 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar' );
			if ( in_array( $current_layout, $secondary_widget_area_layouts ) ) :
		?>
		<div id="secondary-sidebar" class="widget-area" role="complementary">
			<ul class="xoxo sidebar-list">
			<?php // A second sidebar for widgets. Pilcrow uses the secondary widget area for three column layouts.
			if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>

				<li class="widget widget_meta">
					<h3 class="widget-title"><?php _e( 'Meta', 'pilcrow' ); ?></h3>
					<ul>
						<?php wp_register(); ?>
						<li><?php wp_loginout(); ?></li>
						<?php wp_meta(); ?>
					</ul>
				</li>

			<?php endif; ?>
			</ul>
		</div><!-- #secondary-sidebar .widget-area -->
		<?php endif; // ends the check for the current layout that determins if the third column is visible ?>

	<?php
		// add a containing div around the main sidebars for the content-sidebar-sidebar and sidebar-sidebar-layouts
		// so the layout holds together with a short content area and long featured widget area
		if ( in_array( $current_layout, $feature_widget_area_layouts ) )
			echo '</div><!-- #main-sidebars -->';
	?>