• 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; ?>
Viewing 15 replies - 31 through 45 (of 46 total)
  • Thread Starter enacuous

    (@enacuous)

    the header thing is not working either lol, sorry man

    It’s fine. The header thing is a php issue. I’ll get to that in a minute.

    The sidebar being all wonked up right now is because the “postgroup” div isn’t closed prior to the get_sidebar() — added a </div> at line 58

    The line and the font for your entry titles and etc is a CSS issue. I think it was just missing a <div class=”title”></div> around the place where the title goes. I added it but I don’t know if that’s going to add the line back in or not. We’ll see.

    https://wordpress.pastebin.ca/1494166

    Thread Starter enacuous

    (@enacuous)

    still “wonked up”

    And now the sidebar is still at the bottom because the content div also needs to be closed.

    Divs are annoying. Sorry.

    https://wordpress.pastebin.ca/1494181

    I work much better on my own site, really I do… ??

    Thread Starter enacuous

    (@enacuous)

    but looks a lot better

    Thread Starter enacuous

    (@enacuous)

    but looks a lot better

    Thread Starter enacuous

    (@enacuous)

    YAY! THANKS!

    Voila!

    Thread Starter enacuous

    (@enacuous)

    YAY! THANKS!

    Thread Starter enacuous

    (@enacuous)

    YAY! THANKS!

    Thread Starter enacuous

    (@enacuous)

    whoa didn’t mean to post so much

    IGNORE THIS IF YOU HAVEN’T ALREADY READ IT

    As for the twitter thing, I don’t know what the first php function does. I looked up the plugin itself and it seems to suggest that all you need is the following:

    <div id="twitter">
    <p><?php twitter_messages($twitter_username,1,false,true,' ',true,true,false); ?></p>
    </div>

    So you could just try to replace the above with what you already have in your header.php, which is this:

    <?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; ?>

    Ahhh I think I know what it does. If you use your theme interface to put in what your twitter account is, then that function is what’s telling your site who you are… in which case, you need it but you don’t need the rest of the code.

    <?php $twitter_username = get_option('magaling_twitter_username'); ?>
    <div id="twitter">
    <p><?php twitter_messages($twitter_username,1,false,true,' ',true,true,false); ?></p>
    </div>
    Thread Starter enacuous

    (@enacuous)

    That did it! Thanks so much. FINALLY OMG. OFF TO THE ORIENTAL BUFFET!!!!

Viewing 15 replies - 31 through 45 (of 46 total)
  • The topic ‘2 Things! Thanks in advance’ is closed to new replies.