This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Multisite option not working

#18362
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

I may have managed to find a possible solution, even to display posts from cross-site with images. I had to make a direct modification within one of the template files as well, but it seems to be doing the trick.

As I mentioned earlier, the problem is, that the network blog needs to be switched before a cross site post is processed on the results page. WordPress however does not have any method to memorize the blog ID for each post. My solution to bypass this problem was the following:

1. I have simply added this short custom code to the theme functions.php file:

2. I have added two additional custom code sections to the themes\classipress\content-ad_listing.php file:

First addition

Second addition

You can see these additions within that file. A full back up of the original can be found here, and a back-up of the modified here.

On the side note, the second addition is not neccessary, I only added it, because I noticed that the images are linking to an incorrect URL on the subsites as well. For example, this post, where the image is broken: https://i.imgur.com/nqA3xAL.png
The second addition is only to resolve this on the main site, but once the images are fixed on all sub-sites, that code section should be removed.