-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
138 lines (103 loc) · 3.69 KB
/
index.php
File metadata and controls
138 lines (103 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Chocolita
*/
get_header(); ?>
<section class="main-event section-padding">
<div class="row">
<div class="columns column-5 text-center">
<img src="<?php echo get_template_directory_uri(); ?>/img/logoE16.png" />
</div>
<div class="columns column-7">
<?php
$val = 'portada_option_name'; //desired values to be fetched
$opt = $wpdb -> get_row("SELECT * FROM $wpdb->options WHERE option_name = '$val'");
$opts = $opt -> option_value;
$array = unserialize($opts);
//Printing out featured event details
echo '<ul class="main-event-list">';
echo '<li>'.$array['event_date'].'</li>';
echo '<li>'.$array['event_name'].'</li>';
echo '<li>'.$array['event_venue'].'</li>';
echo '<li>'.$array['event_desc'].'</li>';
echo '</ul>';
echo '<a href="'.$array['event_url'].'"><button class="main-event-button">'.$array['event_btn'].'</button></a>';
?>
</div>
</div><!-- .row -->
</section><!-- section -->
<section class="about-us section-padding">
<div class="row">
<?php dynamic_sidebar( 'home_about_us' ); ?>
</div><!-- .row -->
</section><!-- section -->
<section class="main-map section-padding">
<div class="row">
<div class="columns column-12">
<div class="columns column-4">
<?php dynamic_sidebar( 'map_infobox' ); ?>
</div>
</div>
</div><!-- .row -->
</section><!-- section -->
<section class="news-block section-padding">
<div class="row">
<h2 class="text-center"><?php esc_html_e( 'News', 'ecsl16' ); ?></h2>
<?php
$args = array( 'category_name' => 'noticias', 'posts_per_page' => 3 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="columns column-4 text-right">
<h4><?php echo get_the_date(); ?></h4>
<h6><?php esc_html_e( 'Published by: ', 'ecsl16' ); the_author(); ?></h6>
</div>
<div class="columns column-8">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<?php endwhile;
?>
</div><!-- .row -->
</section><!-- section -->
<section class="about-us section-padding">
<div class="row">
<h2 class="text-center"><?php esc_html_e( 'General Information', 'ecsl16' ); ?></h2>
<div class="columns column-3 text-center">
<?php dynamic_sidebar( 'info_one' ); ?>
</div>
<div class="columns column-3 text-center">
<?php dynamic_sidebar( 'info_two' ); ?>
</div>
<div class="columns column-3 text-center">
<?php dynamic_sidebar( 'info_three' ); ?>
</div>
<div class="columns column-3 text-center">
<?php dynamic_sidebar( 'info_four' ); ?>
</div>
</div><!-- .row -->
</section><!-- section -->
<section class="sponsors-block section-padding">
<div class="row">
<h2 class="text-center"><?php esc_html_e( 'Sponsors', 'ecsl16' ); ?></h2>
<?php
$args = array( 'post_type' => 'sponsors', 'posts_per_page' => 0, 'order' => 'ASC' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="columns column-3 text-center">
<h3><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumb-sponsors'); ?></a></h3>
</div>
<?php endwhile;
?>
</div><!-- .row -->
</section><!-- section -->
<?php
get_footer();