Front end post delete error confirmation and success message

There are two questions here. For styling alerts/modals, that’s a generic HTML/CSS question – check out these to get you started. For the second, it depends what you’re doing after the delete – are you redirecting back to the frontend, or staying in the admin? (I will update my answer following your response). You shouldn’t … Read more

Is possible to do this from function.php

I’m not sure why you cannot just create a child theme and then simply copy the single template to your child theme and remove the code, but anyways, this is still a very interesting approach. Regardless what have been said in comments using CSS to hide the thumbnail (which I do not support as it … Read more

Posts are printed twice

get_template_part( ‘content’, get_post_format() ); includes a template part in your theme where it echoes out the content again. Commenting it out should fix that. <?php // get_template_part( ‘content’, get_post_format() ); endwhile; twentyfourteen_paging_nav();

‘posts_per_page’ in costum page type

0 isn’t a valid value for posts_per_page. WordPress will see it as empty and default to the posts_per_page option. If you want all the posts use nopaging or posts_per_page => -1. $query = new \WP_Query([ ‘post_type’ => ‘producenter’, ‘nopaging’ => true, ‘orderby’ => ‘rand’, ‘post__not_in’ => [$post->ID], ]); As far as why it’s only showing … Read more

Post are not showing up

The reason is that its not showing up <?php if ( has_post_thumbnail() ) : ?> <a href=”https://wordpress.stackexchange.com/questions/206672/<?php the_permalink(); ?>”> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> You are displaying just a link with check that is featured image exists or not It seems, your post doesn’t have featured image, select any featured image or just … Read more

Customizing individual images on posts

The best answer I had was to add a &nbsp in the function callback html at the end of the section tag. This forced the curser out of section wrapper in the WYSIWIG of WordPress. It’s not the perfect fix but it worked. function html5_insert_image($html, $id, $caption, $title, $alt, $align, $url) { $url = wp_get_attachment_url($id); … Read more