Homepage Feature

Thanks, I think its part of this issue:

1 Like

Ah I figured this out, on second look I needed to add an adjustment to the min-height for mobile (it was too large in some cases). If you update the theme component that space should go away now.

8 Likes

Looks good now! Thank you!

1 Like

Thanks for that update this was my issue as well, I’ll update and have another go at it. Great plugin btw. :+1:

1 Like

Unfortunately the issue regarding posts that only contain a YouTube video have not been resolved, on the contrary they just do not show up anymore and are assumed “empty” for example if I have 3 posts with a featured tag everything looks good once I add a third one with a YouTube video it suddenly displays 2 and excludes the YouTube one.

We’re going to update our community to this feature today. So far it isn’t working. Is there a minimum requirement for version of Discourse?

There shouldn’t be anything here that requires an incredibly recent version. A couple things to check:

  • If you right click to inspect your homepage do you see any errors in the console?

  • Do you have at least one topic tagged with featured, and that topic has an image in its first post?

Hi - currently this displays above the Versatile Banner component. Is there any easy way to display it below? I.e. Below the Versatile banner but above the navigation pills. Cheers

1 Like

I encountered this problem and decided to run an unofficial test of disabling the banner.

Would love to be able to reintroduce it, though.

Is there any elegant way to display it to trust level 0 users only? That way I want to “force them so read beginner guides”. After they reach tl1, I want to hide it again.

Just to note that this fixed the problem:

1 Like

Hi! Is it possible to show more than 3 topics with this theme component?

The tag you selected cannot be used.

I get this error when I set a topic with a tag named “featured”.

Trying to figure out what I’m doing wrong.

Probably something in my settings I’m sure.

[EDIT] fixed, its the option the category settings “allow use of other tags”

Anyone know the CSS to hide the featured topic’s titles? Not the word “Featured Topics”, but the actual title of the topic. I’m using the titles in the image, so having text below them is excessive.

This should do it

.featured-topic-wrapper .featured-topics .featured-topic h3 { 
  display: none; 
}
4 Likes

How can i display the homepage feature component under the discourse search banner component or under the versatile banner component ?

1 Like

I think we can make an improvement on our end for this so there’s a better selector than #main-outlet > span:first-child… but this CSS added to your parent theme should do it:

#main-outlet > span:first-child {
  display: flex;
  flex-wrap: wrap;
}

.above-main-container-outlet {
  width: 100%;
}

.above-main-container-outlet.search-banner {
  order: -1;
}

This sets the container with the components to use flexbox, which then allows you to reorder them.

6 Likes

If the forum is private and is only accessible via login then after login the site goes to https://example.com/tags/featured.json

It also shows a space where the featured post would appear at the top of the page before login

PS there’s no link to this page in the component settings like other components so submitted an issue on GitHub before realising I could come here

1 Like

Have you made any changes to the component? I don’t see this behavior… I log in from the “account required” page and I’m taken to the homepage as expected.

Hmm, it shouldn’t… what I see is an empty div…

I guess maybe you’ve added some additional padding or margin to .homepage-featured-topics? If that’s the case you might want to target a different div instead… .custom-homepage-wrapper would be my next choice and should function the same way.

Thanks! I’ve added it.

1 Like

Thanks @awesomerobot for your reply.

I’ve tried it again and realise now that it doesn’t work properly unless there is an image in the Topic - plus I made sure it’s only visible to logged-in users. I had only one featured Topic without an image so maybe that was the issue?

It’s working now great. Thanks for your work on this.

By the way the component settings still aren’t showing an About link on my setup even though I’ve updated just now - see the screenshots below

I can see now that about.json has the code needed:
eg for Alternative Logos (Alternative logos per theme) it’s

{
  "name": "Alternative Logos",
  "about_url": "https://meta.discourse.org/t/alternative-logo/88502",
  "license_url": "https://github.com/discourse/discourse-alt-logo/blob/master/LICENSE",
  "component": true
}