Build WordPress as separate files and export together as one?« Back to Questions List

Excuse me, can you tell me how I could build out part of a WordPress theme as separate files and then export them together as one.

Added July 15, 2016 4:18 pm

Do you have the right answer? If you do other users will benefit from your contribution, share your knowledge with the community!

After you Export (extended)

There are a few additional things to keep in mind after you export your WP project. You will need to copy and paste elements in your individual functions.php file to your main project to ensure all functionality is included.

1. function ek_admin_nav()

You will need to copy any link elements belonging to your additional PSD files into your main WP project. The first anchor link is always the same, so simply copy and paste all links below included in the method.

2. function ek_create_menu()

You must copy and paste all add_submenu_page calls related to your child PSD to your main WP project. These calls allow your option menus in your child PSDs to display.

3. register_nav_menus()

Copy and paste all nav menu items related to your child PSD into your main WP project. These elements will create your native WP navigation menu instances. Ensure you are using commas (,) as required.

4. function ek_register_mysettings()

You must copy and paste all required register_setting calls related to your child PSD to your main WP project. This will register the default settings for your custom options.

5. function ek_[PAGE NAME]_settings_page()

Copy and paste all related settings page methods in your child PSD to your main WP project. This will generate the admin panels for your theme options.

6. function ek_page_options_defaults()

Copy and paste all elements inside the $a array of the method related to your child PSD into your main WP project as additional array elements. Ensure you are using commas (,) as required.

One-click process coming soon!

Answer by admin
Answered On July 21, 2016 4:10 am #

Hi,

There are several ways to approach this. WordPress allows you to modify ANYTHING so the trick is to plan ahead to so you simply copy files in the end.

Overall WP Design

The nature of WP allows you to create each section of your theme template individually if you like. You can have separate header.psd, footer.psd, index.psd, etc. Your design will always maintain its look and feel with WordPress so you can use a single PSD or several.

WordPress uses Dynamic Height so it will always recalculate your content based on its natural position.

Modules and Content

You can also create your WP modules and content sections on individual PSD files. The key is to ensure you create your content background to maintain Dynamic Height rules.

CSS and JavaScript

You can export unlimited styles and scripts in separate PSD files, then import them naturally with WP enqueue methods.

https://codex.wordpress.org/Function_Reference/wp_enqueue_script

https://codex.wordpress.org/Function_Reference/wp_enqueue_style

Run a Batch

To simplify the export, you can create a batch process to export all PSD files at once: //exportkit.com/learn/how-to/export-your-psd/batch-process-multiple-psd-files – you will need to run a batch set for each environment.

EG.
batch 1 = wordpress
batch 2 = css
batch 3 = javascript

In a future update we will include options for Batch to allow you to export to a single project folder, saves you even more time!

After your Export

You will need to copy your project files from each batch folder (similar if you export each individually) into your main WP theme folder. Ensure you enqueue all scripts and styles – then presto! Instant WP theme from multiple PSD files.

Additional info to come...
Answer by admin
Answered On July 15, 2016 6:44 pm #
Looking for another answer? View other questions in WordPress or get premium support for guaranteed results.
1419 views
2 answers
Last Answered 9 years ago by admin

Categories

Recent Answers

asked by rihabbenhmida
asked by zaineb khiari
asked by nmax
asked by shanrt
[+] View All Recent Questions

Share Your Knowledge!

Contribute to the community and help other users to benefit from your answer with experience and knowledge.