Join our Facebook Group
ScriptsTribe • Sngine • Community
Join

Fóruns

The great place to discuss topics with other users

Add hashtags to landing page

'
Join the Conversation Responder a publicação
Jane Marcia
Admin
Joined: 2025-05-17 02:14:16
2025-05-27 18:32:11

Eddy! you and you cache issues lol it s working on my custom landing

Edy Lee
Admin
Joined: 2024-11-24 00:57:42
2025-05-27 21:07:31

By default, trending hashtags are only shown if users are logged in or your site has a public newsfeed. Let's make them usefull for any page.

🛠️ Open root/index.php and find:

// get trending hashtags
if (!(!$user->_logged_in && !$system['newsfeed_public']) && $system['trending_hashtags_enabled']) {
  $trending_hashtags = $user->get_trending_hashtags();
  $smarty->assign('trending_hashtags', $trending_hashtags);
}

Replace it with:

// get trending hashtags (ScriptsTribe modification)
if ($system['trending_hashtags_enabled']) {
  $trending_hashtags = $user->get_trending_hashtags();
  $smarty->assign('trending_hashtags', $trending_hashtags);
}

✅ Now you can add this in your landing page template (e.g. landing.tpl):

<!-- trending -->
{if $trending_hashtags}
  {include file='_trending_widget.tpl'}
{/if}
<!-- /trending -->

📍 Want to show hashtags on other pages too (like profile.php, explore.php, etc)? You must add the same PHP logic there to assign $trending_hashtags before using it in the template.

Jane Marcia
Admin
Joined: 2025-05-17 02:14:16
2025-05-27 21:10:45

By default, trending hashtags are only shown if users are logged in or your site has a public newsfeed. Let's make them usefull for any page.

🛠️ Open root/index.php and find:

// get trending hashtags
if (!(!$user->_logged_in && !$system['newsfeed_public']) && $system['trending_hashtags_enabled']) {
  $trending_hashtags = $user->get_trending_hashtags();
  $smarty->assign('trending_hashtags', $trending_hashtags);
}

Replace it with:

// get trending hashtags (ScriptsTribe modification)
if ($system['trending_hashtags_enabled']) {
  $trending_hashtags = $user->get_trending_hashtags();
  $smarty->assign('trending_hashtags', $trending_hashtags);
}

✅ Now you can add this in your landing page template (e.g. landing.tpl):

<!-- trending -->
{if $trending_hashtags}
  {include file='_trending_widget.tpl'}
{/if}
<!-- /trending -->

📍 Want to show hashtags on other pages too (like profile.php, explore.php, etc)? You must add the same PHP logic there to assign $trending_hashtags before using it in the template.

ScriptsTribe https://scriptstribe.com