WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: NextGEN Gallery] Change font of widget title (9 posts)

  1. iskwew
    Member
    Posted 4 years ago #

    I would like to change the font of the widget-title. I have tried in various ways, but so far no luck. The nggallery.css is overriding my theme fonts.

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. iskwew
    Member
    Posted 4 years ago #

    Solved it. Nextgen uses h2, whereas my theme uses h3. Added styling for h2 in widget titles similar to my h3.

  3. scottrosene
    Member
    Posted 4 years ago #

    I am also trying to change the font size and color of my widget title since they don't match the other widgets on my sidebar at http://scottrosene.com/.

    I found the nggallery.css file but am not sure what to add or change or where. I want the "From My Photo Album" title to be black, with the same color (black) and size as the other sidebar widget titles.

    Can anyone help?

  4. linuxguy2001
    Member
    Posted 4 years ago #

    I was wondering the same thing myself. Here's how I did it: The first thing I had to figure out was the div id to work with, in this case, it is called ngg-webslice and located in the file called nextgen-gallery/widgets/widgets.php. You'll need to edit the file around line 393, it looks like this:

    $before_title  = "\n" . '<div class="hslice" id="ngg-webslice" >' . "\n";
      $before_title .= '<h2 class="widgettitle entry-title">';
      $after_title   = '</h2>';
      $after_widget  =  '</div>'."\n" . $after_widget;

    You'll need to remove both h2 from the code above, so your code will look like this:

    $before_title  = "\n" . '<div class="hslice" id="ngg-webslice" >' . "\n";
      $before_title .= '<class="widgettitle entry-title">';
      $after_title   = '';
      $after_widget  =  '</div>'."\n" . $after_widget;

    Then you'll need to create a new entry in your main css file that looks like this (change the font and size to whatever may suit your needs:

    /*Entry below fixes the font on the picture widget  */
    #ngg-webslice {
        font-size: 14px;
        }

    Please remember, if you upgrade the plugin you'll most likely have to redo the changes to plugins/nextgen-gallery/widgets/widgets.php

  5. NeoK
    Member
    Posted 4 years ago #

    Hm... doesn't work for me. Font size of the widget is now fixed at the size of normal text, regardless of my entries in style.css...?

  6. Rob Aid
    Member
    Posted 4 years ago #

    I had the same problem and this thread helped me.

    Instead deleting the h2 tags just change them into h3. If all of your widget titles are h3 and use the same class that would do.

  7. Alex Rabe
    Member
    Posted 4 years ago #

    I will update the widget function for the next release , let's see if it's then fits to your themes

  8. puffymac01
    Member
    Posted 4 years ago #

    The way I got it to blend with my existing wordpress template was to delete the following from the widget.php file.

    $before_title = "\n" . '<div class="hslice" id="ngg-webslice" >' . "\n";
    $before_title .= '<class="widgettitle entry-title">';
    $after_title = '';
    $after_widget = '</div>'."\n" . $after_widget;

  9. bjornsennbrink
    Member
    Posted 4 years ago #

    I second puffymac01´s solution for the widget title as I could not find what CSS-file edit.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.