Importing XML to WordPress, permalink problem

I figure out was I was doing wrong. There´s a tag named “post_name” in the xml. And there´s a tag named “link” So I have to set this two fields, with the adress that I need. So in the “link” fild is setup this way: <link>http://localhost/site/man-clothes/jeans-pants/ripped/rock-style</link> And the “post_name” fild I setup like this: <post_name>man-clothes/jeans-pants/ripped/rock-style</post_name> … Read more

XML asset fails to load using https

In case this helps anyone in the future: The problem was not a WordPress issue, it was a server configuration issue. Useful explanation on checking which stream wrappers are enabled on your server (used this to make sure https was enabled on my server) Enable Stream Wrappers Someone with the same issue found that their … Read more

Publish an XML feed from a CPT with ACF fields?

Here’s a fairly complete example of one way to do this. Let’s register a Job post type that will be used with our feed. /** * Register Job post type * https://developer.wordpress.org/reference/functions/register_post_type/ */ function wpse_register_job_post() { $book_args = [ ‘label’ => __( ‘Jobs’, ‘textdomain’ ), ‘public’ => true, ‘publicly_queryable’ => true, ‘show_ui’ => true, ‘show_in_menu’ … Read more

How to limit the content coming from wordpress shortcodes?

It’s better to 1st save the returned XML to a file and then loop back to unset. <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => “http://www.cpac.ca/tip-podcast/jwplayer.xml”, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => “”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => “GET”, CURLOPT_HTTPHEADER => array( “cache-control: no-cache”, “postman-token: 28025ee8-1e82-ce60-f6ae-f401118baa1c” ), )); $response = … Read more

Search XML file from within WordPress?

Here’s a PHP library which uses SOAP calls to access JIRA: https://github.com/jrbeeman/php-jira However, if you can get the XML file into a place PHP can access it then you can use general PHP calls to parse and read the XML file, e.g. SimpleXML http://php.net/manual/en/book.simplexml.php From there you can put your code in a theme template … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)