David Rich
asked 10 years ago

Hi Dominic.  Can you assist me with the following theme modifications (theme installation can now be seen at http://dev.cover32.com):
1) I’d like to add a view counter widget to the space below the social sharing options to the left of an article.  What is the best way to accomplish this?
2) I’d like to remove the displaying of categories below the headline of each article.
3) All dates need to be capitalized.  I’ve brought this up before and the code you provided me only works in certain circumstances.  
4) I’d like to change the font in the “Recent Posts” widget to match the h2 font.
5) I’d like to be able to customize the space outside of the edge-lines to either make them category specific colors or make them an ad space for a skin ad.
6) Need consistent size and font on the byline at the top of each article.  You previously helped me add this feature, but the Name, the Date, and the words By/On are all different fonts.  I also want to remove the word On from the byline altogether.
7) I need to make the search box at the top right 300px wide.
Thank you.

2 Answers
DominicStaff
answered 10 years ago

Hi David ! 
1. To display the counter post view in the DW Focus, you can open the functions.php file, find the line 423 or 443, add the following code: 

 $view = get_post_meta ( get_the_ID(), '_views', true );
$view = $view ? $view : 0; 
echo sprintf( _n( '1 View', '%s Views', $view ), $view );

 
2. to remove the displaying of categories below the headline of each article, you can add the following code to the Custom wp_head() code:

 <style>
.single-post .post-categories {
    display: none;
}
</style>

 
3. To all the Dates is capitalized, you can add the following code to the Custom wp_head() code:

 <style>
.single-post .entry-meta {
    text-transform: uppercase;
}
</style>

 
4.  To change the font in the “Recent Posts” widget to match the h2 font, Please do as the following:
Step 1: Find the font that you want to use at here: http://www.google.com/fonts/
Step 2: click the Quick-use
see the screenshot:
Step 3: Please go to “@import” and copy the following link:
See the screenshot:
Step4: Paste the link copied above into tempplate.css file.
See the screenshot: 
Step5: Find the following code in the template.css file (wp-content\themes\dw-focus\assets\css), then change your font that you want display:

 .accordion .accordion-heading a {
   font-family: "NovecentowideNormalRegular",Georgia,"Times New Roman",Times,serif
}

5. At the moment you can change background for the space outside of the edge-lines by adding the following code to the Custom wp_head() code:

 <style>
body {
   background-color: #...;
}
.container {
   background: #...;
}
#colophon.dark .container {
   background: #...;
}
</style>

Notice: Our DW Focus does not yet support to add the ads to the space outside of the edge-lines.
6. Please send me your site for further checking.
7.  To make the search box at the top right 300px wide, you can open the header.php file. Fine the line 125 to line 137. 
Replace the following code: 

 <div id="under-navigation" class="clearfix under-navigation">
<div class="row-fluid">
<?php $offset = ''; ?>
<?php if( is_active_sidebar( 'dw_focus_under_navigation' ) ) { ?>
<!-- Under navigation positions ( breadcrum, twitter widgets) -->
<div class="span9">
<?php dynamic_sidebar('dw_focus_under_navigation'); ?>
</div>
<?php } else { $offset = 'offset9'; }?>
<div class="span3 <?php echo $offset; ?>"><?php get_search_form(); ?></div></div>
</div>

With new code: 

 <div id="under-navigation" class="clearfix under-navigation">
<div class="row-fluid">
<?php $offset = ''; ?>
<?php if( is_active_sidebar( 'dw_focus_under_navigation' ) ) { ?>
<!-- Under navigation positions ( breadcrum, twitter widgets) -->
<div class="span8">
<?php dynamic_sidebar('dw_focus_under_navigation'); ?>
</div>
<?php } else { $offset = 'offset9'; }?>
<div class="span4 <?php echo $offset; ?>"><?php get_search_form(); ?></div>
</div>
</div>

Hope this helps !

David Rich
replied 10 years ago

Dominic,

For number 6, please visit http://dev.cover32.com

Thanks.

DominicStaff
answered 10 years ago

Hi David !
6. To have consistent size and font on the byline at the top of each article, you can add the following code to the Header Code:

<style>
.single-post strong {
    font-family: .....;
    font-size: .....px;
    font-weight: .........;
}
</style>

Hope this helps !

 

Powered by DW Question & Answer Pro