2 Things! Thanks in advance
-
On this template which is Page of posts, If you look at my site https://www.macombinvestments.net you will see on the Blog page that. The background where the post text is displayed does not look right, how can i fix it. here is the code
<?php /* Template Name: PageOfPosts */ get_header(); ?> <div id="content"> <div class="featured"> <div class="top"></div> <div class="mid"> <center> <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> </center> </div> <div class="bot"></div> </div> <?php if (is_page('3') ) { $cat = array(3); } elseif ( is_page('8') ) { $cat = array(19); } elseif ( is_page('28') ) { $cat = array(17); } else { $cat = ''; } $showposts = -1; // -1 shows all posts $do_not_show_stickies = 1; // 0 to show stickies $args=array( 'category__in' => $cat, 'showposts' => $showposts, 'caller_get_posts' => $do_not_show_stickies, ); $my_query = new WP_Query($args); ?> <?php if( $my_query->have_posts() ) : ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry ?'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?></p> </div> <?php endwhile; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
next, The twitter for wordpress plugin comes with this theme, but it only displays on the home page, where the posts go which is the properties page. I found some code in the header for this but how can i change it to work on every page. Here is the code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title> <?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> :: <?php foreach((get_the_category()) as $cat) { echo $cat->cat_name . ' '; } ?> <?php } ?> <?php wp_title(' :: '); ?> </title> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <!--[if IE]> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style-browser-ie.css" type="text/css" media="screen" /> <style type="text/css"> div#sitename h1 { _background: transparent none; _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php bloginfo('template_url'); ?>/images/background-sitename.png',sizingMethod='crop'); } </style> <![endif]--> <?php wp_head(); ?> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.tabs.js"></script> <script type="text/javascript"> <!-- /* <![CDATA[ */ jQuery.noConflict(); jQuery(document).ready(function() { jQuery('div#box-tabs div.interior > ul').tabs(); jQuery("input#s").focus(function() { jQuery(this).val(''); }); jQuery("input#s").blur(function() { jQuery(this).val('Search'); }); jQuery("input#subbox").focus(function() { jQuery(this).val(''); }); jQuery("input#subbox").blur(function() { jQuery(this).val('Email address'); }); }); /* ]]> */ //--> </script> </head> <body> <div id="container"> <div id="topside"> <div id="topside-wrapper"> <div id="googleads"> <?php $ad_728 = get_option('magaling_ad_728'); echo stripslashes($ad_728); ?> </div> <div id="rsstwitter"> <p> <a id="rss" href="<?php bloginfo('rss2_url'); ?>" title="RSS Feed">RSS Feed</a> <span class="nodisplay">|</span> <?php $twitter_username = get_option('magaling_twitter_username'); if (!empty($twitter_username)) : ?> <a id="twitter" href="https://twitter.com/<?php echo $twitter_username; ?>" title="Twitter">Twitter</a> <?php endif; ?> </p> </div> </div> </div> <div id="title"> <div id="title-wrapper"> <div id="sitename"> <h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1> <p><?php bloginfo('description'); ?></p> </div> <div id="myads"> <!-- Your ads start --> <?php $banner_img = get_option('magaling_banner_img_url'); $banner_url = get_option('magaling_banner_web_url'); ?> <p><a href="<?php echo (!empty($banner_url)) ? $banner_url : '#'; ?>"><img alt="Advertisement" src="<?php echo (!empty($banner_img)) ? $banner_img : ''; ?>" /></a></p> <!-- Your ads end --> </div> </div> </div> <div id="navmensearch"> <div id="navmensearch-wrapper"> <div id="navmenu"> <ul> <?php themefunction_list_pages_flat('title_li='); ?> </ul> </div> <div id="search"> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <p><span class="nodisplay">Search </span><input type="text" value="Search" name="s" id="s" /></p> </form> </div> </div> </div> <div id="wrapper"> <div id="wrapper-wrapper"> <?php $twitter_username = get_option('magaling_twitter_username'); ?> <?php if (is_home() && !empty($twitter_username) && function_exists('twitter_messages')) : ?> <div id="twitter"> <p><?php twitter_messages($twitter_username,1,false,true,' ',true,true,false); ?></p> </div> <?php else : ?> <div style="height: 15px"></div> <?php endif; ?>
- The topic ‘2 Things! Thanks in advance’ is closed to new replies.