Hello bhw, let me know how I can do that. The theme you just bought and wanted to add that uu
I have this code in functions:
I have this index:
I tried several tutorials and I can not get it right ... I call upon the power bhw!
I have this code in functions:
Code:
if (function_exists ('add_theme_support')) {
add_theme_support ('post-thumbnails');
set_post_thumbnail_size (150, 150, true);
add_image_size ('featured', 990, 335, true);
}
I have this index:
Code:
<? Php get_header ();?>
<div id="left">
<? Php $ categories = get_option_tree ('blogcategory','');?>
<? Php query_posts ($ query_string. '& Cat ='. $ Categories.'');?>
<? Php if (have_posts ()): while (have_posts ()): the_post ();?>
<Div class = "post" id = "post-<? Php the_ID ();?>" <? Php post_class ();? >>
<div class="posttitle">
<div class="commentbox"> <? php if (comments_open ()) {comments_popup_link ('0 ', '1', '%');} else {echo "-";}?> </ div>
<h3> <a href = "<? php the_permalink ()?>" rel = "bookmark"> <? php the_title ();?> </ a> </ h3>
<span class="postmeta"> <div class="authorlink"> <? php the_author_posts_link ();?> </ span> <span class="date"> <? php the_time ('d M Y');? > </ span> <span class="tags"> <? php if (get_option_tree ('tagcat', 'Categories') == "Categories") {?> <? php the_category (',')?> <? php} else {?> <? php the_tags ('', ',','');?> <? php}?> </ span> </ div>
</ Div>
<div class="posttext">
<? Php if (get_option_tree ('postview', 'Full Posts ") ==" Full Posts ") {?>
<? Php the_content ('Continue Reading →');?>
<? Php} else {?>
<? Php the_excerpt ('Continue Reading →');?>
<? Php}?>
</ Div>
<div class="postend">
<div class="readmorediv"> <a href = "<? php the_permalink ()?>"> read more </ a> </ div>
</ Div>
</ Div>
<? Php endwhile;?>
<? Php else:?>
<? Php endif;?>
</ Div>
<? Php get_sidebar ();?>
<div id="pagination">
<? Php if (function_exists ('wp_pagenavi')) {wp_pagenavi ();}?>
<div class="totop">
<a href="#top"> Go To Top </ a>
</ Div>
</ Div>
<? Php get_footer ();?>
[/ PHP]
And maybe served excerpts:
[PHP] <? Php
featured_excerpt_length function ($ length) {
16 return;
}
wpe_excerptmore function ($ more) {
return '...';
}
wpe_excerpt function ($ length_callback ='', $ more_callback ='') {
global $ post;
if (function_exists ($ length_callback)) {
add_filter ('excerpt_length', $ length_callback);
}
if (function_exists ($ more_callback)) {
add_filter ('excerpt_more', $ more_callback);
}
$ Output = get_the_excerpt ();
$ Output = apply_filters ('wptexturize', $ output);
$ Output = apply_filters ('convert_chars', $ output);
echo $ output;
}
ShortenText function ($ text)
{
$ Chars_limit = 22;
$ Chars_text = strlen ($ text);
$ Text = $ text. "";
$ Text = substr ($ text, 0, $ chars_limit);
$ Text = substr ($ text, 0, strrpos ($ text, ''));
if ($ chars_text> $ chars_limit) {
$ Text = $ text. "...";
}
return $ text;
}
?>
I tried several tutorials and I can not get it right ... I call upon the power bhw!
Last edited by a moderator: