Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #695488

    I made a new custom template to show an archive page for my blog posts but formatted in a very specific way. The problem now is that what it shows the posts, nothing from the text editor shows up including some stuff I had done in the Layout Editor.
    I’m am 90% sure it’s because I didn’t include some code from the other templates to make it work but if someone could please let me know what needs to be added, that would be great. I have included the current code for the page.

    Thank you!

    Template Name: HFF Ideas Archives
    <div class="site-content">
    	<div class="site-content-inner">
    		<div class="post-content-wrapper">
    			<?php $archive = new wp_Query(array(
    				'post-type'		=> 'post',
    				'post_per_page'	=> 20
    			)); ?>
    			<?php while ($archive->have_posts() ) : $archive->the_post(); ?>
    				<div class="post-content">
    					<div class="post-content-inner">
    						<span class="archive-category">
        							$categories = get_the_category();
       								$separator = ' / ';
        								$output = '';
            								foreach($categories as $category) {
                    								$rl_category_color = rl_color($category->cat_ID);
                									$output .= '<a href="'.get_category_link( $category->term_id ).'" style="background:'.$rl_category_color.';">'.$category->cat_name.'</a>'.$separator;
        								echo trim($output, $separator);
    						<?php the_post_thumbnail('Ideas_Pages_Thumbnail'); ?>
    						<article class="post-area" style="background: <?php echo $rl_category_color; ?>;">
    							<div class="post-title">
    								<h3 style="padding: 20px;"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    							<h5 style="padding: 5px 0px 25px 20px;"><?php the_time('F j, Y'); ?></h5>
    			<?php endwhile; ?>
    <?php get_footer(); ?>

    just to clarify, nothing the Avia Layout Builder or anything added via the normal text editor shows up using the page template. The loop runs but I can’t add anything to that page.



    Please copy enfold/page.php and enfold/includes/loop-page.php files to your child theme in the same path and change them as needed to add new page template –

    Best regards,

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.