Reply To: Category.php file can't be found in my theme files in order to generic shortcode

Home Forums Pro Version Category.php file can't be found in my theme files in order to generic shortcode Reply To: Category.php file can't be found in my theme files in order to generic shortcode

#13277
Theodule Zeraga
Participant

Hi,

Thanks for your answer. I’m not really a IT guy. So my questions will probably be trivial.
I do have archive.php and index.php. When you say a copy, do you mean that I need to go to file manager make a copy then rename it?
Plus I look through the archive file, but can’t tell where the loop is located. There is no as in your video explicit description like ”start the loop”. Can you have a look at the archive.php content below?
Finally I go back to my previous question, why it isn’t possible in the first place (standard shortcode) to have all the posts when we select a certain category?

Here is the archive.php content:

<?php
/**
*
* @package admag
*/

get_header(); ?>

<?php
// Template layout is sticky sidebar
if( dt_source::is_fixed_layout() ):
?>

<div class=”fixed-main”>
<div class=”fixed-main-wrapper main-wrapper”>

<?php dt_print_ads(‘content-top’); ?>

<div class=”main-content mag-content clearfix”>

<div class=”row blog-content”>
<div class=”col-md-12 main-wp”>
<?php if ( have_posts() ) :
get_template_part(‘template-parts/content’, ‘layout’);
else :
get_template_part( ‘template-parts/content’, ‘none’ );
endif;
?>
</div>
</div>

</div><!– .main-content –>

<?php dt_print_ads(‘content-bottom’); ?>

<?php get_template_part(‘template-parts/footer’, ‘fixed’); ?>
</div>
</div><!– .fixed-main –>
<?php
get_sidebar(“sticky”);
?>
<?php
// Else if simple layout
else:
?>
<!– Begin Main Wrapper –>
<div class=”container main-wrapper”>

<?php dt_print_ads(‘content-top’); ?>

<div class=”main-content mag-content clearfix”>

<?php
$class = “col-md-8″;
$left_sidebar = false;
$right_sidebar = false;

switch ( dt_source::get_layout_id() ) {
// full width
case ‘1’:
$class=”col-md-12″;
break;
// left sidebar
case ‘2’:
$left_sidebar = true;
break;
// right sidebar
default:
$right_sidebar = true;
break;
}
?>

<div class=”row inf-wrapper”>

<?php if( $left_sidebar ): ?>
<div class=”col-md-4 <?php echo ( dt_get_option(‘dt-sticky-sidebar’) ) ? ‘dt_sidebar’ : ”; ?>”>
<?php get_sidebar(); ?>
</div>
<?php endif; ?>

<div class=”<?php echo esc_attr( $class ); ?> main-wp <?php echo ( dt_get_option(‘dt-sticky-sidebar’) ) ? ‘dt_content’ : ”; ?>”>
<?php if ( have_posts() ) :

get_template_part(‘template-parts/content’, ‘layout’);

else :
get_template_part( ‘template-parts/content’, ‘none’ );
endif;
?>
</div>

<?php if( $right_sidebar ): ?>
<div class=”col-md-4 <?php echo ( dt_get_option(‘dt-sticky-sidebar’) ) ? ‘dt_sidebar’ : ”; ?>”>
<?php get_sidebar(); ?>
</div>
<?php endif; ?>

</div>
</div><!– .main-content –>

<?php dt_print_ads(‘content-bottom’); ?>

</div><!– .main-wrapper –>

<?php get_template_part(“template-parts/footer”, ‘main’); ?>
<?php
endif
?>

<?php get_footer(); ?>