Remove line breaks from ?

WordPress assumes that you use <code> for inline code and <pre> for a box of code. In your case, then, you shouldn’t have any need to use <pre><code> but just <pre> See: Writing Code in Your Posts

Cannot find the code for “Edit This” link in posts in a specific theme

This should be located in the entry-meta.php file of the parent theme (kuorinka). Here is the code: <?php if ( ‘post’ == get_post_type() ) : ?> <div class=”entry-meta”> <!– Date & Author name–> <?php kuorinka_posted_on(); ?> <!– Comments count –> <?php if ( ! post_password_required() && ( comments_open() || ‘0’ != get_comments_number() ) ) : … Read more

How to display posts of specific category using a custom Query in WordPress?

the recommended way is: <?php $query = new WP_Query(‘category_name=Category&posts_per_page=4’); if($query->have_posts()) : while($query->have_posts()) : $query->the_post(); if (has_post_thumbnail()) { ?> <a href=”https://wordpress.stackexchange.com/questions/162985/<?php the_permalink(” ‘) ?>” title=”<?php the_title(); ?>”><?php the_post_thumbnail(); ?></a> <?php } ?> <h2><a href=”https://wordpress.stackexchange.com/questions/162985/<?php the_permalink(” ‘) ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h2> <?php the_excerpt(); // or the_content(); for full post content endwhile;endif; ?>

Code Friendly Block Quotes

Geshi In general the Geshi library is a popular library for formatting code ( http://qbnz.com/highlighter/) Geshi as a WordPress plugin For WordPress several authors “packaged” Geshi in a plugin. take your pick: http://wordpress.org/extend/plugins/search.php?q=geshi The one I use Personally I use this plugin: http://wordpress.org/extend/plugins/codecolorer/. This one works by enclosing all pieces of codes with a [cc … Read more

Gist shortcode is not working

Gist tags and oembed handling is specific to WordPress.com, and doesn’t come bundled with standard WordPress from wordpress.org You will need to acquire a plugin to register gists as an oembed provider, or add embed tags. There are plenty of plugins that do this available, I use this one. If you’d like to write your … Read more

WordPress redirect all 404 pages to the Homepage

Note: I have read somewhere that redirecting all 404 to Homepage is not a good approach for SEO purposes Simplest way to redirect all 404 to homepage in wordpress. if( !function_exists(‘redirect_404_to_homepage’) ){ add_action( ‘template_redirect’, ‘redirect_404_to_homepage’ ); function redirect_404_to_homepage(){ if(is_404()): wp_safe_redirect( home_url(“https://wordpress.stackexchange.com/”) ); exit; endif; } }

Sublime Video: Playlist which gets all attached videos

First of all get all video attachements of the post or page: <?php $attachments = get_children( array(‘post_parent’ => get_the_ID(), ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘video’) ); if ( $attachments ) { ?> 2nd: Load the videos into the playlist code with a unique ID (http://docs.sublimevideo.net/beta/playlists). Here I do use the attachement ID for each video … Read more