Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template used for pages.
- *
- * @package Avada
- * @subpackage Templates
- */
- // Do not allow directly accessing this file.
- if ( ! defined( 'ABSPATH' ) ) {
- exit( 'Direct script access denied.' );
- }
- wp_enqueue_script('dananu_main_script', plugins_url('dananu/assets/js/main.js'), array(), '1.12.0',true);
- wp_enqueue_style('dananu_style', plugins_url('dananu/assets/css/style.css'), array(), '1.0');
- ?>
- <?php get_header(); ?>
- <section id="content" <?php Avada()->layout->add_style( 'content_style' ); ?>>
- <?php while ( have_posts() ) : the_post(); ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php echo fusion_render_rich_snippets_for_pages(); // WPCS: XSS ok. ?>
- <?php if ( ! post_password_required( $post->ID ) ) : ?>
- <?php if ( Avada()->settings->get( 'featured_images_pages' ) ) : ?>
- <?php if ( 0 < avada_number_of_featured_images() || get_post_meta( $post->ID, 'pyre_video', true ) ) : ?>
- <div class="fusion-flexslider flexslider post-slideshow">
- <ul class="slides">
- <?php if ( get_post_meta( $post->ID, 'pyre_video', true ) ) : ?>
- <li>
- <div class="full-video">
- <?php echo get_post_meta( $post->ID, 'pyre_video', true ); // WPCS: XSS ok. ?>
- </div>
- </li>
- <?php endif; ?>
- <?php if ( has_post_thumbnail() && 'yes' != get_post_meta( $post->ID, 'pyre_show_first_featured_image', true ) ) : ?>
- <?php $attachment_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?>
- <?php $full_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?>
- <?php $attachment_data = wp_get_attachment_metadata( get_post_thumbnail_id() ); ?>
- <li>
- <a href="<?php echo esc_url_raw( $full_image[0] ); ?>" data-rel="iLightbox[gallery<?php the_ID(); ?>]" title="<?php echo esc_attr( get_post_field( 'post_excerpt', get_post_thumbnail_id() ) ); ?>" data-title="<?php echo esc_attr( get_post_field( 'post_title', get_post_thumbnail_id() ) ); ?>" data-caption="<?php echo esc_attr( get_post_field( 'post_excerpt', get_post_thumbnail_id() ) ); ?>">
- <img src="<?php echo esc_url_raw( $attachment_image[0] ); ?>" alt="<?php echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); ?>" role="presentation" />
- </a>
- </li>
- <?php endif; ?>
- <?php $i = 2; ?>
- <?php while ( $i <= Avada()->settings->get( 'posts_slideshow_number' ) ) : ?>
- <?php $attachment_new_id = fusion_get_featured_image_id( 'featured-image-' . $i, 'page' ); ?>
- <?php if ( $attachment_new_id ) : ?>
- <?php $attachment_image = wp_get_attachment_image_src( $attachment_new_id, 'full' ); ?>
- <?php $full_image = wp_get_attachment_image_src( $attachment_new_id, 'full' ); ?>
- <?php $attachment_data = wp_get_attachment_metadata( $attachment_new_id ); ?>
- <li>
- <a href="<?php echo esc_url_raw( $full_image[0] ); ?>" data-rel="iLightbox[gallery<?php the_ID(); ?>]" title="<?php echo esc_attr( get_post_field( 'post_excerpt', $attachment_new_id ) ); ?>" data-title="<?php echo esc_attr( get_post_field( 'post_title', $attachment_new_id ) ); ?>" data-caption="<?php echo esc_attr( get_post_field( 'post_excerpt', $attachment_new_id ) ); ?>">
- <img src="<?php echo esc_url_raw( $attachment_image[0] ); ?>" alt="<?php echo esc_attr( get_post_meta( $attachment_new_id, '_wp_attachment_image_alt', true ) ); ?>" role="presentation" />
- </a>
- </li>
- <?php endif; ?>
- <?php $i++; ?>
- <?php endwhile; ?>
- </ul>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; // Password check. ?>
- <div class="post-content">
- <div class="col-sm-8 col-sm-offset-2" style="padding-top:30px;padding-bottom:60px;">
- <h3 class="blue-heading"><?php the_title();?></h3>
- <?php the_content(); ?>
- <form action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post">
- <input type="hidden" id="min-amount" name="min_amount" value="<?php echo get_option('dananu_minimal_amount_dana_abadi',50000);?>" />
- <input type="hidden" name="action" value="dananu_donate" />
- <input type="hidden" name="donate_type" value="dana_abadi" />
- <div class="amount_input">
- <div class=" col-md-12">
- <div class="col-md-6">
- <span class="rp_text">Rp.</span>
- <span class="error_text">Donasi minimal Rp. <?php echo get_option('dananu_minimal_amount_dana_abadi',50000);?></span>
- <input type="text" name="amount_value2" class="form_imput_dana-abadi insert_amount" value="" style="" placeholder="Masukkan jumlah donasi dana abadi Anda" required="">
- </div>
- <div class="col-md-6">
- <input type="submit" value="Lanjutkan" class="button_send tombol_send_dana-abadi" style="">
- </div>
- </div>
- </div><br>
- </form>
- </div>
- <?php fusion_link_pages(); ?>
- </div>
- <?php if ( ! post_password_required( $post->ID ) ) : ?>
- <?php if ( class_exists( 'WooCommerce' ) ) : ?>
- <?php $woo_thanks_page_id = get_option( 'woocommerce_thanks_page_id' ); ?>
- <?php $is_woo_thanks_page = ( ! get_option( 'woocommerce_thanks_page_id' ) ) ? false : is_page( get_option( 'woocommerce_thanks_page_id' ) ); ?>
- <?php if ( Avada()->settings->get( 'comments_pages' ) && ! is_cart() && ! is_checkout() && ! is_account_page() && ! $is_woo_thanks_page ) : ?>
- <?php wp_reset_postdata(); ?>
- <?php comments_template(); ?>
- <?php endif; ?>
- <?php else : ?>
- <?php if ( Avada()->settings->get( 'comments_pages' ) ) : ?>
- <?php wp_reset_postdata(); ?>
- <?php comments_template(); ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; // Password check. ?>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- </section>
- <?php do_action( 'avada_after_content' ); ?>
- <?php get_footer();
- /* Omit closing PHP tag to avoid "Headers already sent" issues. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement