virgild
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Basic CSS questionWow it works!!! Php is so flexible ?? Thanks!
Forum: Fixing WordPress
In reply to: Basic CSS questionok I tested it an I get
Parse error: syntax error, unexpected ‘%’
on this line
<div class="block_two <?php if(%counter == 3) { echo ' last'; $counter=0; } ; $counter++; ?>">
Forum: Fixing WordPress
In reply to: Basic CSS questionOh I didn’t know about that. You mean like how I would style the first post differently?
Forum: Fixing WordPress
In reply to: Recent posts and page post – on same pagestill can’t figure it out ?? please help meh..
Forum: Fixing WordPress
In reply to: adding title to list subpagesok I’ll provide one soon I finish it. thanks
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..Thank you for teaching me that! Php seems pretty complex but it’s worth learning it! ??
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..Thank you for the new code! To be honest I don’t understand most of it ?? I think I have to learn some basic php. May I ask one question tho?
I don’t understand why you globalised the variables. I don’t have that code but the theme works. What does that do?
Forum: Fixing WordPress
In reply to: the_title just in child pagesthanks! I’ll give it a go.
Forum: Fixing WordPress
In reply to: Multiple post thumbnail sizes?Oh sorry, I was referring to the new post thumbnail feature in wordpress 2.9.1
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..I tried this.. I think I’m getting closer.. or going adrift lol
<?php if ($_image1=="") {?> <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $theme_image1; ?>&h=100&w=293&zc=1" alt="" width="293" height="100" /></a> <?php else : ?> none <?php endif; ?>
but it doesn’t work ??
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..Thank you so much for trying to help me! I shouldn’t probably play with php until I learn the basics.. but it’s fun! ??
here is the page template on which I have the codes. I’m trying to make my own theme with theme options.
https://wordpress.pastebin.ca/1771031
I have 3 text blocks on the bottom page similar to the ones in this theme
https://www.curtziegler.com/sitedemo/portfolio/
just that I have images under the titles.. and when there is no image uploaded I get that broken image icon..
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..Sorry for not explaining. You’re not rude at all! I’m not even sure what I’m really doing but it works.
The code is for a custom theme option I’m using to display images in my blog.
It calls this function.
array( "name" => "Box image", "desc" => "Enter image path for the text box", "id" => $shortname."_image2", "std" => "", "type" => "text"),
so I’m placing this
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $theme_image2; ?>&h=100&w=293&zc=1" alt="" width="293" height="100" /></a>
in my page template where I want the image to appear. But when I don;t upload an image I get the broken image icon. so I’m tryin to use a sort of
<?php else: ?> <?php endif; ?>
php code to display nothing if there is no image path but I don;t know how to implement that.. I’m very new to php.
Forum: Fixing WordPress
In reply to: I made a custom field! :-D but just one question..Thanks for the code! Would this be correct?
<a href="<?php the_permalink() ?>" rel="bookmark"> <?php $i = echo $theme_image2; ?>&h=100&w=293&zc=1" alt="" width="293" height="100" /> <?php if( $i ) : ?> <img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $theme_image2; ?>&h=100&w=293&zc=1" alt="" width="293" height="100" /></a>
The original code without conditions is
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $theme_image2; ?>&h=100&w=293&zc=1" alt="" width="293" height="100" /></a>
Forum: Fixing WordPress
In reply to: How do they do this?Yup that’s what I had in mind.. but I was thinking instead of using actual pages, I’ll try to develop theme options for each block.. like you would go in theme settings and write whatever for each block and have it appear in the homepage. I know it’s farfetched considering my lack of WP experience. I guess I;m asking for some kind of tutorial or step to learn how to do this. Please help me if you can with any kind of advice.
Forum: Fixing WordPress
In reply to: Exclude first recent postHmm, I added it but nothing happened.
This is my homepage.php
<?php /* Template Name: Homepage */ get_header(); ?> <div id="content"> <div id="leftcolumn"> <div class="posthome"> <?php query_posts('posts_per_page=1'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(__('Read more'));?> <?php endwhile; else: ?> <?php endif; ?> <?php $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 6, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo '<div id="titlebox"><div class="title">Recent Posts</div></div>'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class="headingbox"> <h3 class="smalltext"> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h3> <h4 class="floatright"><?php the_time('F j, Y'); ?> | " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read All</h4></div> <?php the_excerpt();?> <hr /> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?> <div class="postclear"></div> <div class="postbottomhome"></div> </div><!-- end #post--> </div> </div><!-- end #content--> <?php get_sidebar(); ?> <?php get_footer(); ?>