admark
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Get a different template for the postwell you were talking about single.php not about custom-page.php where we could use
/* Template name: Page sports */single.php is for posts not for pages so your code above will not work on posts when you go to post page.
Forum: Themes and Templates
In reply to: Get a different template for the postI think that you could use conditional tags for this
put this code in header.php below
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
CODE:<?php if (is_category('sports') || in_category('sports')) { ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/sports.css" type="text/css" media="screen" /> <?php } elseif (is_category('hunting') || in_category('hunting')) { ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/hunting.css" type="text/css" media="screen" /> <?php } ?>Forum: Themes and Templates
In reply to: Removal of Comments box from page (Global)go to wordpress theme folder open single.php and page.php if they exist and remove this code
<?php comments_template(); ?>Forum: Themes and Templates
In reply to: Restrict the number of posts on main page only?I added crisjb code too
look at the lines from 151 to 158
http://pastebin.com/fR9C0AviForum: Themes and Templates
In reply to: Restrict the number of posts on main page only?Look at the lines from 151 to 155
Forum: Themes and Templates
In reply to: Restrict the number of posts on main page only?put this in index.php before the loop:
<?php if (is_home()) { query_posts('posts_per_page=5'); } ?>Forum: Themes and Templates
In reply to: Editing the Magazine Basic themeI think you should look at header.php of your theme, there must be
wp_list_categories();
this code outputs list of categories, so if you don’t want category listing on your web you should remove it.
Forum: Themes and Templates
In reply to: Home page too many postsThis theme is from WooThemes, so I think you should go to WooThemes support forum.
Anyway you can try:
Settings->Reading Settings and change “Blog pages show at most”
Awesome! Thank you for your help 🙂
Forum: Themes and Templates
In reply to: help with sidebarYou could use conditional tags :
is_page(‘2’) Where 2 is the page ID.
is_page(‘about’) Where about is the page slugput this in sidebar.php:
<?php (is_page('2')) { ?> sidebar content for specific page <?php } else { ?> default sidebar code <?php } ?>Forum: Themes and Templates
In reply to: Show taxonomies in admin/ Edit Posts areaI think you should read this post:
custom taxonomiesForum: Themes and Templates
In reply to: Change default ‘home’ in title<?php if (is_front_page()) { ?> <h1>TEXT</h1> <?php } else { ?> <h1><?php the_title(); ?></h1> <?php } ?>Forum: Themes and Templates
In reply to: Adding a logommm try editing header.php to:
<!-- Logo --> <div id="logo"> <a href="<?php echo get_option('home'); ?>"></a> </div> <!-- END Logo -->and add this to style.css:
`
#logo a{
float: left;
display: inline;
width:450px;
height:85px;
background: url(images/logo.jpg) no-repeat left center;
display: block;
text-indent: -4000px;
overflow: hidden;
text-decoration: none;
}`Another option :
<!-- Logo --> <div id="logo"> <a href="<?php echo get_option('home'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" alt=logo" /></a> </div> <!-- END Logo -->Forum: Themes and Templates
In reply to: Listing categories with the post count included inside the link.You could try something like this:
<ul> <?php $args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories($args); foreach($categories as $category) { echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name. ' ('. $category->count . ')</a> </li> '; } ?> </ul>Forum: Themes and Templates
In reply to: Adding a logoUpload your logo image to wp-content/themes/chocotheme/images folder 😉