Results 1 to 2 of 2

Thread: Problem with Indeed Feed

  1. #1
    Thread Starter
    Senior Member johnjohnjohn's Avatar
    Join Date
    May 2011
    Location
    Mexico
    Posts
    133
    Thanks
    12
    Thanked 1 Time in 1 Post

    Problem with Indeed Feed

    Hello


    I noticed yesterday that since I updated to Jobroller 1.7.1, Indeed can no longer use my xml feed to get jobs and publish them, while there were no problem with Jobroller 1.6.4

    Anyone knows what to do? Do I have to change something in my php file?

    thanks !


    <?php
    //Template Name: Indeed XML Generator
    header('Content-Type: text/xml');
    $doc = new DOMDocument('1.0','utf-8');
    $doc->formatOutput = true;

    //root element
    $r = $doc->createElement( "source" );
    //append root element to our document
    $doc->appendChild( $r );

    $publisher = $doc->createElement("publisher");
    $publisher->appendChild($doc->createTextNode("http://www.mywebsite.com"));
    $r->appendChild($publisher);

    $publisherurl = $doc->createElement("publisherurl");
    $publisherurl->appendChild($doc->createTextNode("http://www.mywebsite.com"));
    $r->appendChild($publisherurl);

    $job = array();
    //set args for query
    $args = array(
    'post_type' => 'job_listing',
    'posts_per_page' => -1,
    'post_status' => 'publish',
    'orderby' => 'date',
    'order' => 'DESC'
    );
    //run query
    $feed_jobs = new WP_Query($args);


    while($feed_jobs->have_posts()) : $feed_jobs->the_post();

    $b = $doc->createElement( "job" );

    $title = $doc->createElement("title");
    $title->appendChild($doc->createCDATASection( $post->post_title));
    $b->appendChild( $title );

    $company_name = get_post_meta($post->ID,'_Company',true);
    $company = $doc->createElement("company");
    $company->appendChild($doc->createCDATASection($company_name));
    $b->appendChild($company);

    $date = $doc->createElement("date");
    $date->appendChild($doc->createCDATASection($post->post_date));
    $b->appendChild($date);

    $referencenumber = $doc->createElement("referencenumber");
    $referencenumber->appendChild($doc->createCDATASection($post->ID));
    $b->appendChild($referencenumber);

    $url = $doc->createElement("url");
    $url->appendChild($doc->createCDATASection($post->guid));
    $b->appendChild($url);

    $description = $doc->createElement("description");
    $description->appendChild($doc->createCDATASection($post->post_content));
    $b->appendChild($description);

    //query postmeta table for city and state// then parse it into an array
    $location = get_post_meta($post->ID,'geo_address',true);
    $location = explode(',',$location);

    $city = $doc->createElement("city");
    $city->appendChild($doc->createCDATASection($location[0]));
    $b->appendChild($city);

    $state = $doc->createElement("state");
    $state->appendChild($doc->createCDATASection($location[1]));
    $b->appendChild($state);

    $country = $doc->createElement("country");
    $country->appendChild($doc->createCDATASection("France"));
    $b->appendChild($country);


    $r->appendChild( $b );

    endwhile;

    echo $doc->saveXML();

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Problem with RSS feed in Classipress
    By mouse in forum Help Using ClassiPress
    Replies: 2
    Last Post: January 15th, 2013, 04:28 PM
  2. Help Needed with Indeed Job Feed Problem
    By jaycee in forum Help Using ClassiPress
    Replies: 1
    Last Post: May 3rd, 2012, 10:08 AM
  3. [SOLVED] Rss Feed Problem
    By zlaws in forum Report JobRoller Bugs
    Replies: 5
    Last Post: April 26th, 2012, 10:41 AM
  4. Problem with integration with indeed.com feed
    By makotoiiimpact in forum Report JobRoller Bugs
    Replies: 5
    Last Post: January 4th, 2012, 08:24 PM
  5. Problem withh the RSS Feed
    By andree62 in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: August 15th, 2011, 10:52 AM