Adding commas between post titles on an archive page?

If you ultimately want the last post, regardless of pages, then you need to use found_posts. This could change depending on how you sort but I didn’t see any modifications to that in your code. So to just modify the content of your code above you would do this: <?php if ( have_posts() ) { … Read more

Displaying custom meta box value in a custom post page

// For Movie Template Page <?php /* * Template Name: Movie Page * * */ get_header(); $args = array( ‘post_type’=>’movie’, ); $m_title = new WP_Query( $args ); ?> <?php if ( $m_title->have_posts() ) : ?> <!– the loop –> <?php while ( $m_title->have_posts() ) : $m_title->the_post(); ?> <?php $get_m_title = get_post_meta(get_the_ID(), ‘_movie_title’, true); ?> <h1>Movie … Read more

Warning: Undefined variable $admin

The error is telling that when you say: if($admin == ‘1’){ PHP has no idea what you are talking about. There is no $admin so it cannot ever equal 1. As Rick Hellewell mentioned in the comments, you might actually want is_admin() which is a function that returns a boolean (true or false). It is … Read more