Closed nickburne closed 9 years ago
Ahoy! These pages never told their right Post IDs(but the ID of the first post, ie the latest post or the product contained). We are now able to do it for the shop page. StoreFront doesn't have html for the title of the page for a blog page. I tried to get it done via
add_action('storefront_loop_post', 'the_title'); add_action('storefront_single_post', 'the_title'); add_action('storefront_page', 'the_title');
but none seemed to give the desired results. So we got it done using jQuery. Prepended <header class="entry-header blog-header"><h1 class="entry-title" itemprop="name"><?php $current_post_id = get_option( 'page_for_posts' );echo get_the_title($current_post_id); ?></h1></header> to #main, Added class blog-header to hide only the main title (it hid all the titles of all the posts on the page which didn't seem right to me).
So that's pretty much it for now kindly lemme know how it works for you.
One last thing: Since by default the title is not visible I've currently set it to appear only if its explicitly set to show, is that all right?
To confirm I do NOT want this implemented yet. Just research.
The jQuery solution means this happens after the page loads. Correct?
Yep, right. Removed jQuery prepend, We are still able to do it for the shop (courtesy get_option( 'woocommerce_shop_page_id' )) without jQuery.
Ok - but not blog archive page? Just trying to understand why not...
http://codex.wordpress.org/Function_Reference/post_type_archive_title
Yep we can retrieve the post type title, I did it by using $current_post_id = get_option( 'page_for_posts' );echo get_the_title($current_post_id); The question is where to populate it. Using jQuery we prepend it to #main.
Ok, i understand. Let's wait on this for a bit. I will assign to Jordan for discussion with me when he starts...
@jordankeats Discuss with Nick!
James K said: You should be able to use is_archive() for blog archives? Then is_category() for individual categories. You'll need to decide whether you want people to be able to have specific colors for specific categories though. I'm thinking they probably will...
@shramee - woothemes said we should be able to use is_archive() for blog archives?
Would this work? Please confirm.
Will discuss when you wake up ; )
I'm ready.
Hi
Lemme just go through it once again : P
Yeah we can do it for categories, and even create individual category specific options for this.
The problem lies with the blog template which doesn't contain title, we can get the title but we can't need to put it somewhere I think client side scripting is our only option for that right now since its not there in the Blog template : (
Ok - we don't need to worry about this anymore...
Are we able to show/hide titles on archive pages such as the blog archive page and the shop archive page?