Advertisement
Guest User

Untitled

a guest
Dec 31st, 2018
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.10 KB | None | 0 0
  1. <?php get_header(); global $my_lang,$isMobile,$c_page;
  2. $terms = get_the_terms($post->ID, 'category');
  3. $main_post = get_field('main_post');
  4.  
  5. if ($terms) { foreach ($terms as $term) { $myarr[] = $term->term_id; } } ?>
  6.  
  7.  
  8. <div id="SinglePage" >
  9.     <?php $bg=get_Field('services_topimage','options'); if ($bg) {?>
  10.     <?php if ($main_post) {
  11.         $main_p = get_post($main_post->ID);
  12.  
  13.     ?>
  14.         <div class="bgimg   relative  noback" style="background-color:#dfe1e2;">
  15.             <div class="bg1 bgimg w100"style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg1.png'; ?>')">
  16.             </div>
  17.             <div class="w85 margin mw90 mmargin mcenter">
  18.                     <h1 class="sc1 hfs45 bold"><?=$main_p->post_title;?></h1>
  19.                     <div class="w50 mw90 mmargin mmb30  wdth60 hfs20 lh15 Assistant"style="font-size:1.5rem;"><?php echo $main_p->post_content;?></div>
  20.             </div>
  21.             <div class="bg2 bgimg hauto noback mpb30" style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg3.png'; ?>');">
  22.                 <div class="w85 margin wdth90 mw90 mmargin mcenter">
  23.                     <div class="nomobile serviceform w50  wdth60 mw90 mmargin mrelative absolute" style="bottom:15px;">
  24.                         <?php $form=get_field('show_form'); if($form!='לא'){?>
  25.                         <div class="flex aife  ">
  26.                             <h2 class="hfs35 wcolor mblack light mrgb15 mhfs25"><?php echo "לקבלת הצעה משתלמת";?></h2>
  27.                             <img src="<?php echo get_template_directory_uri().'/images/lamp.gif'; ?>" class=" lamp animated  infinite mrgr10" title="<?php echo "lamp";?>">
  28.                         </div>
  29.                         <div class="hidden"data-name="<?php echo the_title();?>" data-id="<?php echo $post->ID;?>"></div>
  30.                             <?php echo do_shortcode('[contact-form-7 id="176" title="טופס בדף תחומים"]');?>
  31.                         <?php }?>
  32.  
  33.                     </div>
  34.                 </div>
  35.                 <div class="nosite">
  36.                     <div class="singleimg bgimg bgscon  w100"style="height: 250px;background-image: url('<?php echo the_field('sale_image', $main_post->ID);?>')" ></div>
  37.                     <div class="bgimg  relative  formdiv formdiv1 margin serviceform" >
  38.                         <div class="wdth90 w90 margin pdg10">
  39.                             <h2 class="center hfs35 wcolor mrgb10 mhfs25 "><?php echo "השאירו פרטים להשוואת מחירים";?></h2>
  40.                             <div class="hidden hidden2" data-name="<?php echo the_title();?>" data-id="<?php echo $post->ID;?>"></div>
  41.                             <?php echo do_shortcode('[contact-form-7 id="937" title="טופס בדף תחומים_מובייל"]');?>
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.             </div>
  46.         </div>
  47.     <?php } ?>
  48.         <div class="bgimg   relative  noback" >
  49.         <?php if(!$main_post){ ?>
  50.                 <div class="bg1 bgimg w100"style="height:213px;background-image:url('<?php echo get_template_directory_uri().'/images/bg1.png'; ?>')">
  51.  
  52.                 </div>
  53.         <?php } ?>
  54.             <div class="w85 margin mw90 mmargin mcenter pdgb40" style="margin-top: 20px;">
  55.             <?php if ($main_post) {
  56.             $tabs=get_field('sub_posts', $main_post->ID);
  57.             ?>
  58.             <div class="w60 mw90 mmargin">
  59.                 <div class="flex pdgb80 mpb30 mblock">
  60.                 <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>
  61.                     <?php $i=1; foreach($tabs as $tab) {
  62.                         var_dump($tab);
  63.                         $post = get_post($tab);
  64.                         $link = get_post_permalink( $tab);
  65.                         //var_dump($post);
  66.                         ?>
  67.                     <h2 class="sub-link wcolor hfs25  mw90 mmargin mmb10 flex aic fcc"> <a href="<?=get_permalink();?>"><?php echo $post->post_title?></a></h2>
  68.                     <?php $i++;}?>
  69.                 </div>
  70.             </div>
  71.             <?php } ?>
  72.                     <h1 class="sc1 hfs45 bold"><?php echo get_the_title( get_post()->ID );?></h1>
  73.                     <div class="w50 mw90 mmargin mmb30  wdth60 hfs20 lh15 Assistant"><?php  the_content();?></div>
  74.             </div>
  75.            
  76.  
  77.            
  78.            
  79.         </div>
  80.     <?php }?>
  81.  
  82.     <div class="singlecontent "style="background-color:#f5f6f7;">
  83.  
  84.     </div>
  85.  
  86.     <div class="leftsidebar center nomobile wdth30">
  87.         <img src="<?php echo the_field('sale_image');?>" class="singleimg imgc dnone">
  88.         <div class="salediv bgimg margin " style="margin-bottom:10px;background-image:url('<?php echo get_template_directory_uri().'/images/saleimg.png'; ?>');"></div>
  89.         <div class="bgimg   formdiv margin flex aic fcc serviceform" >
  90.             <div class="wdth90 w90">
  91.                 <div class="hidden"data-name="<?php echo the_title();?>"></div>
  92.                 <h2 class="center hfs35 wcolor mrgb10"><?php echo "בחינם וללא התחיבות!";?></h2>
  93.                 <?php echo do_shortcode('[contact-form-7 id="142" title="טופס פותיר 2"]');?>
  94.             </div>
  95.         </div>
  96.     </div>
  97. </div>
  98.  
  99. <?php get_footer(); ?>
  100. <script>
  101. $("#subbut1").click(function(){
  102.     var name=$(this).parents().find('.hidden').attr('data-name');
  103.     $(this).parents().find('#proname1').val(name);
  104. });
  105. $(".tab").click(function(){
  106.     var id=$(this).attr('data-tab');
  107.     $('.tab').removeClass('show');
  108.     $('.tabcontent').removeClass('show');
  109.     $(this).addClass('show');
  110.     $(this).parents().find('.'+id).addClass('show');
  111. });
  112. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement