How come this loop is not working? [closed]

try this <div class=”container”> <div class=”inner_box”> <ul> <?php while ( have_posts() ) : the_post(); ?> <li> <?php the_title(); ?> <?php the_content(); //this is not in inner_box ?> </li> <?php endwhile; ?> </ul> </div> </div> try this <div class=”container”> <ul> <?php while ( have_posts() ) : the_post(); ?> <li> <div class=”inner_box”> <?php the_title(); ?> <?php the_content(); … Read more

How to get posts ordered by using their categories?

Before answer I want to say that your code is not really wrong but can be improved: why run 2 queries when you can run only one? caller_get_posts is deprecated, use ignore_sticky_posts, instead get_terms has not title_li nor show_count argument. Moreover $taxonomy is the first argument and do nothing in the $args array (second argument). … Read more

Where is the “Posts”/”Blog” template?

Posts (note the plural) template does not exists. The archive of standard post type, when is not a more specific template (date archive, author archive, taxonomy archive) is handled by: home.php (and if this file doesn’t exist) by index.php. If you intend Post (note the singular) the right template file is single.php Once understood this, … Read more

wp-link-pages in header and footer of the post

For the header First of all you have to know how retrieve the current page, that is done by get_query_var(‘page’) Knowing it, writing what you want is easy. It can be a little hard if you want to link the previous page correctly. In this case you have to use an internal function of wordpress, … Read more

Prohibit saving a post without providing a title

Perhaps these plugins will help you: Mandatory fields This plugin is responsible for making certain fields mandatory before publishing any post in wordpress. Force Post Title This is simple plugin which forces the users to write POST title in Add New Post page. They both seem to prevent the posting only via JavaScript validation in … Read more

How to embed the content of one post into another site

WordPress generates a large number of RSS feeds. For a single post the URL for that feed is the single post URL plus /feed/ or ?feed=rss2 if pretty permalinks are off. If you try that you will see the comments feed, though, and not the post itself. To get the post itself add ?withoutcomment=1 or … Read more