Martin Schmidt
asked 6 years ago

Hello,
I have some problems concerning widgets:

1. Article
On the left side of an article appears a content block with the following functions:  Sharing / E-Mail this article / Print this article / Authors / Tags
Is it possible to hide them? I did not find any options in the widget section
Further on, I like to hide the “post category” and the “date” of a single post (both placed unser the title). I can do this by editing the CSS (hidden) but I think there is a better way.

2. Page
At some pages, I like to show widgets like “DW Focus: Tabs” (with DW Focus: Featured News) in the middle (main content – not a sidebar).  I’ve installed a widget management plugin (called “Display Widgets”) to manage these widgets. It’s possible to mark an widget with “show on checked pages” and click the related checkbos to a page. But at the page, no widget appears. At the sidebar, it runs.
 
3. CSS
Instead of using the browser plugin “firebug”, I did not find the css setting to change the background color for the active tab “<li class=”active>” (red –> my color) as well as for the non-active tab <li class=””> (black –> my color)
 
<ul id=”nav-tabs-dw_focus_tabs-10 class=”nav nav-tabs hidden-phone>

 
<li class=”active>

<a data-toggle=”tab href=”#dw_focus_featured_news-dw-widget-1>Thema des Monats</a>

</li>

 
<li class=””>

<a data-toggle=”tab href=”#dw_focus_recent_news-dw-widget-1>DW Focus: Recent News</a>

</li>

</ul>
 
 
Do you have any idea to solve my problems?
Thanks a lot & best wishes
Martin
 

2 Answers
DominicStaff
answered 6 years ago

Hi,
1. Article
– If you want to hide the “Sharing / E-Mail this article / Print this article / Authors / Tags” section, you can add the following code to the style.css file (Dashboard > Appearance > editor):
.single .site-content>.hentry .entry-action {
    display: none;
}
@media only screen and (min-width : 1224px) {
.single .site-content>.hentry .entry-content {
    max-width: 790px;
    width: 740px;
   }
}
@media (max-width: 1079px) and (min-width: 980px) {
.single .site-content>.hentry .entry-content {
    width: 680px;
    max-width: 770px;
   }
}

– To hide the categories & date in the single post, you can open the content-single.php file in the folder path “\wp-content\themes\dw-focus”. find the line 12 then remove the following code:
<?php dw_focus_posted_on(); ?>
2. Page
– Unfortunately, at the moment our theme does not support this issue.

3. CSS
– If you want to change the background color for the nav-tabs of the widget, you can use the following code:
.nav-tabs { background: #…; }
.nav-tabs>li>a:hover { background: #…; }
.nav-tabs>.active>a, .nav-tabs>.active>a:hover { background: #…important; }
.nav-tabs>.active>a:before, .nav-tabs>.active>a:hover:before { border-top-color: #…; }

Note: You can tell me detail about the position that you want to change the color, I will help you resolve it.
Hope this helps !

Martin Schmidt
replied 6 years ago

Hi Dominic,

thanks a lot. With your help, I moved a big step forward.I use your theme for a corporate page (and not for a news magazine as developed for). This makes it a little more complicated. But now, I'm on a good way. There are only a few little settings.Your reply to my 1. question (pls. see above)Runs well, but now, there is a visual 30 – 40 px padding (or margin?) on the left side beforde the headline and text. Firebug didn't show the reason. I prefer to have a straight alignement (left) for image, text and the following widgets.

Just two short further questions:

– Where do I find the setting to limit the number of words, shown in "Recent News" preview (if "read more" is checked) to a lower limit as the default value. I just want to show a maximum of five lines.

– If one of the menu entries (top menu) is active, the color of the menu text ist red. I did not find where to change to "my" color.

3. template.css
Loading this file, I get one long line. Inserting line breakes, I have a "monster text" without any line breakes or paragraphs. This would ease up the process to modify, because there's not so much time fo search, find and cahnge. Do you habe a more structured "css-file

4. Contac form
Do I need a special plug in (like contact form 7) to create und handle contact forms? Or do you have a tutorial how to to this.

Thanks a lot for the time you take to answer.
Martin

P.S.
For your information: My concept

I want to show my portfolio (5 main topics) within the NEWS SLIDERSo I created a category with 5 articles. The permalink to each article ist the URL in the menu, specified as target fur a link. Each of theses 5 articles has an additional category for it's own. to this seconde category, I created articles as a sub-menu. Runs well. But in the section RELATED ARTICLES I only want to have articles with the same categoriy. But I also find there articles from another category, Is there a way to do this better?

Does "related" mean articles/posts from the same category? If not, is it possible to limit them on a single category.

DominicStaff
answered 6 years ago

1. 
– You can use the following code:
@media only screen and (min-width : 1224px) {
.single .site-content>.hentry .entry-content {
    max-width: 800px;
    width: 770px;
   }
}
Note: If you still face there issue, you can send me your site four further checking.
– To limit the number of words, shown in “Recent News” preview:
You can try the following solution.
Add the following code to the functions.php file. (line 1140)

function get_excerpt($count){
  $permalink = get_permalink($post->ID);
  $excerpt = get_the_content();
  $excerpt = strip_tags($excerpt);
  $excerpt = substr($excerpt, 0, $count);
  $excerpt = $excerpt.'... <a href="'.$permalink.'">more</a>';
  return $excerpt;
}

Change the ‘more’ to what text you want to display.
– Open the dw-focus-recent-post.php file in the folder path “wp-content\themes\dw-focus\inc\widgets”. Find the line 110 & 222.
Replace the following code

<?php the_excerpt(); ?> 

With new code:

<?php echo get_excerpt(45); ?>

– Open the dw-focus-categories.php file. Find the line 298 & 412.
Replace the following code

<?php the_excerpt(); ?> 

With new code:

<?php echo get_excerpt(45); ?>

Note: Change the value 45 to how many characters you want to display.
– To change color for the menu, you can add the following code:
.navbar .nav .current-menu-parent>a, .navbar .nav .current-menu-ancestor>a { color: #…; }
2. Please download the template.css file here:https://www.dropbox.com/s/yl5jwi0zhut63g7/template.css?dl=0
3. If you want to create a contact form, you can use contact form7 plugin.
– If you want to display all post from a categories in the  RELATED ARTICLES section, you can add all post with same tags (You can only use one tags).
See the screenshot: http://prntscr.com/5xli5a
Hope this helps !

Martin Schmidt
replied 6 years ago

Hi Dominic,

thanks a lot. With yout addional help, I was able to improve my site.But two issues did not perform I like to see:

1. The Menu
If I choose a topic (first level), it appears red, if it's active. I want to chenge this. Maybe this depends on the fact, that my menu contains instad of categories (with colors) simple links to the permanent link of an article. Otherwise, if I set the categorie as menu item, I get a page with a listed overview of all articles which belong to these category.So I need the chance to change the active color of a link "behind" the menu enty "link" (not page and/or category)

2. Download css-file
Download was successful, but when I moved the template.css to the server into it's directory, my layout crashed. Maybe there are fifferent setting. Using a child theme, I did not made any changes to the original template.css which came with the theme. If you tell me your email-address, I will send you "my" template.css (in use) and the login data for my site (won't post this into a public forum)

Best regards
Martin

Powered by DW Question & Answer Pro