dfwgreg
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Header won't show after updateAdd the
index.phpfile to pastebin so we can see what the file looks like. Did you add<?php_the_header(); ?>to the index?Forum: Fixing WordPress
In reply to: How do i add audio players to wordpressFirst, you can change the file upload size in your
php.inifile. Second, there are lots of audio players for WordPress. I don’t use a plugin but JW Player and use a custom field to add the location of audio the file. I use JW Player as it is in HTML5 works on mobile browsers.Just search for audio players in plugins and hopefully, you will find the audio player that suits your needs.
– Gregory S.
Forum: Fixing WordPress
In reply to: PLEASE HELP! Cannot modify header informationMake sure the
functions.phpfile contains no blank spaces.Forum: Fixing WordPress
In reply to: Query posts on custom post type categoryAdd in
query_posts(post_type="name of post type")as well as the category name or number.Forum: Fixing WordPress
In reply to: Display an image based on div?I think I’m going to have another custom field with separate code. I wanted to do an if statement but I don’t think I can accomplish it. Oh well.
Forum: Fixing WordPress
In reply to: Display an image based on div?I know this would be a difficult question to ask but what about a way to add something that triggers the image to display?
I have a loop set up like. This is what happens when a normal post is shown:
<div=toppost>
One post
</div>If two stickies are enabled, it goes to this:
<div=topcolumn>
1st post 2nd Post
</div>Both will show an image attached to the post. Are there other options to change the image. Like from ‘medium’ in one post to thumbnail in the two stickies?
This is the full text of index.php:
http://pastebin.com/48BdfKYGThanks. Hope this clears up some confusion,
Gregory S.Forum: Fixing WordPress
In reply to: Looking for a way to change divs based on the number of post?Bingo! Thanks a bunch, alchymth!
Forum: Fixing WordPress
In reply to: Looking for a way to change divs based on the number of post?I did solve my problem but the style of the post is stilled messed up.
For example, when two posts are shown, the html looks like this:
<div class="topcolumn"> Steve Jobs resigns<div class="topcolumn"> East Coast battens down as Hurricane Irene hits</div> <script src="http://alttv.net/wp-includes/js/admin-bar.js?ver=20110131" type="text/javascript"></script> footer </div>This is what the code looks like on index.php:
<?php while (have_posts()) : the_post(); ?> <?php $displayed = $post->ID;?> <?php if( $wp_query->post_count >=2 ) : ?> <div class="topcolumn"> <?php else : ?> <div class="toppost"> <?php endif; ?> <?php the_title(); ?> <?php endwhile; ?> </div> <?php get_footer(); ?>What I want the loop to look like is if the loop has two posts (stickies), it looks like this:
<div class="topcolumn"> <?php the_title(); ?> <?php the_title(); ?> </div>Thanks for all help, it is greatly appreciated.
– Gregory S.Forum: Fixing WordPress
In reply to: Looking for a way to change divs based on the number of post?I got it working! I didn’t have the code in the loop. Thanks alchymyth!
Forum: Fixing WordPress
In reply to: Looking for a way to change divs based on the number of post?what template is this?
index.php
what is the result so far?
does it do what you expect?I add the code above and it didn’t change the div like I wanted it to do.
i am not sure what you intend:
you check for the number of posts first (before there is a loop), then add a query with ‘posts_per_page’ set to 1, and a loop; is that on purpose?The query is configured to show the first post, unless stickies are enabled, then it shows all sticky posts.
I’ll propose another question: Is there a way to check for stickies and display a separate code instead of the one I provided in pastbin?
Forum: Fixing WordPress
In reply to: Looking for a way to change divs based on the number of post?Forum: Fixing WordPress
In reply to: Blog Page not Showing CorectlyDid you change the permalinks? This usually occurs when the permalinks structure gets messed up.
Forum: Fixing WordPress
In reply to: Need help with setting up sticky posts as a custom fieldThanks for the help, zoonini but I was able to solve the problem. It was a coding error.
Forum: Themes and Templates
In reply to: Create a grid if two posts are in the loop.What about checking if it’s the only post? I’m not a PHP programmer and only depend on looking to see if other people have solved the same problem as me.
Example:
If one post, use div=one
If two posts, use div=twoThanks,
Gregory S.Forum: Fixing WordPress
In reply to: My wordpress keeps getting infectedI treat it as a virus/spyware/malware, etc. You can cut off the head but the body still lives. The same thing happened to me and I started over. Is it a pain, yes but if you don’t know what to look for, it’s best to nuke and start over.