Articles of xml

How do you get all the urls of images attached to a post?

I’ve searched high and low and can’t seem to get it. I’m trying to output an XML feed with all the images attached to a post from a custom post type: </BasicDetails> <Pictures> <Picture> <PictureUrl><?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID)); ?></PictureUrl> <Caption></Caption> </Picture><Picture> <PictureUrl></PictureUrl> <Caption></Caption> </Picture> </Pictures> I’m using wp_get_attachment_url but it’s only returning one image (There’s […]

I need a standalone script in web root but still have access to the database

I am building a specialized xml output script (can’t use the built in export) and I have a file in the web root that I can call from the URL domain.com/myscript.php. However, I need to be able to do wordpress DB calls to get to the data. I have read you can load wp-load.php in […]

How to get xml file for a single post type?

Having a custom post type “Articles” with custom taxonomies “volume, issue, authors, Keywords … etc”. I need to add a button on the single post type front-end to let visitors download an xml file of the article that they read. This means an xml file about only the article being read. an example of such […]

Add valid XHTML closing img tags to WordPress galleries

Default WordPress galleries img tags close like <img> which is invalid XHTML. The lazyload XT plugin that I’m using targets valid XHTML img tags which means ending should be: <img src=”http://img.mywordpresstips.com/php/tri.jpg”/> instead of <img src=”http://img.mywordpresstips.com/php/tri.jpg”> How can I filter or modify this so lazyload works correctly? Issue explained by author of wp lazyload XT integration. […]

Moving WordPress to a different directory – update XML Post File?

OK, I am moving our WordPress install to the root of the domain. I’ve tested on a cloned version of the site that if I export and import the posts then they all load correctly – except for the fact that all the URL’s are now wrong. Should I edit each of the tags to […]

When importing – failed to import: Invalid post type feedback

I am attempting to import a site using XML generated by WordPress.com All the posts and media seem to import, but the comments fail with errors Failed to import “Sarah Toon – 2015-10-10 08:29:30”: Invalid post type feedback Failed to import “Kylie – 2015-10-10 08:34:50”: Invalid post type feedback Failed to import “Sophie Ward – […]

WordPress ajax-action failing because of newline in response

When I’m using the dashboard, for example, adding a category. The request returns valid XML as expected, but it is prepended with a newline character, causing the DOMParser() to fail. I’m not sure where to proceed for debugging, it happens on one site and not another (different server, different theme). I’ve checked, none of the […]

Attach images to posts using custom fields (just paths to images already uploaded)

I’m setting up a real estate website. I make listings using a custom post type named listings in which I have multiples meta boxes for beds, baths, and various other information. I use a plugin to import these posts because listings are generated from third-party software (XML file with Xpaths). Everything works fine when importing […]

Import External XML

I don’t know where to start with this one. I would like to create custom post type which will list properties on clients website. I would like those properties being feed from another website/software. So other website/software will be sending XML file to my WordPress site and I would like to receive that file and […]

How to import Theme Unit Test on localhost

I am a total beginner with WP and struggle to import this xml file. Tools->Import->WordPress and here I am asked for Hostname, FTP Username, FTP Password and Connection Type. I am on local mashine… When I download the plugin and try to do it manually it is the same story. So how can I import […]