wp_get_archives() output

The date.php, archive.php, and index.php files control the date archive output. You need to check the contents of those files, in respective order, to find the problem. If WordPress can’t find date.php, it will check for archive.php, and load that if found. Otherwise, index.php will be used to display date archives. See my answer on … Read more

Page Title repeating

look into header.php of your theme; <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title> when you use a seo plugin, you can control the meta title with the plugin; change that line to: <title><?php wp_title(); ?></title>

new custom theme – posts displaying on top of one another

You have closed div having content class inside if statement which causes to break nested markup, instead close it outside if statement as following. <?php /* Template Name: Blog */ ?> <?php get_header();?> <div id=”blog-container”> <div class=”content”> <?php get_sidebar( ‘blog’);?> <?php if(have_posts()) : while(have_posts()) : the_post(”); ?> <div class=”meta”> <h3><a href=”https://wordpress.stackexchange.com/questions/89410/<?php the_permalink(); ?>”><?php the_title(); ?></h3> … Read more

Fatal error: Cannot redeclare comment_theme()

Your comments.php is included multiple times for some reason. Look for comments_template() – maybe it is called too early. Each time that happens, PHP tries to create the function comment_theme() again. This cannot work, function names must be unique. Move the function declaration to the functions.php. So everything including … <?php function comment_theme($comment, $args, $depth) … 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

Internal and External Blog

Can we have both a private company blog and a public blog with WordPress? Yes, but it depends on how you define private. We use WP multisite subdomains. We have over 200 sites, most of them public. But we have a few sites that are “private” – requires user to login. Additionally the user has … Read more

Sidebar on single.php not showing up

It seems that the sidebar checks whether or not the Post Layout is set to “content”. If you remove that check, it should operate the way the main index page does. Editing / commenting out the following lines in sidebar.php should solve the problem (if not, get you closer): Find: if ( ‘content’ != $current_layout … Read more

Wrap posts p tags in div

You need to add it to a JS file and then enqueue it in your functions.php jQuery(document).ready(function($){ $(‘p’).wrap(‘<div class=”post-txt” />’); }); If you already have a js file, you can add it to that file and you’re done. Else, save the above snippet in a new file. Put that file in a folder called js … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)