New answers tagged

0

This theme simply looks like that. You can try another one. Maybe, you'll like this post https://www.wpbeginner.com/beginners-guide/how-to-install-a-wordpress-theme/


0

Without more information, it's hard to tell what the reason is, for a specific answer you might want to show your code. The following uploads the lady to the media library: $url = 'https://res.cloudinary.com/demo/image/upload/w_400,h_400,c_crop,g_face,r_max/w_200/lady.jpg'; // $post_id = 0 to not attach to specific post media_sideload_image( $url, 0 ); ...


0

You can pull down images with PHP if that will work for you. You just need to make sure wherever you are "Putting" the images, needs to have the write permissions. I got the following snippet of code to work on the image url you placed above. // Remote image URL $img_source = 'https://res.cloudinary.com/demo/image/upload/w_400,h_400,c_crop,g_face,r_max/...


0

Firstly you might wanna check your error_log file in cPanel it will show you to the right direction in terms of debugging. What usually helps if you not that fair in development. Go to your installed plugins and deactivate all of them, or You might want to got to the cPanel and got to wp-content-> plugins and delete all of them manually. if the images are ...


0

you can try this $all_posts = get_posts(array( 'numberposts' => - 1, 'post_status' => 'any', 'post_type' => get_post_types('', 'names') , )); foreach($all_posts as $all_post) { delete_post_media($all_post->ID); } function delete_post_media($post_id) { if (!isset($post_id)) return; elseif ($post_id == 0) return; ...


0

It is possible to create interactive charts on a WordPress site. This will require custom code on your end to accomplish, but several JavaScript libraries exist that can help facilitate this. I have created custom charts using javascript libraries such as D3.js. Here is a great resource to get you started: https://getflywheel.com/layout/how-to-add-charts-to-...


0

You need to change the urls in your database to use https. All requests from your website need to be https for your site to be secure.


0

You can scan all files that are in “uploads” directory and see which ones are actually in Media Library and which ones are just sitting there. Then you can select those that you want to import to database and therefore make them available in Media Library. You can use Media Sync plugin i am expecting it will work for you


0

is_admin() is a call that does not verify if the current user role, but rather it was made to check if the code is trying to display in the backend/admin/dashboard area. https://codex.wordpress.org/Function_Reference/is_admin You can try one of three solutions: Reverse the check if(is_admin()) // if display on the dashboard, abort return; ...


0

You have to insert the following : wp_postmeta This table contains 2 records: For the URL meta_key: _wp_attached_file meta_value: image url post_id: meta_id: post_id and meta_id are the same as record above. meta_key: _wp_attachment_metadata meta_value: serialize size information wp_posts A record entry for each image, where ...


0

A simple and effective approach const editor = wp.data.select('core/editor'); const imageId = editor.getEditedPostAttribute('featured_media'); const imageObj = wp.data.select('core').getMedia(imageId); ImageObj gives you a reasonable amount of image data to work with.


1

Depending of what you are exactly trying to achieve accessing the first element of the $posts array may work for you. No need for the foreach loop. echo '<img src="'.$posts[0]['img']['url'].'">';


2

Obviously, I imagine you already checked cron jobs. No one can tell you, but whenever you have an issue and you're wondering "what the hell is interacting with my system?" and that part that's problematic (in your case, the deletion of the image) has actions inside of it, we can see what called that specific deletion. So let's see how this applies in your ...


0

If it occurs periodically, the first place I would check is scheduled tasks. I would also check your error log to see if anything shows up there. I would also check permissions. Of course, if you can't figured it out, try disabling all plugins and changing the theme.


0

We did figure out a workaround for this problem, If you are using a plugin like Regenerate Thumbnail try to deactivate first some plugins that will affect your images when you regenerate new image thumbnails like ewww image optimizer. make sure that the original image width is more than the image size you set on your media settings to avoid missing size when ...


0

Image URLs are stored within the 'post' entry that is the media item. So you can change each one manually via the Media screen. Or use a search/replace plugin to do it all at once. I like the "Better Search and Replace" plugin. Just enter the old URL's domain, and the new one. Use the 'test' button to see what it will do. If all is OK, then do it. ...


0

I was able to find some helpful articles, the combination of which helped me solve this. First, I discovered that the uploadedTo information can retrieved, returning the ID. A bunch of information on attachment data can be found here. Second, I was able to convert the ID into a link for the post by simply adding some html <a href="/?p='.$attachment_data['...


1

Do you want changes in this :--- get_field('4', $term->term_id) If this get_field('your_acf_field_slug_name', 'term_'.$term->term_id); or get_field('your_acf_field_slug',$term->term_id). You can use this reference also :--- https://support.advancedcustomfields.com/forums/topic/get-custom-taxonomy-field-value/ // Yours worked Answer $icon = ...


1

my final code that worked quiet brilliant $va_category_HTML .='<li '.$carrentActiveClass.'><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a>'; $icon = get_field('firma_image', $term->taxonomy . '_' . $term->term_id); $va_category_HTML .= sprintf('<img src="%s" />',...


0

What about using Page Links To? Install this plugin, go to the edit screen of the post "Project Management" and then link that post to any page you want. That way you can redirect the post to any page you want. Not a perfect solution but may work for your setup.


0

Unfortunately, it looks like the code that runs your widget will not let you add your image: The code here shows that a loop is creating the unordered list and there are no filters where you can inject your own image. You can add your own code to the plugin, but it's not recommended as once you push an update it will break. You may also be able to add some ...


Top 50 recent answers are included