8000 Home · srikat/one-pager-genesis Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
srikat edited this page Aug 16, 2015 · 6 revisions

Welcome to the one-pager-genesis wiki!

FAQ

How to make Portfolio featured images link to CPT single page rather than having it open in a lightbox?

In functions.php replace

$image = '<div class="portfolio-image"><a rel="prettyPhoto[pp_gal]" href="' . genesis_get_image( array('format' => 'url') ) . '">' . genesis_get_image( array('format' => 'html', 'size' => 'portfolio') ) . '</a></div> ';

with

$image = '<div class="portfolio-image"><a rel="bookmark" href="' . apply_filters( 'the_permalink', get_permalink() ) . '">' . genesis_get_image( array('format' => 'html', 'size' => 'portfolio') ) . '</a></div> ';

I want to use inner pages as well. But the nav menu links do not work. Can I use a different menu on inner pages?

Yes. Follow http://sridharkatakam.com/replace-header-right-widget-area-conditionally-genesis/.

How can I display excerpts below Portfolio images?

In front-page.php, change

<?php echo do_shortcode('[display-posts post_type="portfolio" image_size="portfolio" posts_per_page="6" wrapper="div"]'); ?>

to

<?php echo do_shortcode('[display-posts post_type="portfolio" image_size="portfolio" posts_per_page="6" wrapper="div" include_excerpt="true"]'); ?>

Source: https://github.com/billerickson/display-posts-shortcode/wiki

How to make the Welcome section fill the screen?

Full view welcome section

Create a file named home.js in /js having:

jQuery(function( $ ){

$('#welcome') .css({'height': (($(window).height()))+'px'});
$(window).resize(function(){
	$('#welcome') .css({'height': (($(window).height()))+'px'});
});

});

Then add this in front-page.php:

//* Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'enqueue_custom_scripts' );
function enqueue_custom_scripts() {

	// for setting the height of Welcome section equal to that of viewport
	wp_enqueue_script( 'home', get_bloginfo( 'stylesheet_directory' ) . '/js/home.js', array( 'jquery' ), '1.0.0', true );

}

How to replace Portfolio section on the front page with Blog?

Screenshots:

  1. In front-page.php, replace
<!-- Portfolio section -->
<section id="portfolio" class="parallax">
	<article class="wrap">
		<h2>Our Portfolio</h2>
		<?php echo do_shortcode('[display-posts post_type="portfolio" image_size="portfolio" posts_per_page="6" wrapper="div"]'); ?>
	</article>
</section>

with

<!-- Blog section -->
<section id="blog" class="parallax">
	<article class="wrap">
		<h2>From Our Blog</h2>
		<?php echo do_shortcode( '[display-posts post_type="post" image_size="portfolio" posts_per_page="6" wrapper="div"]' ); ?>
	</article>
	<a href="/blog" class="more-link">More blog posts &raquo;</a>
</section>
  1. In style.css,

a) replace all occurrences of #portfolio with #blog.

b) add

#blog .wrap {
	padding-bottom: 0;
}

#blog a.image {
	display: block;
}

a.more-link {
	text-align: right;
}
  1. In functions.php delete or comment out

add_filter( 'display_posts_shortcode_output', 'one_pager_display_posts_shortcode_output', 10, 9 );

0