• Resolved riflebird

    (@riflebird)


    Hi Tobias,

    Hope all good with yourself.

    I’m looking to amend a bunch of URLs in cells for a large number of tables. I’ve read a couple of posts on this subject and I’ve tried better search replace and preceded double quotes and backslashes with a forward slash but with no success. I’m hoping to change <a class=”cta” href=”/ to <a class=”cta” href=”/steel/

    So, I’ve tried <a class=\”cta\” href=\”\/ to <a class=\”cta\” href=\”\/steel\/ but searches still showing up blank. I’ve also done a find and replace in phpMyAdmin (in wp-posts table) but can’t even find <a class=”cta”

    Very much hoping you can help me out.

    Best regards,

    Dave

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Are those class="cta" attributes in the cells when you edit the table? Maybe they are only added on the fly later on? And maybe the URLs don’t start with / but with e.g. https:// and the domain name?

    Another approach for this search/replace could be to do this in a file. For that, export the table to a CSV file, open that in a (good) text editor or programming IDE and use that program’s search/replace feature. Then, re-import the CSV file into TablePress, choosing to replace the existing table.

    Regards,
    Tobias

    Thread Starter riflebird

    (@riflebird)

    Hi Tobias,

    Thanks for the super-speedy response. The class attributes are typed directly in the cells – see https://prnt.sc/dcGYsCf_Db7F for a screenshot.

    I have thought about exporting as CSV, amending, and then importing back but we’re talking over 30 tables to edit individually which I was hoping to avoid.

    Best regards,

    Dave

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, then maybe try finding that TablePress table in the wp_posts database table (it will be in JSON format), maybe there are extra \ in there that need to be taken care of during the search/replace?

    As for the CSV file approach: Good text editors will even allow search/replacing in multiple files at the same time (e.g. SublimeText). Thus, you would just have to export once (to a ZIP archive of CSV files), do the search/replace once, and (ok, that step might be a bit longer) re-import each file individually (as you’ll need to choose the table that should be replaced).

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bulk edit URLs’ is closed to new replies.