Query custom post type and showing its content

You are not closing the second while loop. You’ll probably want something like this: <?php /* * Template Name: Testimonials */ ?> <?php get_header(); ?> <div class=”container”> <div class=”content-page”> <h1><?php wp_title(); ?></h1> <title><?php wp_title(); ?></title> <?php $query = new WP_Query( array(‘post_type’ => ‘testimonials’, ‘posts_per_page’ => 5 ) ); while ( $query->have_posts() ) : $query->the_post(); ?> … Read more

Change theme’s thumbnail to cropped WP featured image

Check out get_the_post_thumbnail() $image_thumb = get_the_post_thumbnail( get_the_ID(), ‘thumbnail’); Here’s a more specific example: while (have_posts()) : the_post(); echo ‘<article class=”search-entry clearfix”>’; $image_thumb = get_the_post_thumbnail( get_the_ID(), ‘thumbnail’); echo ( $image_thumb ) ? sprintf(‘<a href=”https://wordpress.stackexchange.com/questions/168885/%s” title=”https://wordpress.stackexchange.com/questions/168885/%s” class=”search-portfolio-thumb”>%s</a>’, get_permalink(), get_the_title(), $image_thumb) : ”;

Background image not showing up

You did not create your header.php properly. You did not include HTML doctype declaration and head section. So here is your header.php <!doctype html> <html <?php language_attributes(); ?> class=”no-js”> <head> <meta charset=”<?php bloginfo(‘charset’); ?>”> <title><?php wp_title(”); ?><?php if(wp_title(”, false)) { echo ‘ : ‘; } ?><?php bloginfo(‘name’); ?></title> <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″> <meta name=”description” content=”<?php bloginfo(‘description’); … Read more

How to migrate the menu from the site on my own theme in WordPress?

Yes, it is typically possible to re–create arbitrary markup in WordPress. However the difficulty of the task varies from easy to highly challenging. Sometimes it is easier to bend to markup WordPress gives you, than bend markup to precise state. For navigation menus there are basically two levels of control over markup: As per wp_nav_menu() … Read more

Making wordpress menu horizontal [closed]

If I understood correctly you are trying to position output of wp_nav_menu() in horizontal line. Your should try styling <li> elements, instead of all <div>. Also width: 100%; should be removed. Something like this seems to work: .mythirdclass li { float: left; padding: 0; margin: 1em; list-style-type: none; display: inline; }