Notifications
Clear all

wpForo 1.x.x [Solved] SEO conflict with All in One SEO plugins / how can remove codes from my home page

8 Posts
3 Users
4 Reactions
2,380 Views
Posts: 4
Topic starter
(@maulla)
Active Member
Joined: 4 years ago

I noticed codes are on my home page and even on the sign-in page. Please how can I remove them: 

7 Replies
dimalifragis
Posts: 2611
(@dimalifragis)
Famed Member
Joined: 5 years ago

Remove the All in One Seo, that is NOT needed and could create issues. wpForo has its own SEO.

Also REMOVE the OPTIMIZER and caching plugin you may have.

What is that "Super Globals" i see? If it a plugin, disable it and check again.

All in all this is a conflict of plugins. Disable one by one to find the cause.

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

@hadar,

I see it works fine now.

However, you should remove All in One SEO plugin and install Yoast SEO plugin. I see All in One SEO affects wpForo SEO and totally removes your forum SEO data. All your topics and forums will be introduced as a one page for search engines. This is a big SEO problem. All in One SEO 4.1.1.1 is not compatible with wpForo.

Posts: 4
Topic starter
(@maulla)
Active Member
Joined: 4 years ago

Thanks you, I have deleted the all-in-one seo.

Please how can in add images to a post and let it be visible and not just appear as a link in the post after attaching?

 

Regards,

Maulla

2 Replies
dimalifragis
(@dimalifragis)
Joined: 5 years ago

Famed Member
Posts: 2611
Posted by: @maulla

Thanks you, I have deleted the all-in-one seo.

Please how can in add images to a post and let it be visible and not just appear as a link in the post after attaching?

 

Regards,

Maulla

Add this to your theme's function file (but in every update of the theme it will be lost).

 

function wpforo_default_attachment_image_embed($content)
{
    if (preg_match_all('|<a class=\"wpforo\-default\-attachment\" href\=\"([^\"\']+)\"[^><]*>.+?<\/a>|is', $content, $data, PREG_SET_ORDER)) {
        foreach ($data as $array) {
            if (isset($array[1])) {
                $file = $array[1];
                $e    = strtolower(substr(strrchr($file, '.'), 1));
                if ($e == 'jpg' || $e == 'jpeg' || $e == 'png' || $e == 'gif') {
                    $filename = explode('/', $file);
                    $filename = end($filename);
                    $html     = '<a href="' . esc_url($file) . '" target="_blank"><img class="wpforo-default-image-attachment" src="' . esc_url($file) . '" alt="' . esc_attr($filename) . '" title="' . esc_attr($filename) . '" /></a>';
                    $content  = str_replace($array[0], $html, $content);
                }
            }
        }
    }
    return $content;
}

 

(@maulla)
Joined: 4 years ago

Active Member
Posts: 4

@dimalifragis I used the first codes in the code snippet plugin to display images, but no changes. The second on advanced attachments works

dimalifragis
Posts: 2611
(@dimalifragis)
Famed Member
Joined: 5 years ago

Also you can create a pseudo-plugin of yours and put in there all custom fuctions and they will never get lost.

 

https://blog.nexcess.net/the-right-way-to-add-custom-functions-to-your-wordpress-site/

 

https://wplift.com/custom-plugin

Page 1 / 2