-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathportfolio.php
64 lines (56 loc) · 1.67 KB
/
portfolio.php
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
<?php /* Template Name: Portfolio */ ?>
<?php
/*
* The Portfolio page template.
*
* @package Valhalla
* @subpackage Templates
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
?>
<?php get_header('2'); ?>
<div class="main-content-area">
<div class="container-fluid portfolio-section1">
<div class="row justify-content-center">
<?php $settings = get_theme_mod( 'valhalla_portfolio_add_items');
$image_id = 0;
$image_id2 = 0;
?>
<?php foreach( $settings as $setting ) : ?>
<?php $image_id = $image_id + 1; ?>
<div class="card portfolio-items-div mx-2 mb-3 justify-content-center">
<img src="<?php echo esc_url(wp_get_attachment_url($setting['field1'])); ?>" class="card-img-top" alt="<?php echo esc_attr( $setting['field2'] ); ?>" data-toggle="modal" data-target="#image<?php echo esc_attr( $image_id ); ?>">
</div>
<?php endforeach; ?>
<?php foreach( $settings as $setting ) : ?>
<?php $image_id2 = $image_id2 + 1; ?>
<div id="image<?php echo esc_attr( $image_id2 ); ?>" class="portfolio-modal modal">
<div class="portfolio-modal-dialog modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
<?php echo esc_html( $setting['field2'] ); ?>
</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p>
<?php echo esc_html( $setting['field3'] ); ?>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
<?php echo esc_html__('Close', 'valhalla'); ?></button>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div class="content-separator"></div>
</div>
<?php get_footer(); ?>