Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WP Theme
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Anton Sarukhanov
WP Theme
Commits
c1060671
Commit
c1060671
authored
9 years ago
by
Anton Sarukhanov
Browse files
Options
Downloads
Patches
Plain Diff
Added home.php (Posts List) and single.php (Single Post View) templates
parent
127ad053
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
home.php
+74
-0
74 additions, 0 deletions
home.php
single.php
+87
-0
87 additions, 0 deletions
single.php
with
161 additions
and
0 deletions
home.php
0 → 100644
+
74
−
0
View file @
c1060671
<?php
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
{
exit
;
}
/**
* Blog Template
*
* @file home.php
* @package Anton Responsive
*
* Note: Despite the name, this is not necessarily the "Home Page" template. This
* template displays a list of all posts.
*/
get_header
();
global
$more
;
$more
=
0
;
?>
<div
id=
"content-blog"
class=
"
<?php
echo
esc_attr
(
implode
(
' '
,
responsive_get_content_classes
()
)
);
?>
"
>
<!-- Blog page title -->
<?php
if
(
responsive_free_get_option
(
'blog_post_title_toggle'
)
)
{
?>
<h1>
<?php
echo
responsive_free_get_option
(
'blog_post_title_text'
);
?>
</h1>
<?php
}
?>
<?php
get_template_part
(
'loop-header'
,
get_post_type
()
);
?>
<?php
if
(
have_posts
()
)
:
?>
<?php
while
(
have_posts
()
)
:
the_post
();
?>
<?php
responsive_entry_before
();
?>
<div
id=
"post-
<?php
the_ID
();
?>
"
<?php
post_class
();
?>
>
<?php
responsive_entry_top
();
?>
<?php
get_template_part
(
'post-meta'
,
get_post_type
()
);
?>
<div
class=
"post-entry"
>
<?php
if
(
has_post_thumbnail
()
)
:
?>
<a
href=
"
<?php
the_permalink
();
?>
"
title=
"
<?php
the_title_attribute
();
?>
"
>
<?php
the_post_thumbnail
();
?>
</a>
<?php
endif
;
?>
<?php
the_excerpt
(
__
(
'Read more ›'
,
'responsive'
)
);
?>
<?php
wp_link_pages
(
array
(
'before'
=>
'<div class="pagination">'
.
__
(
'Pages:'
,
'responsive'
),
'after'
=>
'</div>'
)
);
?>
</div>
<!-- end of .post-entry -->
<?php
get_template_part
(
'post-data'
,
get_post_type
()
);
?>
<?php
responsive_entry_bottom
();
?>
</div>
<!-- end of #post-
<?php
the_ID
();
?>
-->
<?php
responsive_entry_after
();
?>
<?php
endwhile
;
get_template_part
(
'loop-nav'
,
get_post_type
()
);
else
:
get_template_part
(
'loop-no-posts'
,
get_post_type
()
);
endif
;
?>
</div>
<!-- end of #content-blog -->
<?php
get_sidebar
();
?>
<?php
get_footer
();
?>
This diff is collapsed.
Click to expand it.
single.php
0 → 100644
+
87
−
0
View file @
c1060671
<?php
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
{
exit
;
}
/**
* Single Posts Template
*
*
* @file single.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/single.php
* @link http://codex.wordpress.org/Theme_Development#Single_Post_.28single.php.29
* @since available since Release 1.0
*/
get_header
();
?>
<div
id=
"content"
class=
"
<?php
echo
esc_attr
(
implode
(
' '
,
responsive_get_content_classes
()
)
);
?>
"
>
<?php
get_template_part
(
'loop-header'
,
get_post_type
()
);
?>
<?php
if
(
have_posts
()
)
:
?>
<?php
while
(
have_posts
()
)
:
the_post
();
?>
<?php
responsive_entry_before
();
?>
<div
id=
"post-
<?php
the_ID
();
?>
"
<?php
post_class
();
?>
>
<?php
responsive_entry_top
();
?>
<?php
get_template_part
(
'post-meta'
,
get_post_type
()
);
?>
<div
class=
"post-entry"
>
<?php
the_content
(
__
(
'Read more ›'
,
'responsive'
)
);
?>
<?php
if
(
get_the_author_meta
(
'description'
)
!=
''
)
:
?>
<div
id=
"author-meta"
>
<?php
if
(
function_exists
(
'get_avatar'
)
)
{
echo
get_avatar
(
get_the_author_meta
(
'email'
),
'80'
);
}
?>
<div
class=
"about-author"
>
<?php
_e
(
'About'
,
'responsive'
);
?>
<?php
the_author_posts_link
();
?>
</div>
<p>
<?php
the_author_meta
(
'description'
)
?>
</p>
</div>
<!-- end of #author-meta -->
<?php
endif
;
// no description, no author's meta ?>
<?
php
wp_link_pages
(
array
(
'before'
=>
'<div class="pagination">'
.
__
(
'Pages:'
,
'responsive'
),
'after'
=>
'</div>'
)
);
?>
</div>
<!-- end of .post-entry -->
<div
class=
"navigation"
>
<div
class=
"previous"
>
<?php
previous_post_link
(
'‹ %link'
);
?>
</div>
<div
class=
"next"
>
<?php
next_post_link
(
'%link ›'
);
?>
</div>
</div>
<!-- end of .navigation -->
<?php
get_template_part
(
'post-data'
,
get_post_type
()
);
?>
<?php
responsive_entry_bottom
();
?>
</div>
<!-- end of #post-
<?php
the_ID
();
?>
-->
<?php
responsive_entry_after
();
?>
<?php
responsive_comments_before
();
?>
<?php
comments_template
(
''
,
true
);
?>
<?php
responsive_comments_after
();
?>
<?php
endwhile
;
get_template_part
(
'loop-nav'
,
get_post_type
()
);
else
:
get_template_part
(
'loop-no-posts'
,
get_post_type
()
);
endif
;
?>
</div>
<!-- end of #content -->
<?php
get_sidebar
();
?>
<?php
get_footer
();
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment