WordPress 3.1.3 and Magic Fields PlugIn – calling and parsing multiline or markdown textbox into single.php?

Since a couple of days I am working on some WordPress Page for a friend of mine who is owning a company for time work. They are working with some software, that is, at the end, producing a HTML file with some tables, spans and stuff. This file actually is a template, they use to search for new employees. To make sure, they don’t have the work of setting up the employment ad twice (working with 2 different web sites), I offered them, to set up a field to enter the HTML sourcecode, containing CSS, Tables, Spans and a lot of “dirty” stuff. Since tables are not
very search enginge optimized (don’t let’s talk about W3C), I told them to use divs instead. – what a mistake I made 🙂

Anyway: I used some lines of code like:

Read More
<?php
include('simple_html_dom.php');
$html = new simple_html_dom();
$html->load_file('http://www.prophiler.de/rentaman2/stellenanzeige');

foreach($html->find('SPAN.SHeadcompany') as $a)
{
            $a->class = null;
            $a->innertext;
            echo $a->innertext = '<div class="head1">' . $a->innertext . '</div>';
}
... continue with all SPAN classes...
?>

to parse the file and write the contents back into div classes.
The problem I have is to call AND parse the custom field actually. This is why I called the HTML file through an invisible WordPress Page. This was for presentation only. Now I would like to call the field value directly and append it to the parser. I don’t get it, since I am pretty new to PHP.

Is anybody out there, able to give me some hints on how to handle it?

Related posts

Leave a Reply