nav-left cat-right
cat-right
Home » Blog » Web » wordpress » theme modifications

theme modifications

GrungeMag

Screenshots

Code

I moved the whole ’share buttons’ to a function in functions.php, because it is a mess of code and used multiple times:

function shareButtons($visibility) {
if ($visibility == 'visible'):
?>
            <!--Begin Share Button-->
            <img src="<?php bloginfo('stylesheet_directory'); ?>/images/share.gif" alt="delete" class="share" style="float: right; margin-right: 10px; margin-bottom: 5px; cursor: pointer; clear: left; visibility: <?php echo $visibility; ?>;" />
            <div class="share-div" style="clear: both;"> <a href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-1.gif" alt="bookmark" style="float: left; margin-left: 15px; margin-right: 8px; border: none;" /></a> <a href="http://www.digg.com/submit?phase=2&amp;url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-2.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.reddit.com/submit?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-3.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-4.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.squidoo.com/lensmaster/bookmark?<?php the_permalink() ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-5.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<?php the_title(); ?>&amp;u=<?php the_permalink() ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-6.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-7.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=<?php the_permalink() ?>&amp;Title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-8.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.technorati.com/faves?add=<?php the_permalink() ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-9.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.furl.net/storeIt.jsp?t=<?php the_title(); ?>&amp;u=<?php the_permalink() ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-10.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=<?php the_permalink() ?>&amp;new_comment=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-11.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> <a href="http://www.sphinn.com/submit.php?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bookmark-12.gif" alt="bookmark" style="float: left; margin-right: 8px; border: none;" /></a> </div>
            <div style="clear: both;"></div>
            <!--End Share Button-->
<?php 
endif;
}

used in ‘page.php’ as

        <?php while (have_posts()) : the_post(); ?>
        <!--Start Post-->
        <div class="post-wrapper">
            <?php shareButtons($artsee_share); ?>

In header.php the banner code was removed, because it could not be switched of by an option.

In sidebar.php I removed the ‘about us’ tab, because I do not want it, and it is not switchable by an option.

The breadcrumps, edit and print link and the page navigation was introduced as in the EarthlyTouch Theme.

The css for the sidebar page navigation was changed completely, since in the original it was only flat. Several minor changes were applied to the css file, such as removal of text-transfrom, or the adding of some space in padding or margins. All major changes are in a seperate file:

/* GrungeMag */
 
h1 { margin-top: 20px; }
h2 { margin-top: 20px; }
h3 { margin-top: 20px; }
h3.post-title{ margin-top: 0px; }
 
 
.sidebar-box ul li a:link, .sidebar-box ul li a:visited, .sidebar-box ul li a:active {width:255px}
.sidebar-box ul li ul li a:link, .sidebar-box ul li ul li a:visited, .sidebar-box ul li ul li a:active {width:235px}
.sidebar-box ul li ul li ul li a:link, .sidebar-box ul li ul li ul li a:visited, .sidebar-box ul li ul li ul li a:active {width:215px}
.sidebar-box ul li ul li ul li ul li a:link, .sidebar-box ul li ul li ul li ul li a:visited, .sidebar-box ul li ul li ul li ul li a:active {width:195px}        
.sidebar-box { padding-right: 30px; width: 268px;}
.sidebar-box ul { padding-left: 20px; }
.sidebar-box ul li ul { padding-left: 20px; }
.sidebar-box ul li ul li ul { padding-left: 20px;}
.sidebar-box ul li ul li ul li ul { padding-left: 20px;}
.sidebar-box h2 { font-size: 12px; text-transform: none; margin-top: 0px;} 
 
 
 
#breadcrump { background-color: #FFF; border: 1px solid #F3DDAC; color: #000; padding: 5px 5px 5px 15px; display: block; margin-bottom: 10px; width: 591px; }
 
 
.current_page_item { font-weight: bold; }
.current_page_item .page_item { font-weight: normal;}
.current_cat_item { font-weight: bold; }
 
 
.related-posts {
	background-color: #FFF; 
	border-top: 1px solid #f3ddad;
	padding-left: 15px;
	padding-top: 0px;
	display: block;
	margin-bottom: 5px; 
	margin-top: 15px;
}
 
.landingsites{
	background-color: #FFF; 
	border: 1px solid #e7e7e7;
	padding-left: 15px;
	display: block;
	margin-bottom: 15px; 
	margin-top: 15px;
	padding-top: 15px;
}
 
/* TOC Plugin */
.toc {
  border: #ccc solid 1px;
  font-size: .9em;
  margin: 0 0 15px 0px;
  width: 50%;
}
 
.toc ol {
  margin: 5px;
  padding-left: 30px;
}
 
table{
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 10px 0px;
} 
 
.blanktable {
	width: auto;
	border-collapse: collapse;
	border: none;
} 
 
td, th{
	line-height: 130%;
	vertical-align: top; 
	font-weight: normal; 
} 
 
 
table thead th{
	letter-spacing: .1em; 
	color:#fff; 
	background: #0096c9; 
	font-weight: bold; 
	text-align:left;
} 
 
table tbody th{
	text-align:left;
	background: #88b0d4; 
} 
 
table tr {
	border-bottom: solid #f6f1e3; 
	border-width: 1px;
}
 
 
td, th { padding: 6px; margin: 0px; }   
table tr.even th, 
table tr.even td {background: #fff9eb; } 
table tr.odd th,
table tr.odd td {background: #fff; }
 
tr td.tablesubheader,
tr.odd td.tablesubheader,
tr.even td.tablesubheader  {
	background: #f3ddad; 
	color: #000;
}
 
 
.wp-pagenavi{
	margin-bottom: 10px;
}
 
.wp-pagenavi a, .wp-pagenavi a:link {
	padding: 4px 6px 4px 6px; 
	margin: 2px;
	text-decoration: none;
	border: 1px solid #f3ddac;
	color: #009acf;
	background-color: #FFFFFF;	
}
.wp-pagenavi a:visited {
	padding: 4px 6px 4px 6px; 
	margin: 2px;
	text-decoration: none;
	border: 1px solid #f3ddac;
	color: #009acf;
	background-color: #FFFFFF;	
}
.wp-pagenavi a:hover {	
	border: 1px solid #3b3b3b;
	color: #3b3b3b;
	background-color: #FFFFFF;
}
.wp-pagenavi a:active {
	padding: 4px 6px 4px 6px; 
	margin: 2px;
	text-decoration: none;
	border: 1px solid #f3ddac;
	color: #e56100;
	background-color: #FFFFFF;	
}
.wp-pagenavi span.pages {
	padding: 4px 6px 4px 6px; 
	margin: 2px 2px 2px 2px;
	color: inherit;
	border: 1px solid #f3ddac;
	background-color: #FFFFFF;
}
.wp-pagenavi span.current {
	padding: 4px 6px 4px 6px; 
	margin: 2px;
	font-weight: bold;
	border: 1px solid #f3ddac;
	color: inherit;
	background-color: #FFFFFF;
}
.wp-pagenavi span.extend {
	padding: 4px 6px 4px 6px; 
	margin: 2px;	
	border: 1px solid #f3ddac;
	color: inherit;
	background-color: #FFFFFF;
}
 
 
.wp_syntax {
  color: #100;
  background-color: #fffdf7;
  border: 1px solid #f3ddad;
  margin: 0 0 1.5em 0;
  overflow: auto;
}

Pages: 1 2 3 4 5

Leave a Reply

Spam Protection by WP-SpamFree