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?

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)product.id;     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?

Add custom post type as submenu

I have a custom post type called ‘Movies‘ that I want to add under WooCommerce menu after "Extensions" as you can see below:

enter image description here

The WooCommerce page URL is /wp-admin/admin.php?page=wc-admin

I tried:

register_post_type( 'movie', array(     'show_in_menu' => 'admin.php?page=wc-admin' ) ); 

but that didn’t work. I am able to set Movies under Tools, Settings, Post, etc everywhere else, just not inside WooCommerce. Any ideas why?

Prevent Duplicate Post Counted by Query

<?php  while ( have_posts() ) : the_post();           $  get_series_id = get_post_meta( get_the_ID(), 'series_seri', true );          if (in_array($  get_series_id, $  do_not_duplicate)) {             continue; // We've already seen this post ID, so skip the rest of the loop         }      $  do_not_duplicate[] = $  get_series_id; ?> <?php the_title(); ?> <?php endwhile; wp_reset_postdata(); ?> 

how to make duplicate post not counted ? i wanna show 20 post, but in frontpage only showing 5 post because duplicate post also counted,

get_the_excerpt doesn’t work with default items but works with my customs post types

the excerpt function not work in my custom post template using WordPress default posts in the query loop, but they work fine with custom post type.

I enabled the display of excerpt by checking the "excerpt" option in the post options fields.

I also added "add_post_type_support(‘page’ ‘excerpt’)" in my function.php file but it doesn’t working.

I suspect a problem coming from the database because the excerpts are displayed when I test the website locally with Xampp.

Here is a snippet of the code used in my page template:

<div class="container">                      <div class="row">                         <div class="col-lg-9 col-mg-9 mp-blog" style="padding-right: 24px;">                                                 <div class="row">                                  <?php                                 $  paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                                  $  args = array(                                   'post_type'=>'post', // Your post type name                                   'posts_per_page' => 6,                                   'cat' => 26,                                   'paged' => $  paged,                                 );                                                                  $  loop = new WP_Query( $  args );                         if ( $  loop->have_posts() ) {                             while ( $  loop->have_posts() ) : $  loop->the_post();?>                        <?php the_excerpt();?>                        <?php endwhile;                              $  total_pages = $  loop->max_num_pages;      if ($  total_pages > 1){          $  current_page = max(1, get_query_var('paged'));     ?>     <div class="custom_pagination">        <?php         echo paginate_links(array(             'base' => get_pagenum_link(1) . '%_%',             'format' => '/page/%#%',             'current' => $  current_page,             'total' => $  total_pages,             'prev_text'    => __('« précédent'),             'next_text'    => __('suivant »'),         ));?>     </div>     <?php }     } wp_reset_postdata();?>                     </div>                 </div><!-------------- end of col-8 ------------------>               <div class="col-lg-3 col-mg-3" style="padding: 0;">                   <div id="tching" class="blog_right_sidebar" style="padding: 0 15px;">                       <?php get_sidebar(); ?>                   </div>               </div>             </div>          </div> 

Can’t delete Draft Post

I am new to wordpress and was happily blogging along when I ran into a weird issue. I tried uploading a gif into the draft and the editor crashed. I refreshed the browser and then found that I couldn’t access all posts or the drafts of posts from my post dashboard.

Where you would expect to see the table of posts I see this error, and the drafts table doesn’t populate at all despite showing one draft:enter image description here

You’ll notice the posts I created after the error no problem, but the posts from before the error aren’t shown.

I tried following the guides I could online to fix the issue, and I figured out that when I disable all my plugins I can see it in the drafts: enter image description here

However, when I try to ‘trash’ the draft, it gives me a critical error.

Please let me know if there is any additional troubleshooting information that you need to help, otherwise thank you for your time and attention.

How to display all posts in a category at the end of a single post?

The "work" page for my portfolio is simply all the posts in the "work" category. They are displayed as a thumbnail grid. Here.

<?php get_header(); ?>  <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?> 

I want to duplicate this at the end of each single post. Here.

<?php get_header(); ?>  <div class="page-content">  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>   <article class="work post-content ready-to-column clearfix">                      <header class="post-header column-left">         <h1><?php echo get_the_title($  ID); ?></h1>         <h2><?php echo get_post_meta($  post->ID, 'project-name', true); ?></h2>         <div class="project-info"><?php echo get_post_meta($  post->ID, 'project-info', true); ?></div>                        </header>          <div class="column-right">     <?php the_content(); ?>                                   </div><!---end of "right-column flex-column"--->               </article>      <?php endwhile; else: ?>     <p>Sorry, this post does not exist</p> <?php endif; ?>          <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?>  

As you can see, simply pasting it in just shows the current posts thumbnail. Any idea how I can do this?

WP_Query: how to search tags in addition to a custom post type?

Below is what I have so far for a custom rest endpoint (‘placesdb/v1/search?term=’) for a custom post type (place). This successfully returns all the places that have the search term in the title or content. However, I also want to return all the tags (tag archive pages) that match the search term (the same result as calling the non-custom ‘/wp/v2/tags?search=’). Is it possible to somehow add the tag results to the place results? I already successfully did the front-end approach of calling the places and tags endpoints separately via ajax, but I would rather get all the data in one swoop. Hence my attempt at making this custom endpoint.

function placesSearch() {   register_rest_route('placesdb/v1', 'search', array(     'methods' => WP_REST_SERVER::READABLE,     'callback' => 'placesSearchResults'   )); } function placesSearchResults($  data) {   $  places = new WP_Query(array(     'post_type' => array('place'),     's' => sanitize_text_field($  data['term'])   ));    $  placesResults = array();    while($  places->have_posts()) {     $  places->the_post();     array_push($  placesResults, array(       'title' => get_the_title(),       'permalink' => get_the_permalink()     ));   }    return $  placesResults; } add_action('rest_api_init', 'placesSearch');