2013-04-10, 11:56:11
I'm trying to conquer a layout/display issue.
Client wants 3 boxes with blog content posted by category in each box.
If I plug the following code into the news page, I get what I want (sans styling and fine-tuning data since I haven't styled yet) but then immediately followed by all the posts due to the call for page content.
If I remove the call for page content, I eliminate that issue. However, when I pull the article up, I get only a list of blogs and no post. If I try using a custom format (which I *thought* was for the blog post and not the main display page) I override get a mess on the main page and elsewhere...and lose all the formatting in the article.
I'm assuming I need some way to have two templates for the blog. One for the main page which displays the post links and then another that is used for displaying the actual posts.
I'm a pretty weak programmer. I can read the code and change bits and pieces but I get lost when I start trying to write custom functions.
I'm assuming I need an if then else statement along the lines of
BUT I'm not sure how to format that type of function or exactly where it would be best to put it.
Client wants 3 boxes with blog content posted by category in each box.
If I plug the following code into the news page, I get what I want (sans styling and fine-tuning data since I haven't styled yet) but then immediately followed by all the posts due to the call for page content.
Code:
<div id="news-display">
<div id="news-category">
<div class="news-header">News</div>
<div class="news-holder"><?php show_blog_category('News'); ?></div>
</div>
<div id="press-category">
<div class="news-header">Press Releases</div>
<div class="news-holder"><?php show_blog_category('Press Releases'); ?></div>
</div>
<div id="events">
<div class="news-header">Events</div>
<div class="news-holder"><?php show_blog_category('Events'); ?></div>
</div>
If I remove the call for page content, I eliminate that issue. However, when I pull the article up, I get only a list of blogs and no post. If I try using a custom format (which I *thought* was for the blog post and not the main display page) I override get a mess on the main page and elsewhere...and lose all the formatting in the article.
I'm assuming I need some way to have two templates for the blog. One for the main page which displays the post links and then another that is used for displaying the actual posts.
I'm a pretty weak programmer. I can read the code and change bits and pieces but I get lost when I start trying to write custom functions.
I'm assuming I need an if then else statement along the lines of
Code:
If *displaying article* then *use this template* else *use this template*
BUT I'm not sure how to format that type of function or exactly where it would be best to put it.