• stefanocps

    (@stefanocps)


    Hello after moving from a builder, i have used a plugin to remove shortcodes in my posts. Now my posts have an url instead of a picture that was there (all pics were in my media library) and i wonder if there is a way to transform the url in image displayed

    Also i don’t see anymore the title of the posts..may be there i sa solution for this?p.s. i have hundred of posts…can’t do manually)

    thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator threadi

    (@threadi)

    Without knowing your project, the PageBuilder you used before, and your specific customizations, I’m afraid there’s little I can say.

    The feature image would have to be linked as postmeta with the key _thumbnail_id as ID.

    The post title should be in the post table as post_title. Depending on where the PageBuilder stored it before, you would have to migrate it.

    If necessary it would be useful if you look for support. You can find someone here: https://jobs.wordpress.net/

    Thread Starter stefanocps

    (@stefanocps)

    it was avada builder but i think it does not make any difference

    Now, after removing all the shortcodes, i have several plain posts, wordpress builder that look like this

    https://www.counseloraroma.net/wp-content/uploads/2023/05/media1.jpg

    textetxttexttext….

    so i want to know if that url can be converted to dislay the image it poin to

    And being hundreds of post i cannot do it manually

    this is the post

    https://www.counseloraroma.net/celluloide-di-carlo-lizzani/

    Moderator threadi

    (@threadi)

    But, the Avada Builder as a starting point is crucial. Each builder builds its shortcodes (if it uses any) differently. Also arranges content differently. So it is crucial to know what was before and how it became what it is now.

    This image URL is obviously in the post text. You could only adjust that by iterating over all posts via PHP and checking if there is a URL in the 1st paragraph. If so, you take this, determine its attachment ID (see https://developer.ww.wp.xz.cn/reference/functions/attachment_url_to_postid/) and save that as a feature image on the post. I don’t see another way to do this now.

    Thread Starter stefanocps

    (@stefanocps)

    that image is already there as featured image so this will not help…so it seems no other solution?msy delet the string at least?

    Moderator threadi

    (@threadi)

    Since the string is obviously in the post text, you can only remove it there. This would also be possible in PHP with an iteration over all affected posts.

    Thread Starter stefanocps

    (@stefanocps)

    i don’t know how to do that in php…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘convert url in image’ is closed to new replies.