Announcement

Collapse
No announcement yet.

Custom Single.php

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom Single.php

    Hi folks!

    I read a lot of info about the custom templates, but I cant do what I want

    I'm using a Go Portfolio Plugin to display my portfolio and I can create my own post to share this.

    The problem is those post have the same format as my blog post (author, comments ...) and i want to have a custom post for this projects.

    So, the Go Portfolio support told me I have to create a custom simple.php and call it simple-portfolio.php (or the name I want but with this format)

    And here is where I came the problem, I dont know exactly how to made it and how to personalize deleting all the blog info (author, comments ...)

    Thanks so much for help!

    P.D: I use Dynamyk Website Builder

    Cheers

  • #2
    Here's a tutorial for single.php
    http://wpsites.net/web-design/basic-...sis-beginners/


    PHP Code:
    genesis(); 
    The genesis function includes (author, comments). So you need lots of remove_action.

    Remove Author Box
    https://gist.githubusercontent.com/s...raw/remove.php
    PHP Code:
      //* Remove the author box on single posts HTML5 Themes remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); 
    Remove Comments
    PHP Code:
      //* Remove comments template remove_action( 'genesis_after_entry', 'genesis_get_comments_template' );     //* Remove edit link add_filter( 'genesis_edit_post_link' , '__return_false' ); 
    Have a look at the code from Dynamik's landing page, It removes a lot. That should help you.
    PHP Code:
    <?php
    /*
    Template Name: Landing
    */

    // Force full-width page layout setting
    add_filter'genesis_pre_get_option_site_layout''__genesis_return_full_width_content' );

    // Remove header, navigation, breadcrumbs, footer, footer widgets
    remove_action'genesis_header''genesis_header_markup_open');
    remove_action'genesis_header''genesis_do_header' );
    remove_action'genesis_header''genesis_header_markup_close'15 );
    remove_action'genesis_before_header''genesis_do_nav' );
    remove_action'genesis_after_header''genesis_do_nav' );
    remove_action'genesis_before_header''genesis_do_subnav' );
    remove_action'genesis_after_header''genesis_do_subnav' );
    remove_action'genesis_before_loop''genesis_do_breadcrumbs' );
    remove_action'genesis_footer''genesis_footer_markup_open');
    remove_action'genesis_footer''genesis_do_footer' );
    remove_action'genesis_footer''genesis_footer_markup_close'15 );

    genesis();
    Removing Post Info/Meta
    http://wpsites.net/web-design/modify-post-info-genesis/
    https://wpbeaches.com/removing-autho...s-child-theme/
    Last edited by Kellylise; 06-11-2015, 04:37 PM.

    Comment


    • #3
      Thankssss so much Kellylise for help!

      I could do what I wanted.

      Very helpful!

      Cheers

      Comment

      Working...
      X