1

I'm managing a couple of websites from the same client. They have lots of partners and have a logo slider on the bottom of each page across 5 websites. The partners change from time to time and the content manager has to update the logos on 5 sites separately.

Maybe there's a way so that you can change the logos one time and the other sites change too.

I was thinking of a hosted xml file and images, and a widget on the site parses the xml and puts the content in a simple logo slider similar to this: https://wordpress.org/plugins/logo-slider/

Would that be the best way to do this?

1

for the idea of storing data on the provider webside, it's a good idea but I recommend to use JSON onstead of XML. it's a litte bit faster to parse and you will save a litte bit bandwith

on the provider side, you can use the WordPress AJAX helpers to make somethig like that :

add_action("wp_ajax_nopriv_logoData", function () {

    $data = array(
        "text" => "the new logo",
        "url" => "http://provider-server/wp-content/logo6.png";
    );

    echo json_encode($data);

    exit();
});

and on the client side (the 5 websites), you can do that to receive data :

$response = wp_remote_get("http://provider-server/wp-admin/adin-ajax.php?action=logoData");

$data = json_decode($response);

var_dump($data); // will show the array with the data

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.