Valentin Bora
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Extract a field from an array on MySQL DB on WordPressYou should pass the proper ID to the function:
$video = my_get_video_embed(get_the_ID());
Forum: Fixing WordPress
In reply to: CAN’T EDIT PAGE, SITE ORIGIN EDITOR UNKNOWN ERRORCould you maybe post a screenshot of the error?
Forum: Fixing WordPress
In reply to: WordPress 5.3.2 requires the JSON PHP ext@brucepennypacker what does
php -i | grep json
say? Is it enabled? Are you running on Apache?Forum: Fixing WordPress
In reply to: Bug after updated wordpress 5.3, impossible to go to my admin page.If you are afraid to change this, it’s a good idea to work with someone qualified, or contact to your hosting provider, maybe they’re able to help also.
Forum: Fixing WordPress
In reply to: Extract a field from an array on MySQL DB on WordPressThey won’t disappear, no worries. They are stored forever.
Forum: Fixing WordPress
In reply to: Extract a field from an array on MySQL DB on WordPressI’d set up a custom function to be called from
single.php
along the lines of:function my_get_video_embed($id) { $video = get_post_meta($id, 'video', true); if (empty($video)) { $video = get_post_meta($id, 'td_post_video', true); if (!empty($video) && !empty($video['td_video'])) { $video = $video['td_video']; update_post_meta($id, 'video', $video); } } return $video; }
So in
single.php
you’ll call this instead, which serves to copy the old field to the new field if it can’t find a value for the new field.Forum: Fixing WordPress
In reply to: Extract a field from an array on MySQL DB on WordPressLooks good to me. Good job!
Could you please mark this topic/issue as Resolved?
Forum: Fixing WordPress
In reply to: my site is goneOK you should be able to select the PHP version you want through cPanel, see https://www.inmotionhosting.com/support/edu/cpanel/how-to-change-the-php-version-your-account-uses/
I suggest first trying 7.2 and if that works OK, you can try switching to 7.3. I am not sure, but it is also likely that you can switch your PHP version on a per domain basis, so dev.valliere might have a separate setting than valierre.
In any case, this is something InMotion support can also assist with.
Hope that makes sense.
Forum: Fixing WordPress
In reply to: Site URL is overriding the Site TitleSee if you have a file that contains
wp_head()
in your theme. You should.I am now wondering if there is any other code that alters the behavior of wp_head, and it’s difficult to say since we don’t have access to your theme’s code to check it out.
Do a search for
title
in all your theme’s PHP code, see if you can figure it out.Forum: Fixing WordPress
In reply to: Fatal error wp-optimizeHow did you remove WP Optimize? It seems that WordPress is still trying to load it.
Forum: Fixing WordPress
In reply to: Parse error: syntax errorOP says the issue has been resolved.
Forum: Fixing WordPress
In reply to: Extract a field from an array on MySQL DB on WordPressTechnically, these fields are there in the database irrespective of the theme you are using. The admin interface might not display them, but they are there.
There are multiple options for the transition:
1. Keep the field as is, called
td_post_video
and use it with your new theme
2. Search and replace thewp_postmeta.meta_key
fromtd_post_video
to your new field name. You could do this with phpMyAdminSELECT * FROM wp_postmeta WHERE meta_key="td_post_video"
, run an export on the results of the query, search and replace with a text editor of your choice and then import them back with phpMyAdmin. I’d recommend steering clear of this choice if you don’t know what you are doing.
3. Use custom PHP code to query relevant posts viaget_posts
/WP_Query
, loop and fetch their meta viaget_post_meta
and then add another meta viaupdate_post_meta
What have you used to set up the new custom field on your new theme? Is it custom code or a plugin?
Forum: Fixing WordPress
In reply to: ERROR: The following scheduled event failed to runIf I’m not mistaken, you seem to be hosted on a2hosting.
Please try to set up a solid cron by reading and following this article:
If this resolves your issue, please leave us a comment and mark the ticket as Resolved. Thanks!
Forum: Fixing WordPress
In reply to: Site URL is overriding the Site TitleYour theme seems to lack a
<title>
tag in the<head>
section of your HTML.Could you get in touch with your theme developer to fix this?
Forum: Fixing WordPress
In reply to: Fatal error wp-optimizeCan you please copy/paste the full text of your error message?