Sure, I can change that. Are you using the Google Crawl method? Can you post your Place ID or search terms so I can test?
PID = ChIJddSKvqfR1IkRF-xo8mJamuY
I wrote a script last night to format the text the way I wanted, but some more control would definitely be amazing. Here is the script I’m applying to get it to look like it does in Google:
$('.wprevpro_t1_P_3').each(function() {
var cache = $(this).children();
var text = $(this).clone().children().remove().end().html();
var arr = text.split(' ');
if (arr.length > 1) {
for (var i = 0; i < arr.length; i++) {
if (arr[i].substr(arr[i].length - 1) == ':') {
//first list
if (i == 0) {
arr[i] = '<strong>' + arr[i] + '</strong> ';
continue;
}
//other list
var index = [];
index.push(arr[i].lastIndexOf('.'));
index.push(arr[i].lastIndexOf('!'));
index.push(arr[i].lastIndexOf('?'));
index.push(arr[i].lastIndexOf(' '));
var max = Math.max(...index);
if (max == -1) continue;
arr[i] = arr[i].substring(0, max + 1) + '<br><br><strong>' + arr[i].substring(max + 1) + '</strong> ';
arr[i] = arr[i].replace(' ', '<br><br>');
//console.log('Length: ' + arr[i].length + '\nMax: ' + max + '\nIndex: ' + index.indexOf(max));
}
}
$(this).html(arr.join("")
.replaceAll(' , ', ', ')
.replaceAll(' ,', ', ')
.replaceAll(' ', '<br><br>')
)
//.prepend('<br>')
.prepend(cache);
}
});
I’ll probably just ignore that text on the download. Otherwise, I’ll have to handle it differently in the database in order to render it separately on the frontend. How critical is it to have it?
I think just the main body is good, doesn’t really seem to be a need for those extra lists.
Give version 9.4 a try. It should ignore that text.
It is ignoring the first part of the google list now, but still pulling a list that might be at the end of the blurb. Example text:
5 star review Extremely pleased! We found it very easy to communicate with Nik painting. They were very professional and went above and beyond to accommodate our needs. We will definitely use Nik painting again and would highly recommend their services. Excellent and prompt service.Services: Interior painting , Repair drywall , Paint doors
Also, could there be an option to pull the data with those lists and without? Much appreciated!
-
This reply was modified 3 years, 2 months ago by
paulmm2125.
Sorry about that. Give 9.5 a try. It should ignore that text.
I’m making some other updates to the plugin right now. I’ll see about getting the option in there to pull that data or not.
Thanks, it’s working great now, much appreciated! Looking forward to some more great features in the future.