Support » Plugin: WP LIST PAGES BY CUSTOM TAXONOMY » Matching widget style to Theme style

  • Resolved wordnow

    (@wordnow)


    I am wanting to have the output of the widget use my default theme fonts, sizes and styles. I can see that I can modify the pbytax_template.php file by putting it in my templates folder. I also see the pbytax-style.css file. Is there a way for the widget to automatically pickup my theme fonts and styles or do I need to modify one or more of these widget files. If I need to modify your widget files, please direct me as to what file and where. I’m only interested in making the output adopt the theme font and font sizes. Thanks.

    https://wordpress.org/plugins/wp-list-pages-by-custom-taxonomy/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author piccart

    (@piccart)

    Hello!

    my plugin is actually meant to pick the styles from the theme. There is just a very little styling in the plugin, and it’s mostly about elements alignment, and margins/paddings.

    There is basically nothing regarding the fonts/text. the only things are that the date/comments are set to be a bit smaller than the basic font size of your theme, and the post titles are set to be slightly bigger than the default text of your theme.

    the rest should be picked up by the theme styles, because css is inherited if not specified, and in my plugin the style is not specifying anything about fonts..

    My guess is that there is something not too well coded in your theme, and you need specific classes names in order to style the widget in the same way as your other widgets.

    but I need to see a page of your site where there is a normal widget and my widget, in order to understand what’s wrong with your code.

    cheers

    Thread Starter wordnow

    (@wordnow)

    I suspected that might be the case as I was not seeing you set things like the font style. The site I’m working on is still under development, but here is how to get to the page that is using your widget which will be on the far left column listing the Posts by Country.
    1. go to: http://www.godreportsdev.refreshenfaith.com/blog/
    2. Click “Countries” menu item at top
    3. Find France on the map and click on it.
    4. Your widget is the left column, “Posts by Country”.

    I’m using a popular and paid theme called Newspaper 7

    Thanks.

    Plugin Author piccart

    (@piccart)

    Hello!

    the default font for your .widget class is Opens Sans, and then you have quite a few specific targets for specific widgets elements which are set to be
    font-family: Georgia, Times, “Times New Roman”, serif;

    your body font is Verdana, by the way..

    I am not sure why things are set in this way but it is rather confused and can easily lead to problems like this one..

    if you want to use Georgia everywhere, you should have it set as font for body..

    in any case, I don’t know if there is a reason because your general widget class is set to use a different font than other specific kinds of widgets, but I’d add this rule at the end of your theme custom css, to set Georgia for ANY text in ANY widget type,

    .widget {
     font-family: Georgia, Times, "Times New Roman", serif;
    }

    otherwise you can target only my widget, but most likely the problem will come out again with other widgets..

    .widget.widget_pages_by_tax {
     font-family: Georgia, Times, "Times New Roman", serif;
    }

    Thread Starter wordnow

    (@wordnow)

    Success again! Thanks

    Plugin Author piccart

    (@piccart)

    perfect!

    glad to be helpful!

    p.s. thanks for the awesome review! 😀

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Matching widget style to Theme style’ is closed to new replies.