Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- left col -->
- <div class="grid_4"style="padding-top:210px; line-height:150%;" >
- <p style="color:#f00"><em>One sidebar uses rotating pictures</em></p>
- <p style="color:#f00"><em>Frontpage and other designated pages will use content from sidebar posts using code below from source file. Different sidebar scripts can be registered in the 'functions' file. The conditional can be written in the sidebar itself. That seems to be how other themes have done it rather than using separate sidebar files. Registration is done as a 'widget' and investigating this. </em></p>
- <?php
- if ( is_front_page() || is_page('portfolio') )
- {
- $args = array( 'numberposts' => '3' , 'post_status' => 'publish', 'category' => '-8');
- $recent_posts = wp_get_recent_posts( $args );
- foreach( $recent_posts as $recent ){
- echo '
- <h2 class="green">'. $recent["post_title"] .'</h2>
- <p ><a style="text-decoration:none" href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_content"]).'" >' . $recent["post_content"].'</a><br> </p> ';
- }
- }
- if ( is_page('feature') )
- {
- $args = array( 'numberposts' => '1' , 'post_status' => 'publish', 'category' => '8');
- $recent_posts = wp_get_recent_posts( $args );
- foreach( $recent_posts as $recent ){
- echo '
- <h2 class="orange">'. $recent["post_title"] .'</h2>
- <p ><a style="text-decoration:none" href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_content"]).'" >' . $recent["post_content"].'</a><br> </p> ';
- }
- }
- ?>
- <?php ShowRandomImg(); ?>
- <!--
- [ShowRandomImg]
- <?php ShowRandomImg(); ?>
- -->
- echo $ImgTag;
- $content = ob_get_contents();
- ob_end_clean();
- return $content;
- <p> </p><p> </p>
- <h2>>ELSEIF... use rotating images here...<br>
- Images can be renamed anyway necessary per your instructions.</h2>
- <!-- <img src="/wp-content/themes/custom/img/rotatepics/pic4.jpg" > -->
- <h2>>ELSE use the left sidebar for features and portfolio</strong><br>
- See static implementation. Structure and code TBD.</h2>
- </div><!-- end left col-->
- <div class='clear'> </div>
Advertisement
Add Comment
Please, Sign In to add comment