Making changes to column display on BP Daily

Hi! I'm using BP Daily Theme (with bp enabled) and want to make a couple of changes to the home page.

I'm using the column display, and right now each post shows up as follows:
-post title
- date and byline
-truncated text
-more button
-previous posts

I'd like to do the following:
- remove the previous posts that show up under the truncated post
- create a title bar of sorts (similar to the widget title bar) for each category (the one that determines which content shows up in which column position)

I have a feeling the first one will be fairly simple. How hard will the second task be?

Just to be clear, I'm attaching a screen shot. From the Theme Options, I have these columns displaying content based on the categories "Economic Growth & Trade", "Environment" and "Humanitarian Assistance"

Would it be possible to create a title bar for each of these posts that looks like the widget title bar (in the screen shot, look at "Alliances" in the blue rectangle" I'd like to place that rectangle above the post title.
Then below the title keep things the same, ie byline, truncated text, but then end with the more button. Remove the categories and previous posts.

Hope that made sense!
Thanks for your help!

  • Tammie

    Bottom line these are quite some edits. It's a custom code job which is fine but you will have to know code to do it. I can give you some pointers though..

    Lets break down what you will have to do in your code:

    1. Take the style in the widget section
    2. Apply it to each title you want
    3. Edit the theme page: home.php you see: /library/components/content-columns.php this is the page. You will have to edit that yourself as you want but a starting point is to look at this code:

    <div class="column-content">
    				<?php if ($cat_one != ""):?>
    				<div class="content-block">
    					<?php $my_query = new WP_Query('category_name='. $cat_one . '&posts_per_page=1');
    				  while ($my_query->have_posts()) : $my_query->the_post();
    				  $do_not_duplicate = $post->ID;?>
    					<div class="feature-wrap">
    				    	<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
    				<span class="byline"><?php the_time('M j Y') ?> <em><?php _e( 'by ', TEMPLATE_DOMAIN ) ?><?php the_author_link();  ?></em></span>
    								<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><span class="attach-post-image" style="height:100px;width:190px;display:block;background:url('<?php the_post_image_url($cat_image_display); ?>') center center no-repeat"> </span></a>
    							<?php the_excerpt(); ?>
    						<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="button"><?php _e( 'more', TEMPLATE_DOMAIN ) ?></a>
    					<h3><?php the_category() ?></h3>
    				  <?php endwhile; ?>
    				<ul class="category-preview">
    				  <?php $my_query = new WP_Query('category_name='. $cat_one . '&posts_per_page=5');
    					  while ($my_query->have_posts()) : $my_query->the_post();
    				  if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    						<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
    						<?php endwhile; ?>

    Then you have it repeated for each column.

    However it uses a column loop so you have to do for each case.

    Such as applying the style around:
    <h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>

    Assuming you ever are around the title.

    It's a case of you having to explore that file though, hopefully you've got some starting points from what I've posted.

  • IntegraLLC

    Thanks, Tammie. Yeah, that was the piece I was looking at. I hadn't noticed the column loop, so that explains why it wasn't working for me before.

    So, I've been able to remove the previous posts, and the category names underneath the truncated text. (wahoo!) I've even managed to get a heading created before the post title (impressive, I know). :wink: You can see the changes below (and in case you want to put it up on your fridge!)

    I did it by just inserting <h3> Agriculture </h3> before each post. But my question now is, since I set it to be h3, I should be able to control the color right? When I go to Custom Styling in my dashboard, I am setting a new color (under Headers styling), but its not showing up on the front end.
    Any ideas?


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.