Skip to content

Commit

Permalink
FIX: custom posts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
corvus committed Jun 2, 2017
1 parent e730d75 commit 5cfad06
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 59 deletions.
4 changes: 2 additions & 2 deletions assets/sass/elements/_custom-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
margin: 0 10% 4.375em;
}
h2 {
margin-top: 1.35em;
margin-top: 1.1em;
margin-bottom: 1.0em;
}
p {
margin-bottom: 1.94em;
margin-bottom: 3.3em;
}
}
111 changes: 67 additions & 44 deletions assets/sass/site/primary/_post-formats.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,61 +123,84 @@
}
}
}
/* Knowledge base, How to */
&-type-archive-video-tutorials,
&-type-archive-faq,
&-type-archive-knowledge-base,
&-type-archive-how-to {
.page-title {
margin-top: 0.54em;
text-align: center;
margin-top: 0.64em;
}
.wapu-terms {
.wapu-term {
&__title {
margin: 2.2em 0 1.275em;
}
}

}

.single {
&-video-tutorials,
&-faq,
&-knowledge-base,
&-how-to {
.entry-content {
margin-top: 0;
}
}
}

/* Knowledge base, How to */
.post-type-archive-knowledge-base,
.post-type-archive-how-to,
.tax-knowledge-base_category,
.tax-how-to_category {
.wapu-terms, .wapu_posts_wrap {
.wapu-term, .wapu-post {
&__title {
margin: .8em 0 1.275em;
}
.wapu-posts {
margin: 1.275em 0 2.05em;
list-style: none;
padding-left: 0;
}
.wapu-posts {
margin: 1.275em 0 1.05em;
list-style: none;
padding-left: 0;
position: relative;
li {
position: relative;
li {
position: relative;
padding-left: 18px;
margin: 8px 0;
a {
color: $color__link-hover;
&:hover {
color: $color__link;
}
}
&:before {
position: absolute;
content: "";
width: 7px;
height: 7px;
left: 0;
top: 10px;
border-radius: 100%;
background-color: $color__points;
}
}
}
.wapu-term__actions {
margin: 1.25em 0 3.45em;
padding-left: 18px;
margin: 8px 0;
a {
@include btn();
color: $color__link-hover;
&:hover {
color: $color__link;
}
}
&:before {
position: absolute;
content: "";
width: 7px;
height: 7px;
left: 0;
top: 10px;
border-radius: 100%;
background-color: $color__points;
}
}
}
.wapu-term__actions {
margin: 1.25em 0 1.45em;
a {
}
}
}

&-type-archive-video-tutorials,
&-type-archive-faq,
&-type-archive-knowledge-base,
&-type-archive-how-to {
.page-title {
text-align: center;
}
.tax-knowledge-base_category,
.tax-how-to_category {
#primary {
margin-top: 2.6em;
}
.wapu-terms, .wapu_posts_wrap {
.wapu-term, .wapu-post {
&__title {
margin: .54em 0 1.85em;
}
}
}

}
4 changes: 4 additions & 0 deletions assets/sass/site/primary/_posts-and-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
}
}

.single p img {
-webkit-box-shadow: 0 0 25px 1px #d1d1e2;
box-shadow: 0 0 25px 1px #d1d1e2;
}

.single, .blog, .search, .archive {
#primary, #primary-sidebar, #blog-sidebar {
Expand Down
2 changes: 1 addition & 1 deletion style.css

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions wapu-core/post-types/how-to/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
wapu()->utility()->meta_data->get_terms( array(
/*wapu()->utility()->meta_data->get_terms( array(
'type' => 'how-to_category',
'delimiter' => '<span>, </span>',
'before' => '<div class="post__cats">',
'after' => '</div>',
'echo' => true,
) );
) );*/
?>
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php /*the_title( '<h2 class="entry-title">', '</h2>' ); */?>
</header><!-- .entry-header -->

<div class="entry-content"><?php
the_title( '<h2 class="entry-title">', '</h2>' );

the_content();

Expand Down
5 changes: 5 additions & 0 deletions wapu-core/post-types/how-to/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
$object = get_queried_object();
$taxonomy = $object->taxonomy;

?>
<div class="wapu_posts_wrap"><?php
?><h2 class="wapu-post__title"><?php echo $object->name; ?></h2><?php

do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop_start', $taxonomy );

while ( have_posts() ) {
Expand All @@ -18,3 +22,4 @@
}

do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop_end', $taxonomy );
?></div><?php
11 changes: 6 additions & 5 deletions wapu-core/post-types/knowledge-base/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
wapu()->utility()->meta_data->get_terms( array(
'type' => 'knowledge-base_category',
/*wapu()->utility()->meta_data->get_terms( array(
'type' => 'how-to_category',
'delimiter' => '<span>, </span>',
'before' => '<div class="post__cats">',
'after' => '</div>',
'echo' => true,
) );
) );*/
?>
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php /*the_title( '<h2 class="entry-title">', '</h2>' ); */?>
</header><!-- .entry-header -->

<div class="entry-content"><?php

the_title( '<h2 class="entry-title">', '</h2>' );

the_content();

wp_link_pages( array(
Expand Down
8 changes: 7 additions & 1 deletion wapu-core/post-types/knowledge-base/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
$object = get_queried_object();
$taxonomy = $object->taxonomy;


?>
<div class="wapu_posts_wrap"><?php
?><h2 class="wapu-post__title"><?php echo $object->name; ?></h2><?php

do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop_start', $taxonomy );

while ( have_posts() ) {
Expand All @@ -17,4 +22,5 @@
do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop', $taxonomy );
}

do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop_end', $taxonomy );
do_action( 'wapu_core/taxonomy/' . $taxonomy . '/loop_end', $taxonomy );
?></div><?php
6 changes: 3 additions & 3 deletions wapu-core/post-types/video-tutorials/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
wapu()->utility()->meta_data->get_terms( array(
'type' => 'video-tutorials_category',
/*wapu()->utility()->meta_data->get_terms( array(
'type' => 'how-to_category',
'delimiter' => '<span>, </span>',
'before' => '<div class="post__cats">',
'after' => '</div>',
'echo' => true,
) );
) );*/
?>
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
</header><!-- .entry-header -->
Expand Down

0 comments on commit 5cfad06

Please sign in to comment.