Dear @arielyyy thanks a lot for the review!!
Well, you have to add some code in order to add more projects.
The projects are actually pages. So you have to do 2 things.
1. Create the corresponding settings to the customizer
2. Show the projects in the corresponding section.
=== Adding new projects/ customizer settings ===
Go to the theme folder and find the following:
theme-init > init.php
And find the following comment.
/*============================================================*/
/** Home Projects area */
/*=============================================================*/
Then you have to add the customizer controls and settings.
$wp_customize->add_control($prefix . '_projects_section_page_5', array(
'type' => 'dropdown-pages',
'priority' => 15,
'section' => $prefix . '_home_projects_section',
'label' => esc_html__('Select the fifth project', 'atlast-business'),
));
$wp_customize->add_setting($prefix . '_projects_section_page_5', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'atlast_business_sanitize_dropdown_pages',
));
You can add whatever number of projects. Be careful about this variable:
‘_projects_section_page_{your_number}’
=== Editing the frontpage template ===
After you add the controls and their corresponding settings you should find the following file in the theme directory.
theme-init > init.php (it is the same as the above ) and find the following function
if (!function_exists('atlast_business_show_projects')):
function atlast_business_show_projects()
{
$prefix = atlast_business_get_prefix();
$pages = array(); // stores page id to use afterwards
for ($i = 1; $i < 5; $i++) {
$pageID = get_theme_mod($prefix . '_projects_section_page_' . $i, '');
if (absint($pageID)) {
$pages[] = $pageID;
}
}
return $pages;
}
endif;
You can then change the 5 in the for loop
for ($i = 1; $i < 5; $i++) to the number of your projects. Be careful that this number should be the sum of your project minus 1.
If everything is ok, you should now see more projects in the home page.
ArchimidisM