Exactly. I also had problems with the icon fonts and that was a good clue!
Thanks for the help Catalin
Hi Catalin, thanks for your quick reply.
After a few hours testing the plugins I decided to make a copy of the website on a different subdirectory (changing the permalinks and other references to the URL in the database as usual).
Everything is working fine now, and although I’m not 100% sure about it, looks like what was causing the error was a file blocked by the lack of ‘Access-Control-Allow-Origin’ headers (somehow it was trying to load it from a different folder/subdomain, which was blocking that request).
Advice for other users? When moving WP from one place to another, make sure you change all the URLs in your database properly! ๐
Hi, I finally managed to get this working.
In case it helps to someone, this is the way of showing the author avatar from a custom block built through the API:
<?php echo get_avatar($this->post->post_author, 55)
(being 55 the size of the picture)
-
This reply was modified 10 years by
Chucho.
Thanks for your answer Andrei, and for taking the time to find the link to the JS code.
I was trying to get a solution that works purely from the child-theme, hence my attempt to solve it from menu-mobile.php, but will give a go to yours ๐
Hi,
I managed to create and insert a new menu for the mobile view.
It shows up in the admin panel and loads the elements in the front-end perfectly, but somehow it’s breaking the code of the submenus (both standard and mega menus) that I have in the main menu.
Let’s see if I can make it more clear:
If I open ‘menu-mobile.php’ and switch back to using ‘header-menu’ everything gets back to normal (submenus in the desktop view appear as they should) but when using my new ‘mobile-menu’ they just show a list of subcategories, unstyled and without images.
I tried using other menus in my ‘menu-mobile.php’, or even deleting all the code related to loading one, but the same keeps happening. It somehow seems to need ‘header-menu’ to be loaded in there.
Do you have any clue of how to solve this issue?
[Note]
Just to see if the problem was coming from my new menu I tried to use both at the same time.
In this scenario everything works as it should, but well, It’s not ideal to have both menus in the mobile view, isn’t it? ๐
Great! Happy to help ๐
Thanks for the quick reply Catalin.
How about overriding the function (from functions.php in the child theme) using higher priority?
I tried the following code (screenshot) and it’s working well, not loading any of the default files, but I’m unsure if it could be good as a long-term solution.
function override_fonts() {
td_global::$default_google_fonts_list = array (
'653' => array(
'css_style_id' => 'google_font_work_sans',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Work+Sans:400,700'
),
'654' => array(
'css_style_id' => 'google_font_bitter',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Bitter:400,700'
),
);
}
add_action( 'init', 'override_fonts', 20 );
โ Replace default fonts (Open Sans and Roboto) with custom ones (Works Sans and Bitter, also from Google)
Hi Catalin,
Apart from the CSS changes (that would fix the ‘visual side’ of the issue), Is there a way to avoid the theme to load the styles related to that couple of fonts? That should improve the speed of the whole site.
I tried overwriting ‘includes/td_config.php’ (lines starting on 3253) from the child theme without much luck.
Many thanks in advance!