Support » Plugins » [Plugin: NextGEN Gallery] Change font of widget title

Viewing 8 replies - 1 through 8 (of 8 total)
  • Solved it. Nextgen uses h2, whereas my theme uses h3. Added styling for h2 in widget titles similar to my h3.

    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?

    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

    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…?

    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.

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

    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;

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: NextGEN Gallery] Change font of widget title’ is closed to new replies.