Skip to content

Commit

Permalink
issue #358
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaled Mohammed committed Jan 3, 2017
1 parent ad44924 commit 321d85f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
20 changes: 14 additions & 6 deletions templates/design-manager/design-1/frontpage.php
@@ -1,4 +1,4 @@
<?php global $redux_builder_amp;
<?php global $redux_builder_amp;
$post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
$template = new AMP_Post_Template( $post_id );?>
<!doctype html>
Expand All @@ -18,28 +18,36 @@
<style amp-custom>
<?php $this->load_parts( array( 'style' ) ); ?>
<?php do_action( 'amp_post_template_css', $this ); ?>
#title{
text-align: center;
}
</style>
</head>
<body class="single-post amp-wp-frontpage">
<?php $this->load_parts( array( 'header-bar' ) ); ?>

<h1 id='title'>
<?php global $redux_builder_amp;
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
echo get_the_title( $ID ) ;
?>
</h1>
<?php do_action( 'ampforwp_after_header', $this ); ?>

<div class="amp-wp-content the_content"> <?php
<div class="amp-wp-content the_content"> <?php

do_action( 'ampforwp_before_post_content', $this );

// Normal Front Page Content
if ( ! $amp_custom_content_enable ) {
echo $template->data['post_amp_content'];
} else {
// Custom/Alternative AMP content added through post meta
// Custom/Alternative AMP content added through post meta
echo $template->data['ampforwp_amp_content'];
}
}

do_action( 'ampforwp_after_post_content', $this );
?>

</div>

<div class="amp-wp-content post-pagination-meta">
Expand Down
9 changes: 7 additions & 2 deletions templates/design-manager/design-2/frontpage.php
Expand Up @@ -22,7 +22,12 @@
</head>
<body class="single-post">
<?php $this->load_parts( array( 'header-bar' ) ); ?>

<h1 id='title'>
<?php global $redux_builder_amp;
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
echo get_the_title( $ID ) ;
?>
</h1>
<?php do_action( 'ampforwp_after_header', $this ); ?>

<main>
Expand All @@ -34,7 +39,7 @@
} else {
// Custom/Alternative AMP content added through post meta
echo $template->data['ampforwp_amp_content'];
}
}

do_action( 'ampforwp_after_post_content', $this ); ?>

Expand Down
7 changes: 5 additions & 2 deletions templates/design-manager/design-2/style.php
Expand Up @@ -405,7 +405,7 @@ function ampforwp_additional_style_input_2( $amp_template ) {
box-shadow: none
}
.amp-wp-content.post-pagination-meta{
max-width: 1030px;
max-width: 1030px;
}
.single-post .ampforwp-social-icons.ampforwp-social-icons-wrapper {
display: block;
Expand Down Expand Up @@ -812,7 +812,10 @@ function ampforwp_additional_style_input_2( $amp_template ) {
max-width: 100%;
}


/*title for Front page*/
#title {
text-align: center;
}


/* Custom Style Code */
Expand Down

0 comments on commit 321d85f

Please sign in to comment.