Tum 4 gadi atpakaļ
vecāks
revīzija
853f55d83f
39 mainītis faili ar 56 papildinājumiem un 49 dzēšanām
  1. 11 0
      app/wp-content/themes/whitesports/functions.php
  2. 2 2
      app/wp-content/themes/whitesports/header.php
  3. 4 24
      app/wp-content/themes/whitesports/page-articles.php
  4. 8 7
      app/wp-content/themes/whitesports/search.php
  5. 24 0
      app/wp-content/themes/whitesports/sidelink.php
  6. 4 1
      app/wp-content/themes/whitesports/single.php
  7. 3 15
      app/wp-content/themes/whitesports/template-parts/content-search.php
  8. BIN
      app/wp-content/uploads/2021/11/1-100x100.jpg
  9. BIN
      app/wp-content/uploads/2021/11/1-150x150.jpg
  10. BIN
      app/wp-content/uploads/2021/11/1-300x169.jpg
  11. BIN
      app/wp-content/uploads/2021/11/1-300x300.jpg
  12. BIN
      app/wp-content/uploads/2021/11/1-600x338.jpg
  13. BIN
      app/wp-content/uploads/2021/11/1-60x60.jpg
  14. BIN
      app/wp-content/uploads/2021/11/1-768x432.jpg
  15. BIN
      app/wp-content/uploads/2021/11/1.jpg
  16. BIN
      app/wp-content/uploads/2021/11/2-100x100.jpg
  17. BIN
      app/wp-content/uploads/2021/11/2-150x150.jpg
  18. BIN
      app/wp-content/uploads/2021/11/2-300x169.jpg
  19. BIN
      app/wp-content/uploads/2021/11/2-300x300.jpg
  20. BIN
      app/wp-content/uploads/2021/11/2-600x338.jpg
  21. BIN
      app/wp-content/uploads/2021/11/2-60x60.jpg
  22. BIN
      app/wp-content/uploads/2021/11/2-768x432.jpg
  23. BIN
      app/wp-content/uploads/2021/11/2.jpg
  24. BIN
      app/wp-content/uploads/2021/11/3-100x100.jpg
  25. BIN
      app/wp-content/uploads/2021/11/3-150x150.jpg
  26. BIN
      app/wp-content/uploads/2021/11/3-300x169.jpg
  27. BIN
      app/wp-content/uploads/2021/11/3-300x300.jpg
  28. BIN
      app/wp-content/uploads/2021/11/3-600x338.jpg
  29. BIN
      app/wp-content/uploads/2021/11/3-60x60.jpg
  30. BIN
      app/wp-content/uploads/2021/11/3-768x432.jpg
  31. BIN
      app/wp-content/uploads/2021/11/3.jpg
  32. BIN
      app/wp-content/uploads/2021/11/34-100x100.jpg
  33. BIN
      app/wp-content/uploads/2021/11/34-150x150.jpg
  34. BIN
      app/wp-content/uploads/2021/11/34-300x169.jpg
  35. BIN
      app/wp-content/uploads/2021/11/34-300x300.jpg
  36. BIN
      app/wp-content/uploads/2021/11/34-600x338.jpg
  37. BIN
      app/wp-content/uploads/2021/11/34-60x60.jpg
  38. BIN
      app/wp-content/uploads/2021/11/34-768x432.jpg
  39. BIN
      app/wp-content/uploads/2021/11/34.jpg

+ 11 - 0
app/wp-content/themes/whitesports/functions.php

@@ -211,3 +211,14 @@ function my_acf_google_map_api( $api  ){
211 211
 add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
212 212
 add_filter( 'show_admin_bar', '__return_false'  );
213 213
 
214
+function meks_which_template_is_loaded() {
215
+    if ( is_super_admin()  ) {
216
+        global $template;
217
+        print_r( $template  );
218
+
219
+    }
220
+
221
+}
222
+
223
+add_action( 'wp_footer', 'meks_which_template_is_loaded'  );
224
+

+ 2 - 2
app/wp-content/themes/whitesports/header.php

@@ -49,9 +49,9 @@
49 49
             <div class="row">
50 50
                 <div class="col-md-12 col-sm-12 col-xs-12">
51 51
                 <div class="search-form pull-right">
52
-                        <form action="#">
52
+                <form action="/">
53 53
                             <div class="search">
54
-                                <input type="search" name="search" value="" placeholder="Search Something">
54
+                                <input type="search" name="s" value="" placeholder="Search Something">
55 55
                                 <button type="submit"><span class="fa fa-search" aria-hidden="true"></span></button>
56 56
                             </div>
57 57
                         </form>

+ 4 - 24
app/wp-content/themes/whitesports/page-articles.php

@@ -24,31 +24,11 @@ get_header();
24 24
 <div class='container'>
25 25
     <div class='row'>
26 26
         <div class='col-md-3'>
27
-            <div class="border cat-box">
28
-                <p class='h4'>Categories</p>
29
-                <ul>
30
-                <li>Wellness</li>
31
-                <li>ความรู้ทั่วไป</li>
32
-                <li>รักโลกและธรรมชาติ</li>
33
-                <li>Innovation</li>
34
-                </ul>
35
-            </div>
36
-            <div class="border cat-box">
37
-                <p class='h4'>Top Posts</p>
38
-<?php  $ts = get_posts( array(
39
-    'meta_key' => 'wpb_post_views_count',
40
-    'orderby' => 'meta_value_num',
41
-    'posts_per_page' => 5)
42
-);?>
43
-<ul>
44
-<?php $o = 1 ?>
45
-<?php foreach($ts as $t): ?>
46
-   <li><?= $o++ ?>. <a href="<?= get_permalink($p) ?>"><?= $t->post_title ?></a></li>
47
-<?php endforeach  ?>
48
-</ul>
49
-            </div>
27
+<?= get_template_part("sidelink") ?>
28
+
29
+
50 30
         </div>
51
-        <div class='col-md-9'>
31
+        <div class='col-md-9' style='padding-top:1em'>
52 32
 <?php 
53 33
 $posts = get_posts(array('category__in'=> [1,  45, 41,40, 44], 'post_status'    => 'publish' ,'numberposts' => -1));
54 34
 ?>

+ 8 - 7
app/wp-content/themes/whitesports/search.php

@@ -10,18 +10,20 @@
10 10
 get_header();
11 11
 ?>
12 12
 
13
-	<main id="primary" class="site-main">
14
-
13
+	<main id="primary" class="container site-main">
14
+<div class='row'>
15 15
 		<?php if ( have_posts() ) : ?>
16 16
 
17
-			<header class="page-header">
18
-				<h1 class="page-title">
17
+			<header style='border-bottom:1px solid #eee; margin-bottom:1em'>
18
+				<h1>
19 19
 					<?php
20 20
 					/* translators: %s: search query. */
21 21
 					printf( esc_html__( 'Search Results for: %s', 'whitesports' ), '<span>' . get_search_query() . '</span>' );
22 22
 					?>
23 23
 				</h1>
24
-			</header><!-- .page-header -->
24
+                
25
+            </header><!-- .page-header -->
26
+
25 27
 
26 28
 			<?php
27 29
 			/* Start the Loop */
@@ -45,9 +47,8 @@ get_header();
45 47
 
46 48
 		endif;
47 49
 		?>
48
-
50
+</div>
49 51
 	</main><!-- #main -->
50 52
 
51 53
 <?php
52
-get_sidebar();
53 54
 get_footer();

+ 24 - 0
app/wp-content/themes/whitesports/sidelink.php

@@ -0,0 +1,24 @@
1
+
2
+            <div class="border cat-box">
3
+                <p class='h4'>Categories</p>
4
+                <ul>
5
+                <li>Wellness</li>
6
+                <li>ความรู้ทั่วไป</li>
7
+                <li>รักโลกและธรรมชาติ</li>
8
+                <li>Innovation</li>
9
+                </ul>
10
+            </div>
11
+            <div class="border cat-box">
12
+                <p class='h4'>Top Posts</p>
13
+<?php  $ts = get_posts( array(
14
+    'meta_key' => 'wpb_post_views_count',
15
+    'orderby' => 'meta_value_num',
16
+    'posts_per_page' => 5)
17
+);?>
18
+<ul>
19
+<?php $o = 1 ?>
20
+<?php foreach($ts as $t): ?>
21
+   <li><?= $o++ ?>. <a href="<?= get_permalink($p) ?>"><?= $t->post_title ?></a></li>
22
+<?php endforeach  ?>
23
+</ul>
24
+            </div>

+ 4 - 1
app/wp-content/themes/whitesports/single.php

@@ -12,7 +12,7 @@ get_header();
12 12
 
13 13
 <div class='container'>
14 14
 <div class='row'>
15
-    <div class='col-md-12'>
15
+    <div class='col-md-9'>
16 16
 		<?php
17 17
 		while ( have_posts() ) :
18 18
             the_post();
@@ -38,6 +38,9 @@ get_header();
38 38
 		?>
39 39
 
40 40
     </div>
41
+<div class='col-md-3'>
42
+<?= get_template_part("sidelink") ?>
43
+</div>
41 44
 </div>
42 45
 </div>
43 46
 <?php

+ 3 - 15
app/wp-content/themes/whitesports/template-parts/content-search.php

@@ -9,27 +9,15 @@
9 9
 
10 10
 ?>
11 11
 
12
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
13
-	<header class="entry-header">
14
-		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
15
-
12
+<article id="post-<?php the_ID(); ?>" class="col-md-3" style='margin-bottom:1.5em'>
13
+	<?php whitesports_post_thumbnail(); ?>
16 14
 		<?php if ( 'post' === get_post_type() ) : ?>
17 15
 		<div class="entry-meta">
18 16
 			<?php
19 17
 			whitesports_posted_on();
20
-			whitesports_posted_by();
21 18
 			?>
22 19
 		</div><!-- .entry-meta -->
23 20
 		<?php endif; ?>
24
-	</header><!-- .entry-header -->
25
-
26
-	<?php whitesports_post_thumbnail(); ?>
27
-
28
-	<div class="entry-summary">
29
-		<?php the_excerpt(); ?>
30
-	</div><!-- .entry-summary -->
31 21
 
32
-	<footer class="entry-footer">
33
-		<?php whitesports_entry_footer(); ?>
34
-	</footer><!-- .entry-footer -->
22
+	<?php the_title( sprintf( '<strong><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></strong>' ); ?>
35 23
 </article><!-- #post-<?php the_ID(); ?> -->

BIN
app/wp-content/uploads/2021/11/1-100x100.jpg


BIN
app/wp-content/uploads/2021/11/1-150x150.jpg


BIN
app/wp-content/uploads/2021/11/1-300x169.jpg


BIN
app/wp-content/uploads/2021/11/1-300x300.jpg


BIN
app/wp-content/uploads/2021/11/1-600x338.jpg


BIN
app/wp-content/uploads/2021/11/1-60x60.jpg


BIN
app/wp-content/uploads/2021/11/1-768x432.jpg


BIN
app/wp-content/uploads/2021/11/1.jpg


BIN
app/wp-content/uploads/2021/11/2-100x100.jpg


BIN
app/wp-content/uploads/2021/11/2-150x150.jpg


BIN
app/wp-content/uploads/2021/11/2-300x169.jpg


BIN
app/wp-content/uploads/2021/11/2-300x300.jpg


BIN
app/wp-content/uploads/2021/11/2-600x338.jpg


BIN
app/wp-content/uploads/2021/11/2-60x60.jpg


BIN
app/wp-content/uploads/2021/11/2-768x432.jpg


BIN
app/wp-content/uploads/2021/11/2.jpg


BIN
app/wp-content/uploads/2021/11/3-100x100.jpg


BIN
app/wp-content/uploads/2021/11/3-150x150.jpg


BIN
app/wp-content/uploads/2021/11/3-300x169.jpg


BIN
app/wp-content/uploads/2021/11/3-300x300.jpg


BIN
app/wp-content/uploads/2021/11/3-600x338.jpg


BIN
app/wp-content/uploads/2021/11/3-60x60.jpg


BIN
app/wp-content/uploads/2021/11/3-768x432.jpg


BIN
app/wp-content/uploads/2021/11/3.jpg


BIN
app/wp-content/uploads/2021/11/34-100x100.jpg


BIN
app/wp-content/uploads/2021/11/34-150x150.jpg


BIN
app/wp-content/uploads/2021/11/34-300x169.jpg


BIN
app/wp-content/uploads/2021/11/34-300x300.jpg


BIN
app/wp-content/uploads/2021/11/34-600x338.jpg


BIN
app/wp-content/uploads/2021/11/34-60x60.jpg


BIN
app/wp-content/uploads/2021/11/34-768x432.jpg


BIN
app/wp-content/uploads/2021/11/34.jpg