Show Category Posts in Page
-
Hello,
I wont add my post from my categories on my page, and I found this video and code, but I get this error when I add on my function.php
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/www/lajkuj.rs/wp-content/themes/BlueMotion/functions.php on line 704
How to fix this?
This is video: http://www.youtube.com/watch?v=hlJRAw_VMCk
And this is code for style.css and function.php
style.css:
/************style.css code****************/ #my-feature-box h2 li {list-style:none;} #my-feature-box {margin-top:10px;} #my-feature-box1 {padding:10px 0px;font-size:10px;} .featurereadmore {float:right;text-align:right;margin-bottom:10px;} .custom .homethumb { float: left; height: 150px; margin: 15px 10px 5px 0; width: 150px; } .custom #my-feature-box1 .featurereadmore {float:right;text-align:right;margin-bottom:10ox; width:70%} .custom .featurereadmore a:hover {text-decoration:underline;} #my-feature-box h2 a{text-decoration:none;} #content #post-6 p{display:none;} .custom #post-6 #my-feature-box1 p{display:block;}
function.php
function catpages(){ if (is_page('2')){ ?> <div id="my-feature-box"> <?php $my_query = new WP_Query('category_name=nagradna-igra&showposts='); while ($my_query->have_posts()): $my_query->the_post(); $do_not_duplicate = $post->ID;?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="homethumb"> <?php if (has_post_thumbnail() ) the_post_thumnail('thumbnail'); else echo '<img src="http://www.lajkuj.rs/wp-content/themes/BlueMotion/images/logo.png" width="150" height="150" />; ?> </div> <div id="my-feature-box1"> <div class="format_text entry-content"> <?php the_exxerpt(); ?> </div> <div class="featurereadmore"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Read more">Read more →</a> </div> </div> <?php endwhile; ?> </div> <?php }} add_action ('thesis_hook_before_post','catpages');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show Category Posts in Page’ is closed to new replies.