Today we are here with a new piece of work that can help you to add Divi library section to the top of your pages. It will help you in adding the unique look to your site. Now we are going to demonstrate the process of adding Divi library to the top of archive pages.
- Firstly we need to create archive.php file and then add it to the child theme. We can create archive.php file by using the below steps:
- Open index.php file and copy its whole code and then open notepad and paste the copied code here and now save this file as “archive.php”.
2. Add this file to our child theme.
- Add a new page and then add the full-width header, customize it according to your need and then save this section to Divi Library. Now we can save this page or delete the page.
- Now go to Divi >> Divi Library and open your saved section, when this open look at the address bar of the browser and note down the “Id” as shown in the below image.
- Now click on “Appearance” and then on “Editor”, here we click on “archive.php” file when this file open search for the given code below.
Once the above code is searched replace it with the code given below:
<?php get_header();echo do_shortcode('[et_pb_section global_module="125"][/et_pb_section]');?>
Please don’t forget to replace “125” with your saved section Id as we discuss in step 3. Now save this file.
Once we have completed the above process we find an output like the given one:
Feel free to comment below for any other help.