Notifications
Clear all

[Closed] Question about an other plugin compatibility

26 Posts
4 Users
8 Reactions
14.4 K Views
Posts: 1602
Topic starter
(@anonymous20)
Noble Member
Joined: 9 years ago

Me neither, it didn't work right (sometimes it worked, sometimes not fully).

But forgot to update here my results.

Robert
Posts: 10590
Admin
(@robert)
Support Team
Joined: 9 years ago

Please ignore this code, if you have it in your functions.php, please remove it.

Just enable the "Enable WordPress Shortcodes in Post Content" option in Dashboard > Forums > Settings > Features Tab.

1 Reply
(@anonymous20)
Joined: 9 years ago

Noble Member
Posts: 1602
Posted by: Robert

Please ignore this code, if you have it in your functions.php, please remove it.

Just enable the "Enable WordPress Shortcodes in Post Content" option in Dashboard > Forums > Settings > Features Tab.

I already have that ON. But it doesn't work at all ( i mean the shortcodes work, the specific link function doesn't).

Robert
Posts: 10590
Admin
(@robert)
Support Team
Joined: 9 years ago

If your function is a custom function you should use wpForo hooks. Just use one of these filter hook to make some change in forum post contents:

  • 'wpforo_content'
  • 'wpforo_content_before'
  • 'wpforo_content_after'

 

If that's a plugin, you should apply WordPress 'the_content' hook in wpForo 'wpforo_content' hook. First you should disable the "Enable WordPress Shortcodes in Post Content" option in Dashboard > Forums > Settings > Features Tab, as far as I know 'the_content' hook already does this. Then put this code in your active theme functions.php file:

function apply_the_content_on_wpforo_content( $content, $post ){
return apply_filters( 'the_content', $content );
}
add_filter( 'wpforo_content', 'apply_the_content_on_wpforo_content', 10, 2);

 

2 Replies
(@anonymous20)
Joined: 9 years ago

Noble Member
Posts: 1602
Posted by: Robert

 

If that's a plugin, you should applay WordPress 'the_content' hook in wpForo 'wpforo_content' hook. First you should disable the "Enable WordPress Shortcodes in Post Content" option in Dashboard > Forums > Settings > Features Tab, as far as I know 'the_content' hook already does this. Then put this code in your active theme functions.php file:

function apply_the_content_on_wpforo_content( $content, $post ){
return apply_filters( 'the_content', $content );
}
add_filter( 'wpforo_content', 'apply_the_content_on_wpforo_content', 10, 2);

 

THAT works rather nice Robert, much appreciated.

 

(@anonymous20)
Joined: 9 years ago

Noble Member
Posts: 1602
Posted by: @robert

If your function is a custom function you should use wpForo hooks. Just use one of these filter hook to make some change in forum post contents:

  • 'wpforo_content'
  • 'wpforo_content_before'
  • 'wpforo_content_after'

 

If that's a plugin, you should apply WordPress 'the_content' hook in wpForo 'wpforo_content' hook. First you should disable the "Enable WordPress Shortcodes in Post Content" option in Dashboard > Forums > Settings > Features Tab, as far as I know 'the_content' hook already does this. Then put this code in your active theme functions.php file:

function apply_the_content_on_wpforo_content( $content, $post ){
return apply_filters( 'the_content', $content );
}
add_filter( 'wpforo_content', 'apply_the_content_on_wpforo_content', 10, 2);

 

 

@Robert this is an old topic, still i have a question that you may help me.

While the above semi-works, it seems that the _content is working not on the whole/finished page but for each post of the topic.

For example while the limits of links are set to 3 per page, in wpForo case and the above the limit is imposed to every POST of the topic and not the whole page.

That results in a big ammount of links in the topic page, and same links.

I know i'm asking much, still is there a way or hook that could solve this? I mean to filter everything AFTER the page is done/finished.

Thanks

 

Posts: 1602
Topic starter
(@anonymous20)
Noble Member
Joined: 9 years ago

So i would like to say why i need that and maybe someone will find it useful.

I try to auto-interlink some specific words or small phrases (2-3 word) all over my site. That means for example i add one URL and some keywords in AAL plugin (Auto Affiliate Links). Works for me with some 100 urls without a speed problem.

Then every Blog post, Page and now wpForo post will use those. So i'm able to do some serious interlink automatically.

The AAL plugin is not actually for that, it is for affiliate links but internal links work very well also (they are all URLS, so ....)

1 Reply
Wendell
(@wendell)
Joined: 7 years ago

Reputable Member
Posts: 245

@anonymous20 this is brilliant. Thank you!

Page 4 / 4