Plugin for streamlining image post creation?

I have a photo gallery website, with one post for each image. Currently, the process for creating these posts is cumbersome: I click "add new post," add the title and description, then click "set featured image," find the photo, and add the same title and description (with different formatting). Is there a wordpress plugin that would streamline this process? That is, something like the flickr uploadr or a plugin that would allow me to iterate through the images in the media library and create a post for each?

Remove “Default” from Gutenberg typography settings

I’ve added my own font sizes to the theme I’m working on, but the value "Default" persists in the dropdown. With the name scheme needed for this particular site I cannot just reformat "Default" to fit with my baseline typography. Can "Default" be removed somehow?

enter image description here


add_theme_support( 'editor-font-sizes', array(     array(         'name' => esc_attr__( 'Book 16px', 'wav' ),         'size' => 16,         'slug' => 'book16px'     ),     array(         'name' => esc_attr__( 'Book 20px', 'wav' ),         'size' => 20,         'slug' => 'book20px'     ),     array(         'name' => esc_attr__( 'Book 24px', 'wav' ),         'size' => 24,         'slug' => 'book24px'     ),     array(         'name' => esc_attr__( 'Book 32px', 'wav' ),         'size' => 32,         'slug' => 'book32px'     ),     array(         'name' => esc_attr__( 'Book 36px', 'wav' ),         'size' => 36,         'slug' => 'book36px'     ),     array(         'name' => esc_attr__( 'Book 48px', 'wav' ),         'size' => 48,         'slug' => 'book48px'     ),     array(         'name' => esc_attr__( 'Book 64px', 'wav' ),         'size' => 64,         'slug' => 'book64px'     ),     array(         'name' => esc_attr__( 'Book 96px', 'wav' ),         'size' => 96,         'slug' => 'book96px'     ),     array(         'name' => esc_attr__( 'Book 144px', 'wav' ),         'size' => 144,         'slug' => 'book144px'     ), )); 

I want to show the category image (set with ACF) inside a loop that shows it inside the cards, how can I do it?

<?php get_header();   $  category = get_category( get_query_var( 'cat' ) ); $  cat_id = $  category->cat_ID;  $  id_cat = array('parent' => $  cat_id); $  categories = get_categories( $  id_cat ); 

// Get particular category’s object info. $ queried_object = get_queried_object();

// (Optional depending on desired outcome) If you wanted to get the type of taxonomy. $ taxonomy = $ queried_object->taxonomy;

// (Optional depending on desired outcome) If you wanted to get the associated ID. $ term_id = $ queried_object->term_id;

// Get image ID for this field. $ attachment_id = get_field( ‘category_image’, $ queried_object );

// URL of image at specific size. $ image = $ attachment_id[‘sizes’][‘chosen-image-size’];

<section class="p-5">     <div class="container">         <div class="row text-center">             <h3><?php single_cat_title(); ?></h3>             <p><?php category_description(); ?></p>         </div>     </div> </section>  <section>     <div class="container animated">         <div class="row d-flex" data-masonry='{"percentPosition": true }'> 

‘.’ term_id ).'”>’ .$ category->name.”.’ ‘; } ?>

In evidenza

            <?php while(have_posts()): the_post(); ?>                 <div class="col-6 col-md-4 col-xl-3 mb-4">                     <div class="card text-center">                         <a href="<?php the_permalink() ?>">                                         <!-- Immagine Articolo -->                             <?php if(has_post_thumbnail()): ?>                                   <div class="m-1"><?php the_post_thumbnail('thumbnail') ?></div>                             <?php endif; ?>                         </a>                             <div>                             <h3><?php the_title(); ?></h3>                             <p><?php the_excerpt(); ?></p>                         </div>                         <a href="<?php the_permalink() ?>" class="btn btn-outline-dark btn-sm">Continua a                             Leggere</a>                     </div>                 </div>                     <?php endwhile; ?>                     <?php else: ?>                         <?php echo wpautop('ops.. non ho trovato nulla');?>                     <?php endif; ?>         </div>     </div> </section> 

Hi, would anybody know what the file name must be for adding html code to a child theme. for example, must the file be custom.php or custom.js

function my_scripts_method() { wp_enqueue_script(       'custom-script',       get_stylesheet_directory_uri() . "/js/custom_script.js        array( 'query' ),'',true );           } add_action( 'wp_enqueue_scripts', 'my_custom_script.js' ); 

Ive tried putting this code in functions.php and header.php to call the javascript. doesn’t work

The countdown javascript animation is in a file named custom_script.js in a folder named js, which is in the child theme folder named wpbdemo. The animation also had css and html, but that is working I think, as the countdown template is showing, its just not doing any movement. So, I think its the javascript code not working. The css is in style.css file and the html is in footer.php.

How to show the posts listing on dashboard or custom page in admin panel?

I want to show posts listing(almost like the default post listing page) on the dashboard page. And if that is not possible then maybe on a new page in the admin area.

Basically, I want to create a "My Desk" page for users where they can see some posts listed categorised by post meta. I’m fairly new to WordPress and can’t get an idea as to how this can be achieved.

Any help is appreciated, thank you!

Display related posts without a plugin

I’m trying to display the related posts using functions.php:

function posts_related($  related){ if (is_single()) { global $  post; // Build basic custom query arguments $  custom_query = new WP_Query( array(         'posts_per_page' => 8, // Number of related posts to display        'post__not_in' => array($  post->ID), // Ensure that the current post is not displayed        'orderby' => 'rand', // Randomize the results ));  // Run the loop and output data for the results if ( $  custom_query->have_posts() ) : while ( $  custom_query->have_posts() ) : $  custom_query->the_post();   if ( has_post_thumbnail()   ) {                   $  permalink = the_permalink();                  $  post_thumbnail = the_post_thumbnail('medium');                  $  title = the_title();                                         $  related .= '<a href="' . $  permalink .  '"><img src="' . $  post_thumbnail . '/></a>';                               }            $  related .=  '<a href="' .  $  permalink . '"><b>' . $  title . '</b></a>';      endwhile;   else :      $  related .= '<p>Nothing to show.</p>'; endif; // Reset postdata }          echo '<pre>'; var_dump( has_post_thumbnail() ); echo '</pre>';       return $  related;  }    //wp_reset_postdata();  add_filter( "the_content", "posts_related", 99 ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 100, 50, true ); 

But I’m not being able to handle the output properly. I need it to display below the post (single post).

TranslatePress plugin delayed translated language loading?

I installed the TranslatePress plugin on a website to translate the site into one language using manual translation only. This setup was tested on a dev site and all seemed to work well. However, on the live site there is a delay of around 2-3 seconds where the translated pages initially display the default language before then displaying the translated text. This looks terrible and I need to find a fix.

I have cleared all website caches, browser cache, saved permalinks, set file permissions & ownership, and tried different server settings without success.

Debugging the issue, it seems to relate to the TranslatePress ajax call (trp-ajax) returning no data, which in turn appears to be the result of a database call being blocked at line 26 of the trp-ajax.php file, causing the error output to display from line 38, which I verified via logging.

I copied the website in full onto a very similar server, which doesn’t display the problem, which is therefore pointing me towards an issue with the server environment. However, nothing seems amiss.

403 Forbidden when Updating (I presume POST?) but not Creating (PUT?) an image

I’m using the WordPressPCL library for .NET alongside WooCommerce (although my problem is with the WordPress API, not the WooCommerce API), and trying to upload an image alongside my product

My current process is

  1. Upload the image using WordPressPCL, using the Media.Create() method which I presume PUTs the image
  2. Create the product using WooCommerceNET, with the image’s URL as the product URL
  3. Update the image, setting the Media’s "Post" ID to the WooCommerce product ID

Steps 1 and 2 work fine and I can upload dozens of products, but on 3 I get a 403 Forbidden response which doesn’t make sense to me since I was able to upload the image.

The above order is important to me, because I absolutely do not want to create a product without the image already being on the server – therefore I need to guarantee the process fails if there’s a problem with either the image upload or the product upload. Hence I update the image to attach to the post afterwards.

I know that you don’t strictly need to attach the image to a post, but it’s a requirement from the customer, who uses the attachment to manage deletion of images.

Simplified code below (I’ve removed the details of error handling, object creation etc)

// Create the image try {     uploadedImage = await wordPressClient.Media.Create(imagePath, fileName);     } catch {     // Image upload failed. Fail the process }              // Image uploaded successfully, now create the product try {     productImage = new ProductImage()     {         src = uploadedImage.SourceUrl;     };          product.images.Add(productImage);                      // Replace with the product recieved from the server so that      product = await wooCommerceClient.Product.Add(product);  } catch(Exception e) {     // Product creation failed, fail the process (and try to remove the image, but don't worry about it) }  // Now try to link the image to the post try {     uploadedImage.Post = (int);     await wordPressClient.Media.Update(uploadedImage); } catch {     // Problem here } 

Is there some kind of API permission I need to set to allow my API user to update the data for an existing media item? Or something else I’m missing?