Last active
March 22, 2018 14:24
-
-
Save krispassion/722b1443e715b659c9335aacde327d32 to your computer and use it in GitHub Desktop.
generatepress-child
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* GeneratePress child theme functions and definitions. | |
* | |
* Add your custom PHP in this file. | |
* Only edit this file if you have direct access to it on your server (to fix errors if they happen). | |
*/ | |
function generatepress_child_enqueue_scripts() { | |
if ( is_rtl() ) { | |
wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 ); | |
add_action( 'generate_after_entry_content', 'jam_custom_post_type_post_nav' ); | |
function jam_custom_post_type_post_nav() { | |
if ( 'project' == get_post_type() ) : ?> | |
<footer class="entry-meta"> | |
<?php generate_entry_meta(); ?> | |
<?php if ( is_single() ) generate_content_nav( 'nav-below' ); ?> | |
</footer><!-- .entry-meta --> | |
<?php endif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying all pages. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
get_header(); ?> | |
<div id="primary" <?php generate_content_class();?>> | |
<main id="main" <?php generate_main_class(); ?>> | |
<?php | |
/** | |
* generate_before_main_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_before_main_content' ); | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'content', 'single' ); | |
?> | |
<div class="field"> | |
<hr/> | |
<h3>Client: <?php the_field('client'); ?></h3> | |
<hr/> | |
<h3>Author: <?php the_field('author'); ?></h3> | |
<hr/> | |
<h3>Year: <?php the_field('year'); ?></h3> | |
<hr/> | |
<h3>Location: <?php the_field('location'); ?></h3> | |
</div> | |
<?php | |
// If comments are open or we have at least one comment, load up the comment template. | |
if ( comments_open() || '0' != get_comments_number() ) : ?> | |
<div class="comments-area"> | |
<?php comments_template(); ?> | |
</div> | |
<?php endif; | |
endwhile; | |
/** | |
* generate_after_main_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_after_main_content' ); | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php | |
/** | |
* generate_after_primary_content_area hook. | |
* | |
* @since 2.0 | |
*/ | |
do_action( 'generate_after_primary_content_area' ); | |
generate_construct_sidebars(); | |
get_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: GeneratePress Child | |
Theme URI: https://generatepress.com | |
Description: Default GeneratePress child theme | |
Author: Tom Usborne | |
Author URI: https://tomusborne.com | |
Template: generatepress | |
Version: 0.1 | |
*/ | |
/* ANOTAÇÕES GERAIS | |
cores: | |
vermelho compleentar: #612128 | |
laranja gop + on hover: #A13643 | |
*/ | |
.navigation-search input[type="search"], | |
.navigation-search input[type="search"]:active, | |
.navigation-search input[type="search"]:focus { | |
color: #000; | |
background-color: #fff; | |
} | |
.main-navigation li a:after, | |
.secondary-navigation li a:after { | |
opacity: 0; | |
transition: opacity 500ms ease-in-out; | |
content: ""; | |
} | |
.main-navigation .main-nav ul li[class*="current-menu-"] > a:after, | |
.main-navigation .main-nav ul li:hover > a:after, | |
.main-navigation .main-nav ul li.sfHover:hover > a:after, | |
.secondary-navigation .main-nav ul li[class*="current-menu-"] > a:after, | |
.secondary-navigation .main-nav ul li:hover > a:after, | |
.secondary-navigation .main-nav ul li.sfHover:hover > a:after { | |
content: ""; | |
display: block; | |
width: 100%; | |
border-bottom: 2px solid #A13643; | |
position: relative; | |
top: -10px; | |
opacity: 1; | |
} | |
/* custom items in posts | |
CRIADA DIV .field */ | |
.field { | |
display: block; | |
} | |
.field h3 { | |
font-family: inherit; | |
font-weight: normal; | |
font-size: 1.2em; | |
letter-spacing: .1em; | |
line-height: 1em; | |
margin:0px; | |
} | |
.field h4 { | |
font-family: inherit; | |
font-weight: normal; | |
font-size: 3em; | |
letter-spacing: .1em; | |
line-height: 1em; | |
margin:0px; | |
} | |
.field hr { | |
display: block; | |
height: 1px; | |
border: 0; | |
border-top: 3px solid #222; | |
margin: 1em 0; | |
padding: 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment