Difficulty in creating and handling a complex post type

If you haven’t already, I’d suggest looking at the Advanced Custom Fields plugin. They have two custom fields that might help a lot in this situation: Post Object and Relationship. Browse all their custom fields here. What these allow you to do, essentially (insofar as my understanding goes…), is to link one post (a restaurant, … Read more

Add row after three columns

Here’s an idea of what I think you could do if I understand the problem correctly: <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <div class=” entry-content”> <?php if ( have_posts() ) { $post = $posts[0]; $c = 0; $i = 0; while ( have_posts() ) { the_post(); // start a new row for the first … Read more

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();

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