Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); global $my_lang,$isMobile,$c_page;
- $terms = get_the_terms($post->ID, 'category');
- $main_post = get_field('main_post');
- if ($terms) { foreach ($terms as $term) { $myarr[] = $term->term_id; } } ?>
- <div id="SinglePage" >
- <?php $bg=get_Field('services_topimage','options'); if ($bg) {?>
- <?php if ($main_post) {
- $main_p = get_post($main_post->ID);
- ?>
- <div class="bgimg relative noback" style="background-color:#dfe1e2;">
- <div class="bg1 bgimg w100"style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg1.png'; ?>')">
- </div>
- <div class="w85 margin mw90 mmargin mcenter">
- <h1 class="sc1 hfs45 bold"><?=$main_p->post_title;?></h1>
- <div class="w50 mw90 mmargin mmb30 wdth60 hfs20 lh15 Assistant"style="font-size:1.5rem;"><?php echo $main_p->post_content;?></div>
- </div>
- <div class="bg2 bgimg hauto noback mpb30" style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg3.png'; ?>');">
- <div class="w85 margin wdth90 mw90 mmargin mcenter">
- <div class="nomobile serviceform w50 wdth60 mw90 mmargin mrelative absolute" style="bottom:15px;">
- <?php $form=get_field('show_form'); if($form!='לא'){?>
- <div class="flex aife ">
- <h2 class="hfs35 wcolor mblack light mrgb15 mhfs25"><?php echo "לקבלת הצעה משתלמת";?></h2>
- <img src="<?php echo get_template_directory_uri().'/images/lamp.gif'; ?>" class=" lamp animated infinite mrgr10" title="<?php echo "lamp";?>">
- </div>
- <div class="hidden"data-name="<?php echo the_title();?>" data-id="<?php echo $post->ID;?>"></div>
- <?php echo do_shortcode('[contact-form-7 id="176" title="טופס בדף תחומים"]');?>
- <?php }?>
- </div>
- </div>
- <div class="nosite">
- <div class="singleimg bgimg bgscon w100"style="height: 250px;background-image: url('<?php echo the_field('sale_image', $main_post->ID);?>')" ></div>
- <div class="bgimg relative formdiv formdiv1 margin serviceform" >
- <div class="wdth90 w90 margin pdg10">
- <h2 class="center hfs35 wcolor mrgb10 mhfs25 "><?php echo "השאירו פרטים להשוואת מחירים";?></h2>
- <div class="hidden hidden2" data-name="<?php echo the_title();?>" data-id="<?php echo $post->ID;?>"></div>
- <?php echo do_shortcode('[contact-form-7 id="937" title="טופס בדף תחומים_מובייל"]');?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php } ?>
- <div class="bgimg relative noback" >
- <?php if(!$main_post){ ?>
- <div class="bg1 bgimg w100"style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg1.png'; ?>')">
- </div>
- <?php } ?>
- <div class="w85 margin mw90 mmargin mcenter pdgb40" style="margin-top: 20px;">
- <?php if ($main_post) {
- $tabs=get_field('sub_posts', $main_post->ID);
- ?>
- <div class="w60 mw90 mmargin">
- <div class="flex pdgb80 mpb30 mblock">
- <h2 class="sub-link wcolor hfs25 mw90 mmargin mmb10 flex aic fcc"> <a href="<?=get_permalink($main_post->ID);;?>"><?php echo $main_post->post_title?></a></h2>
- <?php $i=1; foreach($tabs as $tab) {
- var_dump($tab);
- $post = get_post($tab);
- $link = get_post_permalink( $tab);
- //var_dump($post);
- ?>
- <h2 class="sub-link wcolor hfs25 mw90 mmargin mmb10 flex aic fcc"> <a href="<?=get_permalink();?>"><?php echo $post->post_title?></a></h2>
- <?php $i++;}?>
- </div>
- </div>
- <?php } ?>
- <h1 class="sc1 hfs45 bold"><?php echo get_the_title( get_post()->ID );?></h1>
- <div class="w50 mw90 mmargin mmb30 wdth60 hfs20 lh15 Assistant"><?php the_content();?></div>
- </div>
- </div>
- <?php }?>
- <div class="singlecontent "style="background-color:#f5f6f7;">
- </div>
- <div class="leftsidebar center nomobile wdth30">
- <img src="<?php echo the_field('sale_image');?>" class="singleimg imgc dnone">
- <div class="salediv bgimg margin " style="margin-bottom:10px;background-image:url('<?php echo get_template_directory_uri().'/images/saleimg.png'; ?>');"></div>
- <div class="bgimg formdiv margin flex aic fcc serviceform" >
- <div class="wdth90 w90">
- <div class="hidden"data-name="<?php echo the_title();?>"></div>
- <h2 class="center hfs35 wcolor mrgb10"><?php echo "בחינם וללא התחיבות!";?></h2>
- <?php echo do_shortcode('[contact-form-7 id="142" title="טופס פותיר 2"]');?>
- </div>
- </div>
- </div>
- </div>
- <?php get_footer(); ?>
- <script>
- $("#subbut1").click(function(){
- var name=$(this).parents().find('.hidden').attr('data-name');
- $(this).parents().find('#proname1').val(name);
- });
- $(".tab").click(function(){
- var id=$(this).attr('data-tab');
- $('.tab').removeClass('show');
- $('.tabcontent').removeClass('show');
- $(this).addClass('show');
- $(this).parents().find('.'+id).addClass('show');
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement