olivier.moreau

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • in reply to: Blog Category Split-Off? #63400

    olivier.moreau
    Participant
    Post count: 48
    in reply to: Blog Category Split-Off? #63380

    olivier.moreau
    Participant
    Post count: 48

    Hi Lang and Brad

    Although my project is very different in its content, I share the same technical problem : a “split-off” blog as you call it.
    My post about it is : http://www.studiopress.com/forums/topic/what-is-the-best-way-to-create-a-custom-blog-template/

    I just checked Brad’s tutorial and it’s a very complete solution based on Custom Post Type. However if you just want to split-off some posts based on the “Vignette” category (and in my case on the “expos” category) I don’t think that will do it.

    A very simple template to split off your posts using the “vignette” category (let’s say ID=135) :

    
    <?php
    /*
    Template Name: Blog_splitoff
    */
    ?>
    <?php get_header(); ?>
    <div class="content">
    <?php
    $temp = $wp_query;
    $wp_query = NULL;
    		$wp_query = new WP_Query();
    		$wp_query->query('cat=135'); 
    		$tb_counter = 1;
    		while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    		<div <?php if(function_exists('post_class')) : ?><?php post_class(); ?><?php else : ?>class="post post-<?php the_ID(); ?>"<?php endif; ?>>
    			<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s'),the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
    			<div>
    				<?php global $more; $more = 0; the_content(); ?>
    				<?php if ($tb_counter == 1) { ?>
    				<?php  } ?>
    			</div><div class="clear"></div>
    		</div><div class="clear"></div>
    		<?php $tb_counter++; endwhile; ?>
    		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    		<?php $wp_query = NULL; $wp_query = $temp;?>
    	</div>
    <?php get_footer(); ?>
    
    

    This code comes from various source (WP codex and such) and it is NOT optimized for Genesis but it works.
    You just create an empty page using it, put that page in you menu and that’s it.
    I think there must be simpler with a Genesis filter using the ‘blog_cat’ value but I can’t yet figure out how it works.

    in reply to: What is the best way to create a custom blog template ? #63159

    olivier.moreau
    Participant
    Post count: 48

    Hi Brad,
    Thanks for your reply, I’m sure you have the solution !

    It is precisely because I want to use Genesis Simple Sidebars (GSS) that I have this problem… You see, I started with a standard page about the expos and I used GSS to have a specific sidebar. That was fine but it is a pain to do that page manually. It is much more efficient to just select posts with the category “expos” (ID = 135) and get that page filled up automatically. I started with a menu link to the selected posts but that doesn’t create a real page where I can use GSS. Then I used a plugin, but it’s not easy to respect my graphic chart with that solution.

    So I decided to create a custom made template (thanks again to show me that technique in a previous question that you answered). I got that custom template working fine but when I put in the GSS sidebar the page looks weird (as you can see at http://omoro.fr/expositions/). Thus I figured out that I should start from the standard blog template of Genesis (page_blog.php) and simply change the input. I think the control variable is ‘blog_cat’ but how can I do that ?

    To summarize : How can we create a custom blog template where the only change is the selection of posts ? Once this template is OK, it’s easy to add GSS and all kind of other stuff in the pages using it.

    Thanks in advance for your smart advices.

    in reply to: After Landing ? #59036

    olivier.moreau
    Participant
    Post count: 48

    For the Agency Theme to remove breadcrumps in the page_custom.php the code is :

    remove_action( ‘genesis_before_content_sidebar_wrap’, ‘genesis_do_breadcrumbs’ );

    It might be different for other themes, just check in function.php if there is a
    /** Relocate breadcrumbs */

    in reply to: After Landing ? #59025

    olivier.moreau
    Participant
    Post count: 48

    Hi Brad,

    Thanks for the last tip on the breadcrumb. Now my custom page is really perfect.

    Your post with the totally independent custom page was indeed very good and much appreciated. I’m going to use that technique for another purpose. With your technique we can have several models of page without using plugins. It’s incredible how easy it is to create new template (well at least when someone is kind enough to show the way). Can you suggest some book so I can understand a bit better how all that works. For instance, I cannot figure out why a simple /*comment*/ is necessary to create a new template.

    Best regards

    in reply to: After Landing ? #58850

    olivier.moreau
    Participant
    Post count: 48

    Hi Brad

    The first solution is very interesting in case you want a custom page with it’s own widget.

    The second solution is much simpler. To summarize it for the benefit of other readers :

    1. Download the template “home.php” locally via FTP
    2. Modify the template by adding on top :
    /*
    Template Name: Custom Home Page
    */
    3. Rename the template “page_custom.php” and upload it
    4. Create a new page that is totally empty. You can call it “Home” and use the permalink : mysite.com/home
    5. Use the new “Custom Home Page” template for that new page (if it’s not showing you forgot step 2).
    6. Create a new page that contains whatever you want and use the “Landing” template.
    7. On that page make a link to your custom page (simple link or big flashy button).
    8. In the Genesis settings set the “Static Front Page” to the Landing page
    9. If you want to skip the landing page, reset the Genesis settings to “Your latest posts”.

    That’s it Landing page AND classic Home page to have catchy sites !
    ============

    However there is still a minor problem with all that.
    That new “Custom Home Page” has breadcrumbs like any other pages because in Genesis settings we have :
    Breadcrumb Enable on:
    Homepage Posts Pages Archives 404 Page Attachment Page (no custom_page !)

    Brad thanks again for your outstanding support (even on Sunday evening !)

    in reply to: After Landing ? #58795

    olivier.moreau
    Participant
    Post count: 48

    Hi Brad,

    This is so cool ! I tried it right away and it works. You can check the site.

    However I’d prefer to use the same widgets on the classic home template and the custom_home template. Like that when I want an intro page to do special announcement, I set the “Static Front Page” to the Landing page (that redirect to the custom_home with a button) and when there’s nothing special, I just use the setting “Your latest posts”.

    Do you think it’s possible ?

    in reply to: After Landing ? #58783

    olivier.moreau
    Participant
    Post count: 48

    Hi Navitas and Brad

    The problem can be summarized to : How to create a page and assign the .home template to it ?

    In the Agency theme there are only Default, Blog, Archive and Landing as templates choices…

    in reply to: After Landing ? #58707

    olivier.moreau
    Participant
    Post count: 48

    Hi Brad
    My site is just in preparation and my question is neither site or theme specific.
    Yet you can take a look at groupe-css.com
    I’d like to set it to reach the static page groupe-css.com/landing (it’s just a youtube video for now) and then click on a button and reach the home page.
    Any idea how to do that ?


    olivier.moreau
    Participant
    Post count: 48

    Hi again John

    I made more changes in the code and got it just the way I like.

    For change #1, I changed (in fonction.php) the action hook genesis_header to genesis_header_right. I did not change the priority. I found that by installing the plugin Genesis Hook to see what was going on.

    That change put the “Menu” just beside the search bar. Unfortunately that search box was a bit too large so I also changed its width in style.css


    /* Search Form

    .s {
    border: 1px solid #aaa;
    color: #666;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    margin: 0 -7px 0 0;
    padding: 6px 5px;
    width: 120px; /*OMCSS old value =170px*/
    }

    For change #2, I simply followed your suggestion : I changed the action hook genesis_before_footer to genesis_after_footer.
    In my case the menu looks better there but before the footer is fine too.

    Your code could be included in the “Code Snippets” of Studiopress… I’m sure many people could use it.

    This is the first time I played with Genesis Hooks and I now understand the power it gives. This is a very cool feature of the framework !

    This is also the first time I used this forum and I’m very impressed with the quality of support I received from you. Thanks a lot again.


    olivier.moreau
    Participant
    Post count: 48
    This reply has been marked as private.

    olivier.moreau
    Participant
    Post count: 48
    This reply has been marked as private.

    olivier.moreau
    Participant
    Post count: 48

    Hi again John

    I tried your code and it works just fine. Great stuff, thanks a lot.

    However I’d like to make two changes :

    1- At top the “Menu v” is in the header and it would look nicer under the header (same place than the menu on large screen)

    I changed :
    .mobile-footer-nav-link {
    display: inline-block;
    float: right;
    /* line-height: 2; */ /* adjust to suit your theme - Metro needs this */
    margin: 8px; /* adjust to suit your theme - CHANGED TO 120px */
    max-width: 30%; /* for iOS */
    white-space: nowrap;
    }

    but there is a bad side effect :-( A huge empty space under the menu…

    2 – At the bottom, I’d like to display the menu under the footer instead of above.
    I just cannot figure out where to do that in the code.


    olivier.moreau
    Participant
    Post count: 48

    Thanks for your long reply John.
    I fully agree about your philosophy of “learning by mistakes as long as you have a backup”. When I do modify CSS or PHP files it’s with FTP plus jEdit and not with the yucky build in editor. I also always leave some /*TAG*/. So far, I only did small changes (like colors or font size) but your example is a HUGE modification and I don’t understand all of it. I really appreciate that you offer to help if I get stuck, although I hope to not need your support. I’ll let you know when it’s done…


    olivier.moreau
    Participant
    Post count: 48

    Hi John

    Thanks for sharing your solution but I’m a bit afraid to try it when I read :
    This CSS that I’ve worked up should work on any Genesis website, though you may need to modify it to blend in seamlessly with your website.
    I’m not at ease with modifying CSS or PHP and I would expect to have a responsive menu directly in a pro theme like Genesis Agency. I noticed that the new basic WP theme “twenty thirteen” contains a responsive menu and also a search tool looking just fine on a smartphone…
    Another thinks that bothers me is changing a child theme which is not mine. When Studiopress will do an update, we’ll have to inject that code again ?

Viewing 15 posts - 16 through 30 (of 30 total)