<?php /** * projects_before_main_content hook * * @hooked projects_output_content_wrapper - 10 (outputs opening divs for the content) */ do_action('projects_before_main_content'); ?> <?php if (apply_filters('projects_show_page_title', true)) { ?> <h1 class="page-title"><?php projects_page_title(); ?> </h1> <?php } ?> <?php do_action('projects_archive_description'); ?> <?php if (have_posts()) { ?>
/** * Output Projects content. * * This function is only used in the optional 'projects.php' template * which people can add to their themes to add basic projects support * without hooks or modifying core templates. * * @access public * @return void */ function projects_content() { if (is_singular('project')) { while (have_posts()) { the_post(); projects_get_template_part('content', 'single-project'); } } else { ?> <?php if (apply_filters('projects_show_page_title', true)) { ?> <h1 class="page-title"><?php projects_page_title(); ?> </h1> <?php } ?> <?php do_action('projects_archive_description'); ?> <?php if (have_posts()) { ?> <?php do_action('projects_before_loop'); ?> <?php projects_project_loop_start(); ?> <?php while (have_posts()) { the_post(); ?> <?php projects_get_template_part('content', 'project'); ?> <?php } // end of the loop. ?> <?php projects_project_loop_end(); ?> <?php do_action('projects_after_loop'); ?> <?php } else { ?> <?php projects_get_template('loop/no-products-found.php'); ?> <?php } } }
/** * Projects archive title * @return void */ function woo_projects_archive_title() { if (is_projects_archive()) { ?> <div class="archive-header content-container-fullwidth"> <h1 class="page-title"><?php projects_page_title(); ?> </h1> </div> <?php } }