• I am preparing my own xml feed for one client. I want to add attributes to output xml feed.

    <images>
    <photo id="1">
    <url>https://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg</url>
    </photo>
    </images>

    in array, i have passed like below code, but it doesn’t work

    $images['photo'] = array('@attributes'= array('id'=>'1'));
    $images['photo']['url'] = 'https://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg';

    But output comes in below wrong xml format

    <images>
    <photo>
    <property>
    <id>1</id>
    </property>
    <url>https://www.xyz.com/wp-content/uploads/wpp_import_files/1/1683/739192434.jpg</url>
    </photo>
    </images>

    Any ideas how to add attributes?

    https://www.ads-software.com/extend/plugins/wp-property/

  • The topic ‘[Plugin: WP-Property – WordPress Powered Real Estate and Property Management] How to create attribut’ is closed to new replies.