I created a custom post type (portfolio), with custom taxonomy (portfolio-category). I created a template, this template lists all "portfolio" posts.
<?php while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; ?>
<?php $mypost = array( 'post_type' => 'portfolio', );
$loop = new WP_Query( $mypost ); ?>
<div class="portfolio-arrows" id="p-arrow-left" data-scroll-by="-300"></div>
<div class="portfolio-arrows" id="p-arrow-right" data-scroll-by="300"></div>
<div class="inner">
<ul id="portfolio-container">
<?php while ( $loop->have_posts() ) : $loop->the_post();?>
<li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="portfolio-content">
<h2 class="portfolio-title"><?php the_title(); ?></h2>
<span class="portfolio-date"><?php the_date(); ?></span>
<?php the_content(); ?>
</div>
<?php if ( has_post_thumbnail() ) { ?>
<div class="featured-p-image">
<?php the_post_thumbnail( 'portfolio-size' ); ?>
<div class="featured-p-image-hover">
<?php
$fullimage_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "full" );
echo'<a href="'.$fullimage_src[0].'" class="fancybox"></a>';
?>
</div>
</div>
<?php } ?>
</li>
<?php endwhile; ?>
</ul>
</div>
As you can see <?php while ( have_posts() ) : the_post(); ?>
in this page template the user can add content above the wp_query.
I created a file, taxonomy-portfolio-category.php with same content. With this I would like to list posts by term, but I would like to show the "user managed" content above the query too. (The result is: I get same page, but instead of the unique content (user managed) I see the list by the term.)
How can I do that? Or what's the best way for that?