• 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 - 16 through 30 (of 46 total)
  • Thread Starter enacuous

    (@enacuous)

    How can i make the post text background reproduce seperated here is the code

    https://wordpress.pastebin.ca/1494118

    Okay, the post thing we can fix quickly I think. I think in order fix that you just need to go back into the page where you were before and do this:

    Find where you put these:

    <div class="top"></div>
    <div class="mid"></div>
    <div class="bot"></div>

    Add the following div like so:

    <div class="postgroup">
    <div class="top"></div>
    <div class="mid"></div>
    <div class="bot"></div>
    </div>

    Back to the twitter thing. I had a momentary brain fart. — That is in your header.php which is what you posted, in full, earlier.

    So the code I posted for that is the valid & full code to reproduce the twitter thing on your other pages.

    I’m pretty sure what’s happening is in your header.php the php code wrapping your twitter div is telling your site NOT to display your twitter div unless it’s on X page.

    Try finding this in your header.php

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

    And removing the php such that it looks like this:

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

    I’m not sure if the first line of php is required or not, I’m guessing that it is… but I could be wrong.

    Page of Posts Template.

    Save what you have somewhere and then try this one: https://wordpress.pastebin.ca/1494128

    Thread Starter enacuous

    (@enacuous)

    ok look at the blog page now it’s doing kinda the right thing but now it’s all wacked out

    Okay, lemme look at this code again

    Thread Starter enacuous

    (@enacuous)

    hold on trying it

    Thread Starter enacuous

    (@enacuous)

    yeah that didn’t work at all

    Yeah and I know why. I was lazy with my copy-paste.

    https://wordpress.pastebin.ca/1494140

    Too many windows open at once >_<

    Thread Starter enacuous

    (@enacuous)

    Look what happened… and by the way I really appreciate this

    Yeah, I deleted a random half of a tag. Essentially what I’m trying to do is replicate the way it works on the main page because it IS working there. It’s just a matter of finding the sweet spot for the divs.

    I know what it’s doing. It looked like there was an incomplete tag in the code, so I snipped it out. Obviously it needed it.

    Okay… now to fix whatever the heck is happening to your sidebar.. probably just a missing div closing tag.

    Thread Starter enacuous

    (@enacuous)

    alright almost there and please add in the line under the title to separate the title and the content

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