Custom Post Type to Plugin

i agree with the other answers, but neither addressed flushing the re-write rules. If you don’t add this, it will confuse your users when they activate the plugin and still can’t access the custom postypes on the front. The other problem you’re going to have is that LOTS of people will use testimonials so if … Read more

How do I add custom fields to the “Edit page” admin screen?

In you code you are passsing ‘Page’ as object types. Please update your code as follows: $cmb = new_cmb2_box( array( ‘id’ => $prefix . ‘banner_media’, ‘title’ => __( ‘Banner media’, ‘foo’ ), ‘object_types’ => array( ‘post’ , ‘page’ ), ‘context’ => ‘advanced’, ‘priority’ => ‘default’, ) ); When set object types to Post and Page … Read more

what is the width of my blog column? [closed]

While the link you gave gives you correct width, your theme may be responsive and may have different width on different screen sizes. The best way in this case is to find the maximum width your theme support and then make images 2x that. To find the maximum width: open your website in Chrome. Right … Read more

How do I reformat this to add php inside php?

As PHP documentation says Often you’d want to have more than one statement to be executed conditionally. Of course, there’s no need to wrap each statement with an if clause. Instead, you can group several statements into a statement group. So You have to use curly braces {} to add more statement within if else … Read more