Jump to content
Sign in to follow this  
mason

Changing Font Type In Categories and Sidebar

Recommended Posts

mason

Hey,

 

I was wondering how I could change the font type of my "Categories" list in the sidebar. 

 

For example right now my sidebar font is showing as Helvetica because under Site Settings > Typography > Text Headers, I have Helvetic chosen. But I would like to use the Google Font "Permanent Marker".

 

Firebug shows that my Categories are grabbing the font type from h3, but since Typography changes all headers at once I do not know how to customize this.

 

Please help!

 

Thank you.

Share this post


Link to post
Share on other sites
mason

To be clear I would like to know how to change the font types of both the word "Categories" in the sidebar, as well as the font types of the links listed below such as "Art".

Share this post


Link to post
Share on other sites
greenfly

Could we have a link to your site please?


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
James B

Hi there, if you want to use google fonts for certain text areas on your site we have a free google font plugin you can install which will add all the fonts to your site so you can select them from the typography menu.

 

http://www.pagelines.com/store/plugins/pagelines-googlefonts/

 

If you're just looking to change the font for certain words or areas on the site you will need to use custom code. Make sure you have the google font plugin installed first and active, then you'll need to inspect the area in firebug and get the code where the font is being applied, then you can edit in your chosen font and paste into Pagelines>site options>custom code. An example is below.

 

 

.hentry .entry-title {
    font-family: butcherman;
    margin: 0;
}
 

Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mason

Hey, I have been trying this in several different ways but I cannot figure it out.

 

I do not know which section or div container to attach the code to.

 

My "Categories" are under:

<div id="sidebar-wrap" class="">
<div id="sidebar1" class="scolumn">
<div class="scolumn-pad">

<section id="sb_primary" class="copy clone_1 section-sb_primary"><div class="copy-pad"><ul id="list_sb_primary" class="sidebar_widgets fix"><li id="categories-2" class="widget_categories widget fix"><div class="widget-pad"><h3 class="widget-title">Categories</h3> <ul>
<li class="cat-item cat-item-1"><a href="http://headstructure.com/category/art/" title="View all posts filed under Art">Art</a>

 

 

But I still don't know what I have to insert into custom code.
 
I am sorry but I am a total noob!

Share this post


Link to post
Share on other sites
James B

Hi there, its looks like you're looking in the correct area in the html. Once you've inspected the element in the html you need to look at the css in the right hand window, thats where you can make the edits and then copy/paste back into pagelines.

 

I've recorded a short video to show you.

 

http://screencast.com/t/jcem9WrCxyB

 

To see our overview on finding and editing css check out http://support.pagelines.me/docs/customization/custom-css/


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mason

Wow thank you very much! That was incredibly helpful! 

But I still cannot get my code to work :/

 

Here is the code I am putting into the custom code: 

.widget 
.widget-title {
    font-family: Permanent Marker;
}

 

Do I have to put the "* G" next to the font name because it is a google font? I don't understand what I am doing wrong.

Share this post


Link to post
Share on other sites
Danny

Every widget is given a unique class, which you can use to style particular widgets. If you view the HTML code you provided above, you can see the following:

 

https://gist.github.com/anonymous/001b9f2e2cd3c1174830

 

As you will notice, the categories widget has the following class:

 

widget_categories

 

You can use this to target that widget and that widget only, you can also see in the code above that the h3 has a class to:

 

widget-title

 

We can use these two classes, to target the categories widget and its title, by combining the two, which would look like this:

 

.widget_categories .widget-title

 

Now we need to get the correct integration code from Google Webfonts, which you can find here - http://www.google.com/fonts#UsePlace:use/Collection:Permanent+Marker

 

So now we have the classes to target the widget and the h3 title, as well as the correct code for the font family, all we need to do now is combined them.

 

This would look something like this:

 

https://gist.github.com/anonymous/eae27368d5d32e077372

 

The reason as to why I am using #site and more information on how to implement custom CSS, can be found here.

 

http://support.pagelines.me/docs/customization/custom-css/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
mason

Great! This worked. Thank you very much!

But I do want to add that I was only able to make it work after I pasted this Google Web Fonts code into my Custom Code "Header Scripts":

<link href='http://fonts.googleapis.com/css?family=Font+Name' rel='stylesheet' type='text/css'>

Is there a reason I needed to do this when I already had the Google Web Fonts plugin enabled?

Also, if I wanted to add this code for more than one section such as:

.widget_archive

How can I add these together instead of writing two separate lines of code?

Share this post


Link to post
Share on other sites
catrina

I'm not sure why this is - but at least it's working now!

 

Can you please clarify what you mean by adding that piece of code for more than one section?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
mason

Yes me too!

 

And what I mean is I am able to change the fonts for each individual section, for example:

  • "Categories" title in the sidebar
#site .widget_categories .widget-title
  • "Archives" title in the sidebar
#site .widget_archive .widget-title
  • Links of different categories
#site .cat-item

 

I was just wondering if there was a way to change the fonts for all of these sections at once. Do I separate with commas in their hierarchal order, or do I put them all in one bracket?

Share this post


Link to post
Share on other sites
James B

Hi there, if you want to change all of the widget titles to that font you can just use the .widget title class, as each standard wordpress widget will use this.

 

If you want to target certain areas and make the change only once then you can put in the classes separated with a comma followed by the font-family command as you've described above, that will work.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
mason

Great. Thank you very much for all of your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
×