- This topic has 5 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
October 2, 2019 at 3:13 am #1024073
Jan
Hello.
I have a question: My website have 5000 pages with layout “Content / Right sidebar” (our standard layout).
Now, we want to upload 10.000 extra pages with a layout no-sidebar.How can we do this? We use all import pro to upload these pages.
Hope to hear from you,
Friendly regards,
Jan
October 2, 2019 at 6:29 am #1024204David
StaffCustomer SupportHi there,
thats a lot of content 🙂 Are these pages or posts ? As you would need some way of differentiating the content from existing such as a Taxonomy.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 2, 2019 at 6:30 am #1024205Jan
Hi David. Indeed a lot of content (hotels).
Those are pages.
October 2, 2019 at 7:11 am #1024244David
StaffCustomer SupportAnd i assume the existing content are also Pages ?
First thing that comes to mind is to register a taxonomy for the pages you’re going to import then use that for a Layout Elements Display Rules where you can remove the sidebar.
Ultimately we need something to differentiate the two that isn’t going to change.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 2, 2019 at 7:15 am #1024248Jan
Yes. Existing content are also Pages.
How can i register a taxonomy for the pages that i am going to import?
October 2, 2019 at 7:46 am #1024278David
StaffCustomer SupportBefore doing any of this i suggest you test it out using backup/staging sites of both the current and export data site.
This PHP Snippet will register a custom taxonomy called
Element Controls
with a default term ofDisplay Rules
for your pages:add_action( 'init', 'element_control_custom_tax' ); function element_control_custom_tax() { register_taxonomy( 'element-controls', array( 'post', 'page' ), array( 'label' => __( 'Element Controls' ), 'rewrite' => array( 'slug' => 'element-controls' ), 'hierarchical' => true, 'show_in_rest' => true, ) ); register_taxonomy_for_object_type( 'element-controls', 'page' ); $parent_term = term_exists( 'element-controls', 'element-controls' ); // array is returned if taxonomy is given $parent_term_id = $parent_term['term_id']; // get numeric term id wp_insert_term( 'Use Display Rules', // the term 'element-controls', // the taxonomy array( 'description'=> 'Post will use the Display Rule Terms', 'slug' => 'display-rules', 'parent'=> $parent_term_id ) ); }
You would need it on both sites ( the import to and export from ).
Then on the site you want to export from you can set the category for each of your pages.
I don’t have a solution for pragmatically setting the term on all your export pages, so you would need to use Bulk Edit ( 999 pages at a time ) to include the term.I believe in WP All Import you have the option to include Taxonomies / Custom Taxonomies.
May be worth doing a test of one or two pages to begin with.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.