Home User profile
tagDiv Member
The Medium is the student newspaper of the University of Toronto Mississauga. We use tagDiv's excellent Newspaper theme, with some style and under-the-hood functionality customization.
TheMediumUTM
tagDiv Member

Switching away from Open Sans and back to it seemed to do the trick. I can now see that the CSS file at fonts.googleapis.com is being loaded by all browsers. Thanks for your help!

TheMediumUTM
tagDiv Member

I’ve also had the same behaviour confirmed by someone on another device now.

The screenshot you posted shows that the CSS names Open Sans for the font-family. I agree, the CSS is being generated correctly. But the question is whether the browser can actually find and display that font.

Yours might be displaying it because you have it installed on your device. I’m not confident that that’s how it works, but that has factored into other weird font behaviours in the past.

Can you show me whether your browsers are downloading the Open Sans CSS file and hence fonts from fonts.googleapis.com, as in my first screenshot?

Thanks!

TheMediumUTM
tagDiv Member

Sweet 🙂

TheMediumUTM
tagDiv Member

Thanks! My mistake. Fixed now and working well. (Suggestion: sanitize/strip those social media inputs? A lot of them are kind of finicky about what you can and can’t include.)

TheMediumUTM
tagDiv Member

Thanks for your reply!

Actually, GTMetrix isn’t suggesting that I just make the images smaller. It’s saying that the images are being displayed at that specified width and height in the <img> tag, but the actual file is bigger and has to be scaled down to that display — which means a few extra kb of image have been downloaded.

The theme does in fact use that size, indirectly: http://www.screencast.com/t/6sIqSW4yk

After poking around, I realized what’s happening. It’s the CSS scaling to different screen sizes that results in these extra dimensions, so GTMetrix must be doing its virtual render on a “screen” less than 1200px wide.

Since the dimensions of these <img> change dynamically after page load, the image file doesn’t get downloaded again for each scaled-down size, nor would we want it to. So this is not really a problem. 🙂

Maybe a documentation note to explain this for anyone looking at the warnings from speed tests like this?

TheMediumUTM
tagDiv Member

Revisiting this: considering the importance of ACF to a lot of sites, and the fact that it doesn’t necessarily add any frontend pages (if that’s relevant for the speed booster plugin), do you think you could just add it to the allowed plugins?

TheMediumUTM
tagDiv Member

You mean sites like this and these, right?

To be frank, I laughed when I read this post. It would be more than a waste of money, it would be very hard to adapt this theme to a single-page website. It’s designed for displaying blocks of articles, columns, sidebars, category headers, attractive search, various menus and footers, ads, etc. etc., all of which is useless for a single-page website. I’m not even sure you can easily adapt this theme to go full-width as most single-page website are. The one feature you could potentially make good use of is Visual Composer.

I don’t envy you. Dealing with a client who has no idea what his needs are is hell. I’m not staff, but my advice would be to try to convince the client to go with something sane. You’ll lose your mind trying to turn this theme into something unrecognizable.

TheMediumUTM
tagDiv Member

Pretty sure; I have caching, Cloudflare, etc. turned off for now while I develop the site. Oh well!

TheMediumUTM
tagDiv Member

Interesting… It seems to appear at unexpected times, so I’m not sure what the exact conditions are. Maybe it’s a bug in Chrome, for all I know. I guess I’ll leave it for now, since it happens pretty rarely.

Thanks, as always!

TheMediumUTM
tagDiv Member

Thank you! That worked — copying the function from td_category_template, avoiding using $this, and switching parent to self. 🙂

TheMediumUTM
tagDiv Member

I just tried it successfully. Your error probably comes from not inserting php tags.

Make sure that your single_template_##.php looks like this:

http://www.screencast.com/t/ddmfIhLu

And your loop-single-##.php looks like this:

http://www.screencast.com/t/n2RR6aC9c5bg

As for future updates that make this an option in the theme panel: yeah, could be nice.

TheMediumUTM
tagDiv Member

P.S. This sounds like the same issue as the one I had (https://forum.tagdiv.com/topic/possible-bug-2/), which was successfully resolved.

TheMediumUTM
tagDiv Member

You switched just the comments line and the load template line. What you need to do is switch around all five lines in the two files.

Try moving the comments line into that block in the corresponding loop-single file (this is the move I was unsure about but it’s very likely fine). Then, in loop-single, rearrange the lines to get the desired order: comments, prev-next, etc. (if you’re looking at the right files, this part can’t fail).

TheMediumUTM
tagDiv Member

Ah, okay. Thanks for the solution as well!

TheMediumUTM
tagDiv Member

This is part of the single template code, found in single_template_#.php and the corresponding loop-single-##.php in the Newspaper theme folder.

single_template_## loads loop-single-##, which has this block:


<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>

and single_template_## also has, immediately after loading single-loop-##, this:


comments_template('', true);

Swapping those various lines around would do the trick.

The two robust ways to do this update are via a child theme or via the new theme API.

The theme API is a simple plugin that adds your custom templates, modules, blocks, etc. to the theme panel. I just switched most of my modifications that were in a child theme to the theme API, since child themes come with other complications and potential slowdowns.

https://forum.tagdiv.com/the-theme-api/

In this case, you would (1) create a plugin folder, (2) find the template(s) you want to make this change in and copy both the loop-single-## and single_template_## files for those templates into your plugin folder, (3) edit them to swap the order of those elements, (4) add the code to register them in the main plugin file, and (5) upload and activate the plugin in your dashboard and switch your post templates in the theme panel.

If you wanted to do this via child theme instead, it would be less work but not quite as “robust”, at least in the opinion of some.

https://forum.tagdiv.com/the-child-theme-support-tutorial/

This time you would simply make your child theme as per that tutorial, copy the single templates in there, and edit and upload them and they would invisibly replace the ones that come with the theme.

P.S. Because that comment template code loading is in single_template_##, moving it to loop-single-## might work oddly. Or it might be fine. Haven’t tried it myself.

TheMediumUTM
tagDiv Member

Every big grid block has a “grid style” from 1 to 5. I think the one you want is grid style 1. Edit your homepage and find the big grid element at the top. Edit its settings and change the big grid style: http://www.screencast.com/t/zKpp67CA

TheMediumUTM
tagDiv Member

In Theme Panel -> Social Networks, put the full URL, e.g. http://facebook.com/viraljagat. As another user that’s what I’d guess is happening.

TheMediumUTM
tagDiv Member

I don’t believe this is available without modifying the theme, but there are many great sharing plugins for WordPress that give you more flexibility. One that was made specifically for this theme is Sharify by Mehedi; that’s the one I use on my site.

TheMediumUTM
tagDiv Member

Under the Ajax filter tab you have this field: “Ajax dropdown – show the following IDs:”

These are the IDs of specific categories to show.

To get the ID of a category, go to Posts -> Categories in your dashboard, and hover over the Edit button for that category. Look at the URL, which will include a number like “&tag_ID=23”.

Find the IDs of the subcategories you want to show and enter them into “Ajax dropdown – show the following IDs:”

TheMediumUTM
tagDiv Member

These icons (you can see that the dropdown on your menu items is also missing) are supplied in a font that is apparently not being found. If you didn’t delete it, one way this happens is that fonts are not picked up by default by external delivery solutions. Guess from a fellow theme user: Did you recently acquire a CDN service?

TheMediumUTM
tagDiv Member

This sometimes happens because of permalink structure or URL redirection. Not a staff member, but to perhaps give them a head start when they check: Which plugins are you using?

TheMediumUTM
tagDiv Member

Hi,

Okay, try any search at http://themedium.ca, e.g. “election”. (Note that I’ve made the search inline, not dropdown.)

Right now I’ve included
.med-nav-search-results .header-search-wrap a:after {
display: none;
}

So use display: initial or something similar to see the problem, like so:

http://www.screencast.com/t/6HCJM82PZRh

TheMediumUTM
tagDiv Member

Thanks! I would still recommend that you say it has to be numerical. I know your instructions give td_module_myname as an example, but when I was trying this out, only integers got converted to data-option-values. For example, with a module to which I gave the id td_module_myname:

http://www.screencast.com/t/tLWQagMtb8

Not sure why this is; it’s just the behaviour I’m seeing. It’s fixed when I make the suffix numerical.

TheMediumUTM
tagDiv Member

That was my other thought, in which I’m not sure why you need the first half of the condition. I just ended up using WP’s get_post to make a proper object, which is more reads, but not too bad. Thank you!

TheMediumUTM
tagDiv Member

…which might just answer my first question

Viewing 25 posts - 26 through 50 (of 349 total)