Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter aargambit

    (@aargambit)

    Downgrade to previous veriosn worked. However If theme database entries has been also changed with version 1.5.3 then i have mess now as i downgraded only files.

    So waiting for official solution.

    Grab this version for additional meta fields for videos:
    https://alxmedia.se/themes/hueman/

    www.ads-software.com does not allow custom meta fields, so they had to be removed in this version, in order for the theme to stay on the repository.

    More here: https://themes.trac.www.ads-software.com/ticket/23101#comment:4

    Your other option is to edit the theme video posts and simply put the video link at the top of the post, in the main text field – and it will be included.

    Thread Starter aargambit

    (@aargambit)

    Your other option is to edit the theme video posts and simply put the video link at the top of the post, in the main text field – and it will be included.

    OMG! I have above 470 videos (cry) …

    But maybe there is some way to use this deprecated field to add it in post template php file? Im using child theme.

    Thread Starter aargambit

    (@aargambit)

    Im looking now at page html structure. Is it possible to only delete custom meta fields in newest version and for the compatibility sake keep <div clas=video-container> element? Old posts would still contain videos and new posts could be published in new wany as this element would be empty anyway. Is it possible?

    If you use this version: https://alxmedia.se/themes/hueman/ – your meta field should come back. Perhaps that’s the easiest way?

    Thread Starter aargambit

    (@aargambit)

    But would this version be constantly updated in the future? This is main thing im concerned about it.

    Hi aargambit. Yes, the version on the theme web site is updated on a regular basis. The only thing to be aware of is, since it’s not from the wp.org repository, you won’t get an update notification in your admin panel. You’ll need to periodically check the theme website for updates.

    Thread Starter aargambit

    (@aargambit)

    Well i must admit that at first i was very optimistic about this nonwordpres version. But i followed links you showed in previous posts and i found that WordPress team explanation is somewhat reasonable. Indeed binding site content with theme which causes content complete dependency on the theme isnt good idea in longer run. I’ll try to dig some in database and find where exactly those embed codes are stored. Then ill try to write a script that creates normal embeds from those links for every article. At least this is some idea, dont know if its possible. If not then ill have make it manually (cry).

    Offcourse it doesnt mean ill drop hueman, no. Just will stick with repository version as its more safe to me.

    Thread Starter aargambit

    (@aargambit)

    Ok, done. I wrote a script which safely copied all video URL and placed them in post content as embeds. I cant place here whole code as it contains some company data i work for but least i can do is share some key parts of it.

    video URLs are stored in your_wp_prefix_postmeta table in rows meta_value where row meta_key is _video_url. To be sure i joined posts table and filtered those which are posts and are published (wordpress tables are such a mess …).

    first query
    'SELECT ID,meta_value FROM your_wp_prefix_posts INNER JOIN your_wp_prefix_postmeta ON your_wp_prefix_posts.ID=your_wp_prefix_postmeta.post_id WHERE your_wp_prefix_posts.post_status="publish" AND your_wp_prefix_posts.post_type="post" AND your_wp_prefix_postmeta.meta_key="_video_url" ORDER BY ID'

    I striped URLs from meta_values to bare code (https://www.youtube.com/watch?v=CODE => CODE) taking off any additional url parameters and timestamps placed there by mistake and used this CODE to make proper embed code like this

    <iframe width=\"720\" height=\"405\" src=\"https://www.youtube.com/embed/'.$CODE.'?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>

    In the same loop i used IDs and those generated CODES to build one single query (didnt want to make many update calls to database) using very simple MySQL syntax.

    UPDATE your_wp_prefix_posts SET post_content = CASE ID SET
    WHEN '1' THEN 'meta_value_1'
    WHEN '2' THEN 'meta_value_2'
    WHEN '3' THEN 'meta_value_3'
    ...
    ELSE field_name
    END

    And it worked. Had double videos now, one from meta fields and one from post content itself. Updated theme and first one dissapeared.

    PS. Little advice: before applying the code make some counting of rows you have from first query with mysqli_num_rows() function or other and compare them with actual posts number on your site. Just to be sure that you get proper data.

    PS2. Well,ive just noticed that the downside of this operation is that my embeds have fixed width and height and thus they are cropped when are played on small screens. Must to tix that issue too.

    Does this mean that Hueman theme better not be updated anymore, or is it a bug in the latest version that will be fixed?

    Thread Starter aargambit

    (@aargambit)

    This means that there are two versions now.

    1. Compatible with old versions but not with wordpress restrictions as it prevents using other themes without loosing some content. It can be downloaded here and must be updated manually each time.
    https://alxmedia.se/themes/hueman/

    2. WordPress version which causes loosing some content as in case of other wordpress themes so you must copy meta fields content to main post/page content either manually or with some script based on sugesstions i left above your post

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘No videos and video link section in edit panel after update’ is closed to new replies.