-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfront-page.php
More file actions
60 lines (46 loc) · 2.25 KB
/
Copy pathfront-page.php
File metadata and controls
60 lines (46 loc) · 2.25 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
<?php get_header(); ?>
<?php
// $user_meta = get_userdata( '1' );
// $current_user_role_slug = $user_meta->roles[0];
// echo $current_user_role_slug;
?>
<section class="grid front_page_ATF">
<div class="grid overlaid_big overlaid_card">
<img class="rowcol1 lazy overlaid_img" data-url="<?php echo get_the_post_thumbnail_url(); ?>" alt="Ilustración Generación o2">
<hgroup class="overlaid_caption rowcol1">
<h1 class="overlaid_title"><?php echo get_the_title() ?></h1>
<h2 class="overlaid_txt"><?php echo get_the_excerpt() ?></h2>
</hgroup>
</div>
<aside class="page_CTA">
<h5 class="page_CTA_title"><?php echo get_post_meta($post->ID, '1-texto-superior-CTA', true); ?></h5>
<div class="CTA_container">
<p class="CTA_txt"><?php echo get_post_meta($post->ID, '2-texto-central-CTA', true); ?></p>
<a class="btn CTA_link" href="<?php echo get_post_meta($post->ID, '3-link-CTA', true); ?>" target="_blank"><?php echo get_post_meta($post->ID, '4-texto-link-CTA', true); ?></a>
</div>
</aside>
</section>
<section class="grid_to_flex">
<?php
$terms = get_terms( array(
'taxonomy' => 'departamento', // Swap in your custom taxonomy name
'hide_empty' => false,
'orderby' => 'meta_value_num',
'meta_key'=> 'lt_meta_order',
));
// Loop through all terms with a foreach loop
foreach( $terms as $term ) {
if (!get_term_meta( $term->term_id, 'lt_meta_hidden', true )) { ?>
<article class="grid standard_card">
<a href="<?php echo get_term_link($term->term_id); ?>">
<img class="card_img card_img_rounded lazy" data-url="<?php echo wp_get_attachment_url( get_img_id_by_slug(get_term_meta( $term->term_id, 'lt_meta_img', true ))); ?>" alt="Ilustración de departamento de Generación O2">
</a>
<hgroup class="card_caption">
<a href="<?php echo get_term_link($term->term_id); ?>"><h4 class="card_caption_title"><?php echo $term->name; ?></h4></a>
<a href="<?php echo get_term_link($term->term_id); ?>"><h5 class="card_caption_txt"><?php echo substr(get_term_meta( $term->term_id, 'lt_meta_short_description', true ), 0, 90); ?></h5></a>
</hgroup>
</article>
<?php } ?>
<?php } ?>
</section>
<?php get_footer(); ?>