forunner
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Centered ul navigationblue robot
blue robot second method
try this ^^
width : x px;
position : absolute;
left : 50%;
margin-left : x/2 ;Forum: Fixing WordPress
In reply to: custom fieldshum inverse the count variable
<div id="thumbnailsbox2" class="thumbnails" style="display:none;padding:0;margin:0;"> $count = 0; <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $lastposts2 = get_posts('numberposts=24&category=5');?> <?php foreach($lastposts2 as $post) : setup_postdata($post);?> <?php if($count > 12){ <?php $imgThumb = get_post_meta($post->ID,'img_thumb', true); ?> <?php if($imgThumb !=""){ ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo "<img class='thumb' src='$imgThumb'/>" ?></a> <?php } else { echo ''; } ?> <?php } $count++; ?> <?php endforeach; ?> <?php endwhile; else: ?> <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?> <a href="#" id="previmgs">Previous</a> </div>and put a condition on your links …something like if(count > 12)
[humm, I don’t know if it will work]
Forum: Fixing WordPress
In reply to: Functions to returns the image of a post?if you use the “upload/insert” function of wordress, your image
will have a class “wp-image-*id*”
<img width="***" height="***" alt="" src="****************.jpg" title="***" class="alignnone size-full wp-image-54">
you can edit it into your css.Personally, I’m using metadatas to assign biggest images. (custom fields “image” where I put the url of the images)
<?php if (get_post_meta($post->ID, 'image', true)){ ?> <img src=<?php echo get_post_meta($post->ID, 'image', true) ;?> /> } ?>Forum: Networking WordPress
In reply to: unable to access to secondary blogsup =(
Forum: Fixing WordPress
In reply to: custom fieldsgood 🙂
(put the topic on “resolved”)Forum: Fixing WordPress
In reply to: displaying custom field values on template.try this
if (get_post_meta($post->ID, 'Price', true)){ echo "Price: £".get_post_meta($post->ID, 'Price', true) ; }Forum: Fixing WordPress
In reply to: Prevent pages from being in the menuIf you’re speaking about the sidebar,
you have to modify the sidebar.php of your theme
wp_list_pages display the pages.you can use parameters as exclude or exclude_tree
Forum: Fixing WordPress
In reply to: Put an element only in the main pageforeach is not closed
tryforeach ($postslist as $post) : setup_postdata($post); endforeach;or
foreach ($postslist as $post) { setup_postdata($post);}Forum: Networking WordPress
In reply to: I can't able to find any change defining " custom post type"I think you have to put the code in each theme because functions.php is a part of the theme.
[I’m not sure]Forum: Fixing WordPress
In reply to: custom fieldsnot a nice solution, but you could use something like that :
<div id="thumbnailsbox2" class="thumbnails" style="display:none;padding:0;margin:0;"> <?php $count = 24; ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $lastposts2 = get_posts('numberposts=24&category=5');?> <?php foreach($lastposts2 as $post) : setup_postdata($post);?> <?php if($count < 13){ <?php $imgThumb = get_post_meta($post->ID,'img_thumb', true); ?> <?php if($imgThumb !=""){ ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo "<img class='thumb' src='$imgThumb'/>" ?></a> <?php } else { echo ''; } ?> <?php } $count--; ?> <?php endforeach; ?> <?php endwhile; else: ?> <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?> <a href="#" id="previmgs">Previous</a> </div>I think there is a better solution !
Forum: Fixing WordPress
In reply to: custom fieldsmaybe (I don’t know, I’m a noob =p ) you should use posts_nav_links
Forum: Fixing WordPress
In reply to: Put an element only in the main pageonly in the home page >>> use the page “home.php”, not “index.php”
If you don’t want use this… ( look in the codex ) is_home() returns a boolean (true if the page is the home)Forum: Fixing WordPress
In reply to: Show title and thumbnails only for category pagegood :p
Forum: Networking WordPress
In reply to: I can't able to find any change defining " custom post type"I’ve tried your code and it works, the “Movies” category appears on my admin board
Forum: Fixing WordPress
In reply to: Show title and thumbnails only for category pagequote from the codex :
<?php //The Query query_posts('cat=8'); //The Loop if ( have_posts() ) : while ( have_posts() ) : the_post(); the_title(); the_post_thumbnail(); // I'm not sure for this one, try to look into the codex endwhile; else: .. endif; //Reset Query wp_reset_query(); ?>hope this will work for you, but I don’t know, I’m a beginner too