Skip to content

Commit

Permalink
Merge pull request #8 from FameThemes/development
Browse files Browse the repository at this point in the history
fixed multiple h1 tag and add custom logo
  • Loading branch information
congthien authored Jul 25, 2017
2 parents 6aef4f6 + 516bd6d commit d330cda
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
CHANGELOG
====================================================================

## 1.0.7
* Fixed multiple H1 tag
* Add custom logo

## 1.0.6
* Fixed escape translate string issue in theme dashboard.
* Fixed escape translate string in single post.
Expand Down
2 changes: 2 additions & 0 deletions assets/sass/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

.site-branding .site-title a {
font-family: $font_heading;
color: #000;
text-decoration: none;
}

.site-description {
Expand Down
1 change: 1 addition & 0 deletions assets/sass/_posts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
.entry-title {
margin-top: 0px;
margin-bottom: 20px;
line-height: 1.2;
@include rem('font-size', 44px);
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: http://www.famethemes.com/themes/patus
Author: FameThemes
Author URI: http://www.famethemes.com
Description: Patus is a Personal Blogging Theme for WordPress and an effortlessly tool for publishers of all kind, cherished for its flexibility, clean layouts and speed. It’s totally responsive so it adapts to your style as well as the device it’s viewed on.
Version: 1.0.6
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: patus
Expand Down
16 changes: 14 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ function patus_setup() {
'default-color' => 'ffffff',
'default-image' => '',
) ) );

/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support( 'custom-logo', array(
'height' => 65,
'width' => 180,
'flex-width' => true,
'flex-height' => true,
) );
}
endif; // patus_setup
add_action( 'after_setup_theme', 'patus_setup' );
Expand All @@ -78,8 +90,8 @@ function patus_widgets_init() {
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'patus_widgets_init' );
Expand Down
18 changes: 12 additions & 6 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@
<header id="masthead" class="site-header" role="banner">
<div class="container">
<div class="site-branding">
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
</a>
<?php endif; // End header image check. ?>
<?php
if ( function_exists( 'has_custom_logo' ) ) {
if ( has_custom_logo()) {
the_custom_logo();
}
}
?>
<?php if ( is_front_page() && is_home() ) { ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php } else { ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php } ?>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>
</div>

Expand Down
10 changes: 3 additions & 7 deletions inc/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* @package Patus
*/

/**
* Set up the WordPress core custom header feature.
*
Expand All @@ -26,22 +25,19 @@ function patus_custom_header_setup() {
) ) );
}
add_action( 'after_setup_theme', 'patus_custom_header_setup' );

if ( ! function_exists( 'patus_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see patus_custom_header_setup().
*/
function patus_header_style() {
$header_text_color = get_header_textcolor();

$header_text_color = get_header_textcolor();
// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
if ( HEADER_TEXTCOLOR == $header_text_color ) {
if ( get_theme_support( 'custom-header', 'default-text-color' ) == $header_text_color ) {
return;
}

// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css">
Expand All @@ -67,7 +63,6 @@ function patus_header_style() {
<?php
}
endif; // patus_header_style

if ( ! function_exists( 'patus_admin_header_style' ) ) :
/**
* Styles the header image displayed on the Appearance > Header admin panel.
Expand Down Expand Up @@ -100,6 +95,7 @@ function patus_admin_header_style() {
}
endif; // patus_admin_header_style


if ( ! function_exists( 'patus_admin_header_image' ) ) :
/**
* Custom header image markup displayed on the Appearance > Header admin panel.
Expand Down
2 changes: 1 addition & 1 deletion inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function patus_posted_on() {
}

if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
echo ' <span class="comments-link">';
comments_popup_link( esc_html__( '0 Comment', 'patus' ), esc_html__( '1 Comment', 'patus' ), esc_html__( '% Comments', 'patus' ) );
echo '</span>';
}
Expand Down
5 changes: 4 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Theme URI: http://www.famethemes.com/themes/patus
Author: FameThemes
Author URI: http://www.famethemes.com
Description: Patus is a Personal Blogging Theme for WordPress and an effortlessly tool for publishers of all kind, cherished for its flexibility, clean layouts and speed. It’s totally responsive so it adapts to your style as well as the device it’s viewed on.
Version: 1.0.6
Version: 1.0.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: patus
Expand Down Expand Up @@ -1460,6 +1460,8 @@ input, textarea, input[type="submit"]:focus {

.site-branding .site-title a {
font-family: "Dosis", Helvetica, Arial, sans-serif;
color: #000;
text-decoration: none;
}

.site-description {
Expand Down Expand Up @@ -1956,6 +1958,7 @@ input, textarea, input[type="submit"]:focus {
.entry-header .entry-title {
margin-top: 0px;
margin-bottom: 20px;
line-height: 1.2;
font-size: 44px;
font-size: 4.4rem;
}
Expand Down
4 changes: 2 additions & 2 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
Expand All @@ -26,7 +26,7 @@
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'patus' ),
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'patus' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
?>
Expand Down

0 comments on commit d330cda

Please sign in to comment.