How to make own crop image function for WordPress plugin
How to make own crop image function for WordPress plugin
How to make own crop image function for WordPress plugin
It is possible as referenced here but you are talking about a great deal of customization in the Gravity forms plugin and like you said you are not a programmer yourself, so you better open a support ticket in their forums and they might be able to help. Also look at this code that can … Read more
As per comments of @TomJNowell you can include images as files with your theme, but you shouldn’t automatically insert them as attachments in the database and neither should you generate pages on theme activation. The user might be just checking out your theme and end up with stuff in his database het doesn’t want. What … Read more
Custom thumbnail size of image when uploaded
Base Image Missing When Uploading Images With WordPress
You can simply use preg_replace() functions to remove -800×667 (or any height) from the image. Like this- $image = generate_filename( NULL, NULL, ‘jpg’); echo preg_replace( ‘/-800x[0-9]{2,4}/’, ”, $image );
Problems with image size on the server WordPress
I would use my text editor to do a find in folder for each image size, starting with post-thumbnail. If non are found, then they aren’t being used.
Found a solution: <?php $cat = get_the_category(); $category_id = $cat[0]->term_id; foreach (get_the_category() as $cat) : $attachmentId = get_option(“category_image_{$category_id}”, ‘null’); $imageArr = wp_get_attachment_image_src( $attachmentId, ‘medium’ ); $imageURL = $imageArr[0]; echo ‘<img src=”‘ . $imageURL . ‘” />’; endforeach; ?>
custom background can be used in below way: $defaults = array( ‘default-color’ => ”, ‘default-image’ => ”, ‘default-repeat’ => ”, ‘default-position-x’ => ”, ‘default-attachment’ => ”, ‘wp-head-callback’ => ‘_custom_background_cb’, ‘admin-head-callback’ => ”, ‘admin-preview-callback’ => ” ); add_theme_support( ‘custom-background’, $defaults ); Example usage: $args = array( ‘default-color’ => ‘000000’, ‘default-image’ => ‘%1$s/images/testback.jpg’, ); add_theme_support( ‘custom-background’, $args … Read more