Sidebar widgets under Genesis child theme
This topic contains 5 replies, has 3 voices, and was last updated by oldmankit 10 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: fontawesome
-
AuthorPosts
-
August 2, 2014 at 9:53 am #10757
On this listing detail page of my site the fontawesome icons appear to be broken on some browsers:
- IE 11: nothing displays at all where the icon should be
- Firefox 30.0 (Windows): I don’t even know how to describe what that is, so I’m attaching a screenshot.
- Mobile Safari: no problems
- Chrome for Windows: no problems
I’m using a Genesis Childtheme and all my plugins are up-to-date. I’m running the Genesis Theme Compatibility plugin. I’m also using this custom code in functions.php, but I already checked that it’s not the cause of the problem:
// remove the orginal action entirely remove_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting', 1); // add a new action add_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting_custom', 1); // copy the orginal function, rename it and comment the code you wish to hide function geodir_detail_page_sidebar_content_sorting_custom() { $arr_detail_page_sidebar_content = apply_filters('geodir_detail_page_sidebar_content' , array( //'geodir_share_this_button', //'geodir_detail_page_google_analytics', 'geodir_edit_post_link', 'geodir_detail_page_review_rating', 'geodir_detail_page_more_info' ) // end of array ); // end of apply filter if(!empty($arr_detail_page_sidebar_content)) { foreach($arr_detail_page_sidebar_content as $content_function) { if(function_exists($content_function)) { add_action('geodir_detail_page_sidebar' , $content_function); } } } }
As you can see from the screenshot, the Genesis Theme Compatability plugin has not given the divs with class ‘geodir-company_info’ in the sidebar the additional class ‘widget’. This means they are not displaying in the same way (white background, padding etc.) as other sidebar widgets (e.g. “My Dashboard” – see screenshot). How would I add “widget” to these divs?
August 2, 2014 at 10:16 am #10760I don’t seem able to edit the post any more. I forgot to credit the creator of that custom code, Paolo.
August 2, 2014 at 10:32 am #10761Update: This problem is also effecting the page https://wpgeodirectory.com/
In the top-right of that page is a link to “My Account”, and on either side are fontawesome icons (fa-user and fa-caret-down). They are garbled in firefox, at least the firefox I am running (garbled in the same way as they are in the screenshot I posted). I just disabled all plugins and extensions and still they are garbled.
Is this just me?
August 2, 2014 at 11:50 am #10762This is unlikely to be a problem with Genesis or the Genesis compatibility plugin. The core GD plugin is responsible for the content output within the sidebar.
I am guessing that because the “geodir-company_info” items are not actually widgets, that it was decided not to apply that class to them. This can be a good thing as it allows you to style them differently if you like.
The Genesis compatibility plugin does not contain any styling (very little anyway) because there are many scenarios with various themes being available, and i didn’t want to force styles that may be ok for some but not others.
In your child theme you will just need to style those divs to make them similar to your other sidebar widgets – as a start you can add this:
.geodir-company_info { background: #fff; }
I tried to view your site to troubleshoot the font-awesome issue but it is behind a maintenance screen – we would need you to add login details in a private reply to be able to look at this further – but from your image it looks as though font-awesome is not loading…
August 2, 2014 at 6:37 pm #10804As far as awesomefont goes, I think there is a problem with your browser. Icons are displaying just fine on wpgeodirectory.com with any browser on my end.
When I randomly get that problem (very rarely on firefox) and on any website, I just clear cache and problem vanishes.
For the sidebar issue, I quote John’s explanation.
Thx
August 3, 2014 at 1:45 am #10822Thanks so much for your replies. I checked again today with Firefox and the problem has disappeared. I didn’t think of clearing the cache yesterday – perhaps that was it. I also installed the Fontawesome font on my computer, which may be related.
I understand that I can add styling to
.geodir-company_info
, however, it’s not just the white background. There is padding and other possibly other styling, and since Genesis is responsive, this will change depending on screen size.
One way to fix this is to find every instance of
.widget
in the Genesis childtheme stylesheet and add
.geodir-company_info
. That would probably work.
I was hoping for a neater solution – adding
.widget
to the class of those asides. I haven’t been able to find documentation on GeoDirectory filters and hooks and such, which would have been my first place to look to try to find the solution myself. It may be easier just to solve this problem with the stylesheet.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket