[Resolved] Schema Data Support
I guess this is really a two part question.
Does TablePress have some way to support Schema data?
Or where would I hook / filter the Markups output to adjust and add the correct itemtype and itemprop to the correct tags. Love the plugin 🙂
Below is a example of what I am looking for.
<table class="zebra-striped"> <tbody> <tr> <th class="rank"> Rank </th> <th class="school"> School </th> <th class="faculty"> Full-time to Part-time Faculty </th> <th class="financial-aid"> Financial Aid Rate </th> <th class="acceptance"> Acceptance Rate </th> <th class="retention"> Retention Rate </th> <th class="graduation"> Graduation Rate </th> <th class="accredited"> Years Accredited </th> <th class="default"> Default Rate </th> <th class="jobs"> Job Placement Rate </th> </tr> <tr itemscope itemtype="http://schema.org/CollegeOrUniversity"> <td class="rank" itemprop="aggregateRating"> 1 </td> <td class="school" itemprop="name"> <a rel="nofollow" itemprop="url" href="http://www.tamu.edu">Texas A & M University</a> </td> <td class="faculty"> 22.71 to 1 </td> <td class="financial-aid"> 52% </td> <td class="acceptance"> 63% </td> <td class="retention"> 92% </td> <td class="graduation"> 81% </td> <td class="accredited"> 88 </td> <td class="default"> 5% </td> <td class="jobs"> NA </td> </tr> </tbody> </table>
ah, yes, my bad.
tablepress_table_render_datais what I meant.
I have it pulling all the data properly, I just need to go in and clean up my code. Maybe make it a little more DRY.
It is complete sir TablePress Extension: Schema Data
Well I ran into a issue, Its working properly on the backend when you hit the preview. But it doesn’t seem to be working on the front end. Any idea on what may cause that?
great! I’ll probably have time to take a look tonight.
For the issue on the frontend: It might be possible that you are running into caching issues. Please try extending the Shortcode on the page to
[table id=123 cache_table_output=false /]
Tried that and it’s still not showing up on the front end, but it is working on the editors preview menu.
did you make this change in the “Text” editor or in the “Visual” editor?
The table output caching is the only thing that I can really think of here…
Or are you maybe using some other caching?
Text editor and its local so it shouldn’t be running any caching “varnish” but to be safe I flushed it.
Do you use Skype, ScreenHero or Email? Maybe easier to debug, also have a few other questions that would be out of context of this thread.
ok, I just had a very brief look at the code in your pull request. The
apply_filterscalls are not passing any arguments, thus your filter handlers don’t get any data.
At the moment, you shouldn’t even see Schema data when using the Preview mode, I’m pretty sure.
And yes, the email address that you found is correct 🙂 If it’s about TablePress (and can be discussed publicly), I’d like to keep it here in the forums, if you don’t mind. Otherwise, feel free to email me, of course.
You may want to double check because they have the following
$other_attr = apply_filters('tag_custom_attr', '', $this->table, $this->table['id'], $cell_content, $row_idx + 1, $col_idx + 1, $this->colspan[ $row_idx ], $this->rowspan[ $col_idx ] );
$tr_attr = apply_filters( 'tr_custom_attr', '', $this->table, $this->table['id'], $row_idx + 1, $this->table['data'][ $row_idx ] );
ah, my bad. I hadn’t noticed the second commit in the pull request that passes the data. Sorry.
Now, I think I found another possible reason:
You are basically only running the Extension in the admin area: https://github.com/jameswlane/TablePress-Extension-Schema-Data/blob/master/tablepress-schema-data.php#L93
That’s why your filters are not registered on the frontend.
- The topic ‘[Resolved] Schema Data Support’ is closed to new replies.