Title: Breaking down the_content();
Last modified: August 20, 2016

---

# Breaking down the_content();

 *  [Marfu](https://wordpress.org/support/users/marfu/)
 * (@marfu)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/breaking-down-the_content/)
 * Hello,
 * I’m currently designing a theme where different categories are to have a different
   look depending on the category. This also involves rearranging of the content
   inside the post type. This is somewhat easy to make using custom fields, but 
   for this project that doesn’t work, as I’m to post pretty much solely from the
   iOS app. So what I need is to extract content from posts and place it where it
   needs to go from the theme side instead of assigning it during the posting process
   since the iOS app doesn’t allow it.
 * What I’m trying to do from within my theme is something like this:
 *     ```
       <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
   
       <?php
       	if ( in_category('Photo') ) { ?>
                <div class="photo">
                #IMAGE(S)
                #TITLE
                #TEXT ONLY (From the_content())
       <?php } ?>
   
       <?php
       	if ( in_category('Video') ) { ?>
                <div class="video">
       		 #VIDEO(S) from the auto embed
       		 #TITLE
       		 #TEXT ONLY (From the_content())
       <?php } ?>
   
       <?php
       	if ( in_category('Various') ) { ?>
                <div class="various">
       		 #VIDEO(S) AND IMAGES OR SOMETHING ELSE
       		 #TITLE
       		 #TEXT ONLY (From the_content())
       <?php } ?>
   
       <?php
       	if ( in_category('Article') ) { ?>
                 <div class="article">
       		  #TITLE
       		  #THE CONTENT (Here the normal the_content() would work)
       <?php } ?>
   
       <?php
       	if ( in_category('Quote') ) { ?>
                 <div class="quote">
       		 #BLOCKQUOTE
       		 #TEXT ONLY (From the_content())
       <?php } ?>
   
       		  #And so on…
   
       <div class="entry">
       	<div class="meta">
       	<small>Tags, Date, Author etc.</small>
       	</div>
       </div>
   
       </div> <!-- Close category type DIV -->
   
       <?php endwhile; else: ?>
   
       <p>Sorry, no posts matched your criteria.</p>
   
       <?php endif; ?>
       ```
   
 * Looks like the_content(); is my problem here. I need to get hold of what’s inside
   it so I can place it where I want it to be. But I’m can’t seem to figure out 
   how to do that.
 * Any help with this is of great appreciation.
 * Thank you.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Marfu](https://wordpress.org/support/users/marfu/)
 * (@marfu)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/breaking-down-the_content/#post-2092698)
 * Anyone?

Viewing 1 replies (of 1 total)

The topic ‘Breaking down the_content();’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [extract](https://wordpress.org/support/topic-tag/extract/)
 * [individual](https://wordpress.org/support/topic-tag/individual/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [styling](https://wordpress.org/support/topic-tag/styling/)
 * [the_content](https://wordpress.org/support/topic-tag/the_content/)

 * 1 reply
 * 1 participant
 * Last reply from: [Marfu](https://wordpress.org/support/users/marfu/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/breaking-down-the_content/#post-2092698)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
