Paridhiman
Veteran
Just Getting Started
Member Likes (0)
Hi,
I am using Edublog Theme for my site and i am using categories named news and courses so i want to create a page template for my courses category. Can anyone help.
Thanks in Advance

Responses (4)
Support Chimp (joined March 2010) Likes (0)
Hey Paridhiman
Creating a template for the Edu Blog theme is just like any other theme. You can find full instructions on on templates right here:
http://codex.wordpress.org/Templates#Template_File_Articles
You can also see the templates in the Edu Blogs theme as an example:
page-templates-blog.php
page-templates-full-width.php
Hope that helps.
Take care.
Tim.
Member (joined September 2010) Likes (0)
Hi Mr.Tim,
Thanks for replying and i have the solution but now the problem is with the setting can you please help me with this coding.
Thanks in advance.
Jatinder
Member (joined September 2010) Likes (0)
<?php
/*
Template Name: Courses
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="main">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php endwhile; else: endif; ?>
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1>"><?php the_title(); ?></h1>
<p><?php the_content(); ?>
<?php endwhile; else: endif; ?>
<div <?php if(function_exists("post_class")) : ?><?php post_class(); ?><?php else: ?>class="post"<?php endif; ?> id="post-<?php the_ID(); ?>">
<h1 class="post-title">" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></h1>
<div class="post-author">
<div class="alignleft">
<?php
$if_author_on = get_option('tn_edus_author_avatar'); ?>
<?php if($if_author_on == 'yes') { ?>
<?php if(function_exists("bp_post_author_avatar")) : ?>
<?php bp_post_author_avatar(); ?>
<?php else: ?>
<?php echo get_avatar($author_email,'20'); ?>
<?php endif; ?>
<?php } ?>
<?php _e('by', TEMPLATE_DOMAIN); ?> <?php if( $bp_existed == 'true' ) { ?> <?php printf( __( '%s',TEMPLATE_DOMAIN), bp_core_get_userlink( $post->post_author ) ) ?><?php } else { ?> <?php the_author_posts_link(); ?><?php } ?> <?php _e('in', TEMPLATE_DOMAIN); ?> <?php the_time('F jS Y') ?></div>
<div class="alignright">
<span class="coms-post"><?php comments_popup_link(__('Comments (0)', TEMPLATE_DOMAIN), __('Comments (1)', TEMPLATE_DOMAIN), __('Comments (%)', TEMPLATE_DOMAIN)); ?></span><?php edit_post_link(__('edit', TEMPLATE_DOMAIN)); ?>
</div>
</div>
<div class="post-blog-content">
<?php the_content( __('...Continue Reading', TEMPLATE_DOMAIN) ); ?>
</div>
</div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Support Chimp (joined March 2010) Likes (0)
Could you please encase code using the code tags or use PasteBin, that keeps the formatting:
http://pastebin.com
I'm also unsure what you are trying to achieve with the code above?
Perhaps you could elaborate a little please.
If its quite complex and requires a developer then you may need to look at hiring one. I'll know once you explain a little more. :-)
Take care
Become a member