[Resolved] Custom Blog Post Template for importing csv file

Home Forums Support Custom Blog Post Template for importing csv file

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #348027
    Robert

    Hi I need to import over 200 posts into a blog, I can import them no problem using .csv , but then:

    As you can see, I still need to open each post and make them full width and untick a bunch of settings, is there any way that it can be done automatically.

    I use Elementor for the final template
    All Import to fetch the posts

    GeneratePress 1.3.48
    GP Premium 1.3.1
    #348243
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    1. The page header. Currently, there’s no way to do this globally. However, there will be in GPP 1.4: https://vimeo.com/223381628

    2. The disable elements meta box. Are you wanting to disable these on all single posts? If so, I can give you some code.

    3. Sidebar layout. You can set this in “Customize > Layout > Sidebars”.

    4. Full width content. Again, on all single posts? If so, I’ll give you the code.

    Thanks!

    #348259
    Robert

    Hi Tom the code would be appreciated since if I do not need to keep ticking checkboxes and only do the header it will save me time 🙂

    Robert

    #348314
    Tom
    Lead Developer
    Lead Developer

    So, only on single posts, you want to disable:

    Top bar
    Header
    Secondary Navigation
    Content title
    Footer

    And you want the container to be full width?

    Correct?

    #348317
    Robert

    yip that will do it 🙂

    #348339
    Tom
    Lead Developer
    Lead Developer

    Try this:

    add_action( 'wp', 'tu_disable_global_elements' );
    function tu_disable_global_elements() {
      if ( is_single() ) {
        remove_action( 'generate_before_header','generate_top_bar', 5 );
        remove_action( 'generate_header','generate_construct_header' );
        remove_action( 'generate_footer','generate_construct_footer' );
        add_filter( 'generate_show_title', '__return_false' );
      }
    }

    Then add this CSS:

    .single .secondary-navigation {
        display: none;
    }
    
    .single .container.grid-container {
    	max-width: 100%;
    }
    
    .single.no-sidebar.separate-containers .site-main {
    	margin: 0;
    }
    
    .single.separate-containers .inside-article,
    .single.one-container .site-content {
    	padding: 0;
    }
    #348595
    Robert

    thank you i will try it now and get back to you

    #348680
    Robert

    Tom thank you so much

    I created a basic child theme added the functions code and css in to it and left everything default except the header options and tested it, perfect

    You Rock

    #348892
    Tom
    Lead Developer
    Lead Developer
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.