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

Also, note that in the editing screen, below the visual composer, there’s a meta box where you can select to display only unique articles on the page. But I don’t think you can specify which box will display a particular post without the strategizing Christopher mentioned.

TheMediumUTM
tagDiv Member

Got it! 😀 Note to self: don’t rely on Advanced Custom Fields’s have_rows() function to know what post it is if I’m in a module…

For anyone else having a similar problem with ACF: just remember to pass the function the $post object when you see the theme code using $this 🙂

TheMediumUTM
tagDiv Member

Hmm… But I did just notice that the blocks inherited some other things I did to the modules. So I guess they’re just not calling the function the way I expect. Will poke my head in a few more places.

TheMediumUTM
tagDiv Member

Hmm… I tried it out a bit but it starts to look odd unless the image is exactly the height you put in there. Better wait for one of the team to advise. 🙂

TheMediumUTM
tagDiv Member

In the Custom CSS section of the theme panel, copy and paste this:

.td-big-slide-background, .backstretch, .td-image-gradient {
height: 600px !important;
}

Then change that height value.

I haven’t fully tried this out and it looks like the scroll is kind of ineffective on tall images, so maybe wait and see if there’s more to this.

TheMediumUTM
tagDiv Member

Try entering this CSS in Custom CSS under theme panel:

.wp-caption {
  margin-left: 0px;
}
TheMediumUTM
tagDiv Member

🙂

TheMediumUTM
tagDiv Member

I know I’m not @Lucian, but maybe I can still help 🙂 There are a few plugins that do this, such as: http://wordpress.org/plugins/easy-add-thumbnail/

Some of these plugins only affect new posts, but that one looks retroactive.

(Note that after you use that plugin, if you don’t see a change, clear your cache if you’re using a cache plugin.

If you still don’t see a change, follow these instructions: https://forum.tagdiv.com/how-to-fix-strange-thumbnails .)

TheMediumUTM
tagDiv Member

@cleverliving – If you do want to target all pages, you can use the CSS above in the following way (and this is the same process for any CSS @Lucian gives you) :

1. Open your theme panel
2. Scroll down and find the “Custom CSS” section on the left
3. In the first box there, paste this CSS:

body {
  font-family: 'PT Sans', sans-serif;
  font-size: 14px;
  line-height: 21px;
}

This section works by overriding the CSS specified in the theme by default, which is what you’ve just copied in. So now…

4. Change these style attributes to the ones you want. For example, let’s say you want your page text to be Times New Roman at 16px and lines that are 24px high. Your box would contain this:

body {
  font-family: 'Times New Roman', serif;
  font-size: 16px;
  line-height: 24px;
}

5. Save settings and clear cache (if you use one) when you’re done.

Why does this work? Because the text on pages is just a <p> that doesn’t have any other font info to inherit. Note that by changing the body CSS like we do here, you’re hypothetically affecting a lot of the site, but most of the other text has other styling that overrides this body styling.

TheMediumUTM
tagDiv Member

Yup – the question is, when a parent category is active, all its child cats are also considered active, judging by how they respond to this CSS (e.g. on the Opinion page I linked to).

So I was wondering if there was a way to distinguish between those two in CSS, to have the parent category reflect being active but not the child. Seems unlikely, though.

If not maybe the dropdowns should just not have this effect of being white when active… but I’m not sure — is that class .sub-menu?

TheMediumUTM
tagDiv Member

One way to do it is to add this custom css (in your theme panel or in a child theme):

.widget {
  padding-bottom: 20px;
}
TheMediumUTM
tagDiv Member

Doesn’t look like an option. But in the theme’s style.css file I find this:

body {
  margin: 0;
  font-family: 'Verdana', sans-serif;
  font-size: 14px;
  line-height: 21px;
  color: #333;
  background-color: #fff;
}

Copy and paste that into your custom css section of the theme panel, or into your style.css if you’re using a child theme, and then change the font to heart’s content.

TheMediumUTM
tagDiv Member

That looks like the visual editor trying to render the shortcode; switch to the text editor tab (top right in that image) and check again.

P.S. I know it’s a little strange to think of that as the “visual editor”. 🙂 Let’s just say WP has a default text editor and a default visual editor, which is kiiiind of WYSIWYG, and then this theme comes with a plugin for a super-visual editor.

TheMediumUTM
tagDiv Member

1. That widget looks like a normal TagDiv slider pulling from a category or tag slug. You can find this in your widgets list. I don’t want to install the demo site and check but it’ll be something like that.

2. The block options, whether widget or in the visual editor, have a setting “show child categories menu” that you can check for this effect.

TheMediumUTM
tagDiv Member

1. I haven’t seen a way, but it is a little flexible; it seems to crop a little when it executes the resize. The original demo images are not actually all the same dimensions before being resized, e.g.:

http://demo.tagdiv.com/newspaper/wp-content/uploads/2013/07/DeskWalls-672.jpg

http://demo.tagdiv.com/newspaper/wp-content/uploads/2013/07/DeskWalls-124.jpg

And the featured images on my site, which were all 960×540 from when I imported them to this WordPress install, are cropped pretty well in the big slider. Note that you might be facing an issue that there is some documentation on:

https://forum.tagdiv.com/how-to-fix-strange-thumbnails/

2. The homepage is a regular WordPress page that gets marked as the front page in the WordPress settings (under “Reading”). You could have the other pages look like it by editing the homepage, switching to classic mode, copying all the shortcodes you see there, and pasting those into a new page. Then switch to the backend editor on the new page and tweak from there.

TheMediumUTM
tagDiv Member

The issue looks like the fact that you’re setting .sf-menu to display: block on screens smaller than 767px. The team has designed the two menus (desktop and mobile) to both exist on the page and just hide one or the other using display: none. (Not a great way to do it in terms of SEO but they say they’re working on it.) By setting sf-menu to display:block you’re forcing it to show on mobile too.

The actual mobile menu id is #td-mobile-nav — that’s the one that slides in on the side. The little toggle icon for it is td-top-mobile-toggle. Your CSS would want to affect one of those. But are you sure you want to centre the mobile menu as well? There isn’t much to centre. 🙂

TheMediumUTM
tagDiv Member

There are a few plugins that do this kind of thing, e.g. https://wordpress.org/plugins/add-to-content/

You can also use a child theme and edit your functions if you’re comfortable with that sort of thing. Googling this yields a fair number of support posts, e.g. this simple one: http://wordpress.org/support/topic/adding-custom-text-to-bottom-of-all-posts-in-particular-category (Admittedly outdated but still looks applicable.) Or edit your single post templates directly.

TheMediumUTM
tagDiv Member

P.S. If you’re a little obsessive (like me) and are willing to pay the $28 to get the full version and make the update counter go away, it might not be worth it. Someone else just posted about trying this and found that a newer version messed with the big slider, on that particular implementation anyway: https://forum.tagdiv.com/topic/wpbakery-version-ussue/ So it’s probably best to wait for TD to update with the theme.

TheMediumUTM
tagDiv Member

Yup, one of the more popular types of plugin, I find 🙂

TheMediumUTM
tagDiv Member

Er, no change on hover or active. I forgot that normally, the dropdowns already have that white effect on hover, which is nice, although I don’t like it hovering on the parent menu, only active. Hmm…

TheMediumUTM
tagDiv Member

Hmm… One minor side effect is that if you’re on a category, then any subcategory items in the dropdown menu are also white, which means they have no change on hover (see e.g. the Opinion dropdown when you’re on http://building.mediumutm.ca/opinion/). Whereas it works great when on one of the subcats themselves: http://building.mediumutm.ca/opinion/editorial/

Is it possible to differentiate that? Probably not, eh? (I guess I could style those items with a new dropdown class that doesn’t react like that)

TheMediumUTM
tagDiv Member

Thanks. That’s what I tried at first, but it looks like the condition is never triggered because the output isn’t so straightforward. (I realized that the condition doesn’t even specify the header, so it wouldn’t pull the right ad box anyway.)

A var_dump of

td_global_blocks::get_instance('td_ad_box'))

yields

object(td_ad_box)#1657 (2) { ["block_id"]=> string(9) "td_ad_box" ["block_uid"]=> NULL }

whether there’s content in the header ad space or not.

In the end the condition had to be

if (td_global_blocks::get_instance('td_ad_box')->render(array('spot_id' => 'header')))

and I was wrong about using empty because what that returns is not a variable.

Thanks for the help! Hope someone else benefits from this thread.

TheMediumUTM
tagDiv Member

Perfect, thanks!

TheMediumUTM
tagDiv Member

Note that if you install the demo, it’s easy to delete the associated posts, pages, categories, etc.

TheMediumUTM
tagDiv Member

Thanks! Will try that out.

Viewing 25 posts - 301 through 325 (of 349 total)