Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hosting_reviews
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
hosting_reviews
Commits
7ec81660
Commit
7ec81660
authored
Dec 27, 2019
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pagination links added
parent
b57601c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
89 deletions
+76
-89
archive-hosting_reviews.php
...content/themes/hostingreviews/archive-hosting_reviews.php
+50
-65
custom.css
...TA/wp-content/themes/hostingreviews/assets/css/custom.css
+10
-1
home.php
WWW_DATA/wp-content/themes/hostingreviews/home.php
+16
-23
No files found.
WWW_DATA/wp-content/themes/hostingreviews/archive-hosting_reviews.php
View file @
7ec81660
...
...
@@ -6,96 +6,81 @@ Template Name: Blog Page
<?php
get_header
();
?>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
href=
"
<?php
echo
site_url
();
?>
"
>
<?php
echo
get_the_title
(
get_option
(
'page_on_front'
)
)
?>
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
<?php
echo
REVIEWS_PAGE
?>
</li>
</ol>
</nav>
</div>
<div
class=
"col-sm-8"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
href=
"
<?php
echo
site_url
();
?>
"
>
<?php
echo
get_the_title
(
get_option
(
'page_on_front'
)
)
?>
</a>
</li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
<?php
echo
REVIEWS_PAGE
?>
</li>
</ol>
</nav>
</div>
<div
class=
"col-sm-8"
>
<div
class=
"row"
>
<div
class=
"row"
>
<?php
$page
=
isset
(
$_GET
[
'page'
])
?
$_GET
[
'page'
]
:
1
;
<?php
$loop
=
new
WP_Query
(
array
(
'post_type'
=>
'hosting_reviews'
,
'paged'
=>
true
,
'posts_per_page'
=>
2
)
);
if
(
$loop
->
have_posts
()
)
:
while
(
$loop
->
have_posts
()
)
:
$loop
->
the_post
();
?>
$loop
=
new
WP_Query
(
array
(
'post_type'
=>
'hosting_reviews'
,
'paged'
=>
$page
,
'posts_per_page'
=>
10
)
);
if
(
$loop
->
have_posts
()
)
:
while
(
$loop
->
have_posts
()
)
:
$loop
->
the_post
();
?>
<div
class=
"col-sm-12"
>
<img
class=
"blogImage"
src=
"
<?php
echo
get_the_post_thumbnail_url
();
?>
"
>
<img
class=
"blogImage"
src=
"
<?php
echo
get_the_post_thumbnail_url
();
?>
"
>
<div
class=
"blogSingle"
>
<a
href=
"
<?php
the_permalink
();
?>
"
><h3>
<?php
the_title
();
?>
</h3></a>
</div>
<div
class=
"d-flex spaceBetween"
>
<div
class=
"singleBox r-margin"
>
<img
class=
"userIcon"
src=
"
<?php
echo
get_template_directory_uri
();
?>
/assets/images/user-icon.png"
>
<img
class=
"userIcon"
src=
"
<?php
echo
get_template_directory_uri
();
?>
/assets/images/user-icon.png"
>
<div
class=
"blogSingle d-inline-block"
>
<h5>
<?php
echo
get_the_author_meta
(
'display_name'
);
?>
</h5>
<h5>
<?php
echo
get_the_author_meta
(
'display_name'
);
?>
</h5>
</div>
</div>
<div
class=
"singleBox"
>
<img
class=
"userIcon"
src=
"
<?php
echo
get_template_directory_uri
();
?>
/assets/images/date-icon.png"
>
<img
class=
"userIcon"
src=
"
<?php
echo
get_template_directory_uri
();
?>
/assets/images/date-icon.png"
>
<div
class=
"blogSingle d-inline-block"
>
<h5>
<?php
the_time
(
'F j, Y'
);
?>
</h5>
<h5>
<?php
the_time
(
'F j, Y'
);
?>
</h5>
</div>
</div>
</div>
</div>
<?php
endwhile
;
if
(
$loop
->
max_num_pages
>
1
)
:
?>
<div
id=
"nav-below"
class=
"navigation"
>
<div
class=
"nav-previous"
>
<?php
next_posts_link
(
__
(
'<span class="meta-nav">←</span> Previous'
,
'domain'
)
);
?>
</div>
<div
class=
"nav-next"
>
<?php
previous_posts_link
(
__
(
'Next <span class="meta-nav">→</span>'
,
'domain'
)
);
?>
</div>
</div>
<?php
endif
;
endif
;
wp_reset_postdata
();
?>
<?php
endwhile
;
endif
;
?>
<div
class=
"pagination d-flex justify-content-center w-100"
>
<?php
$page
=
isset
(
$_GET
[
'page'
])
?
$_GET
[
'page'
]
:
1
;
echo
paginate_links
(
array
(
'current'
=>
$page
,
'format'
=>
'?page=%#%'
,
'prev_text'
=>
'«'
,
'next_text'
=>
'»'
,
'total'
=>
$loop
->
max_num_pages
)
);
?>
</div>
</div>
</div>
<div
class=
"ppage"
>
<?php
global
$wp_query
;
paginate_links
();
?>
</div>
<div
class=
"col-md-4"
>
<div
class=
"d-flex j-content-center"
>
<nav
aria-label=
"Page navigation example"
>
<ul
class=
"pagination"
>
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
</a>
</li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
01
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
02
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
03
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
04
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
05
</a></li>
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
<div
class=
"col-md-4"
>
<?php
get_sidebar
();
?>
<?php
get_sidebar
();
?>
</div>
</div>
</div>
</div>
<?php
...
...
WWW_DATA/wp-content/themes/hostingreviews/assets/css/custom.css
View file @
7ec81660
...
...
@@ -2953,7 +2953,16 @@ h2 span
/*----- Media Query Style End {320px} ----- */
.page-numbers
{
position
:
relative
;
display
:
block
;
padding
:
.5rem
.75rem
;
margin-left
:
-1px
;
line-height
:
1.25
;
color
:
#007bff
;
background-color
:
#fff
;
border
:
1px
solid
#dee2e6
;
}
.loader
{
border
:
8px
solid
#f3f3f3
;
...
...
WWW_DATA/wp-content/themes/hostingreviews/home.php
View file @
7ec81660
...
...
@@ -21,8 +21,10 @@ Template Name: Blog Page
<?php
$page
=
isset
(
$_GET
[
'page'
])
?
$_GET
[
'page'
]
:
1
;
$the_query
=
new
WP_Query
(
array
(
'posts_per_page'
=>
10
'posts_per_page'
=>
10
,
'paged'
=>
$page
));
if
(
$the_query
->
have_posts
()
)
:
...
...
@@ -50,34 +52,25 @@ Template Name: Blog Page
?>
<div
class=
"pagination d-flex justify-content-center w-100"
>
<?php
$page
=
isset
(
$_GET
[
'page'
])
?
$_GET
[
'page'
]
:
1
;
echo
paginate_links
(
array
(
'current'
=>
$page
,
'format'
=>
'?page=%#%'
,
'prev_text'
=>
'«'
,
'next_text'
=>
'»'
,
'total'
=>
$the_query
->
max_num_pages
)
);
?>
</div>
<?php
endif
;
?>
</div>
<div
class=
"d-flex j-content-center"
>
<nav
aria-label=
"Page navigation example"
>
<ul
class=
"pagination"
>
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
</a>
</li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
01
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
02
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
03
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
04
</a></li>
<li
class=
"page-item"
><a
class=
"page-link"
href=
"#"
>
05
</a></li>
<li
class=
"page-item"
>
<a
class=
"page-link"
href=
"#"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
<div
class=
"col-md-4"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment