yonk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: front-page.php as fast as possibleThank you for your answer !
I don’t see really the difference between a page template and the front-page.php I presented above ( genesis() function doesn’t appear there but it is a the end of the page so this page works as a template, isn’t it ? ). For the parts who needs to be dynamic, I use widget or shortcode but for the rest, I don’t really know how to manage it in php.
For exemple how can I say in php to generate this simple code to get two buttons ? ( It’s a shame to use a heavy widget just for that, to add personal CSS because it’s not exactly the form we want, and to be bothered by the wrong html heading tags ? )<!-- Album section --> <section id="album" class="parallax"> <article class="wrap"> <div id="photos" class="one-half first"> <a href="http://localhost/wordpress/albumphoto/"> <h3>Albums photos</h3> </a> </div> <div id="videos" class="one-half"> <a href="http://localhost/wordpress/albumvideo/"> <h3>Albums vidéos</h3> </a> </div> </article> </section>But I understand what you mean and I’m going to try to have something more dynamic. When you talk about the <?php echo get_stylesheet_directory_uri() ?>, I don’t really understand. I use it in my function.php, to enqueue css or script, or to get images from my theme directory, but I don’t see where to use it into my front-page.php ?
Thank you so much for your attention and sorry for my so bad level in php, and english ! 🙂Forum: Fixing WordPress
In reply to: Same thumbnail for Custom-post-typeI changed a little bit your code because it didn’t work :
add_filter( 'genesis_pre_get_image', 'default_featured_image_for_albumphoto', 10, 1 ); function default_featured_image_for_albumphoto( $post ) { if ( 'albumphoto' == get_post_type() ) : echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/photo-icon.jpg" />'; else: return $post; endif; }But I wouldn’t have done it all by myself…
I thank you very very much !Forum: Fixing WordPress
In reply to: Same thumbnail for Custom-post-typethank you !
But I’m really not an expert…
I put this code into function.php (I’m doing with genesis framework, so don’t have template)add_action(‘init’,’album_photo_thumbnail’);
function album_photo_thumbnail(){
if ( is_post_type(‘albumphoto’)) {
the_thumbnail(‘thumbnail’, ‘wp-content/upload/2015/05/photo-icon.jpg’)
}
}But it’s not working…
Can’t I create the thumbnail into the function that create the post type ?