• 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 - 1 through 15 (of 46 total)
  • Please don’t post huge chunks of code here. For larger blocks of code, use the WordPress pastebin. It makes life easier for everyone.

    To fix your post background, try amending style-section-layout.css (line 87) from:

    div.post {
    margin:0 0 15px;
    }

    to

    div.post {
    margin:0 0 15px;
    padding:0 10px 10px;
    }
    Thread Starter enacuous

    (@enacuous)

    That didn’t work.

    Thread Starter enacuous

    (@enacuous)

    well it sort of did but it kinda made the post on other pages look weird, and the top of that post was still cut off

    The reason you don’t see the top and bottom graphics which would make that text block look pretty is because you didn’t add the <div>s which define the top and bottom of the text block.

    Note how your “featured” section looks like this:

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

    It calls <div class=”top”></div> then “mid” and then “bot.”

    Your posts must also be formatted this way.

    *Note that in the “mid” section, you would include all of the code that WP uses to pull in & generate your posts.

    Thread Starter enacuous

    (@enacuous)

    I’m gonna try it now, thanks

    Removed until I can edit this.

    Thread Starter enacuous

    (@enacuous)

    OMG DUDE! FINALLY! THANKS!

    now the only thing I need fixed is the twitter plugin to work on every page.

    I need your full code for the page where twitter is working, part of the necessary code is cut off so I can’t just cut/paste it for you.

    Thread Starter enacuous

    (@enacuous)

    I didn’t see your post about twitter till after.

    Thread Starter enacuous

    (@enacuous)

    well it’s the index page that it’s working on

    Thread Starter enacuous

    (@enacuous)

    here is the code for the index page

    https://wordpress.pastebin.ca/1494109

    Yes, but if you look at the second section of code that you posted at the VERY bottom there is php code wrapped around the twitter div…

    So I don’t know if you NEED that PHP code around the div or even how much of it there is because only you have access to the code before it gets sent to the server.

    You should just need to copy/paste this wherever you want it, but again, I can’t see the full page code so I don’t know if there is a continuation of the php that would need to be included.

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

    My previous comment was simply that if this is your actual company, I wouldn’t recommend putting twitter on every page because most of your clients won’t know what the hell twitter is.

    Code for the index page is useless because the index page does not have the twitter thing on it.

    Thread Starter enacuous

    (@enacuous)

    on the blog page it is not reproducing for each post

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