Smoothweb
Forum Replies Created
-
Thank You! Works perfect.
Hey, Looks great!
How did you managed to upload a featured image in a post en than let it show up in the frontpage-slider? Can you clarify this for me? Thanks in advance
I think that this is the specific code that should be adjusted:
(from the frontpage-slideshow.php)$image = get_post_meta($fspost->ID,'fs-picture',true); if ($image == '') { // if no image : use the first image on the post $image = $fspost->post_content; if (preg_match('/<img[^>]*src="([^"]*)"/i',$image,$matches)) { $image = $matches[1]; } else { (is_ssl()) ? $url = str_replace('https://','https://',get_bloginfo('url')) : $url = str_replace('https://','https://',get_bloginfo('url')); $image = $url.'/wp-content/plugins/frontpage-slideshow/images/one_transparent_pixel.gif'; }
Forum: Themes and Templates
In reply to: submenu, show tagline if no submenu existsI think I’ve got the answer by myself. After logic thinking and a couple of tries this is the code I came up with:
Could any of you ‘experienced’ coders look if this is the way to go?
<div id="subnavi2"> <?php global $wp_query; if( empty($wp_query->post->post_parent) ) { echo (' This would be the text as input if there is no submenu'); $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } ?> <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?> <ul> <?php wp_list_pages("title_li=&child_of=$parent" ); ?> </ul> <?php endif; ?> </div>
Forum: Plugins
In reply to: working navigation with offset in loopBack again. The wordpress site is online, only the loop is not working anymore…. It is still working under the localhost version (which is exacly the same as the one online).
What happens is: The first 5 full posts and the next 15 titles on the first page are perfect. When I go to page 2 it shows the loop.php markup instead of the code above (that works in the localhost)
Isnt’t that wierd? Do you have any idea?
PS. I remembered putting a different category to it instead of cat=1 its cat=6, thats all….
query_posts(‘cat=6&posts_per_page=20&paged=’ . $paged);Forum: Plugins
In reply to: Simple Categories in the Admin*bump*
Forum: Plugins
In reply to: working navigation with offset in loopTHANK YOU so much my friend!
Forum: Plugins
In reply to: working navigation with offset in loopThnx, there’s a first thing for everything, right
The page doesn’t show (ignores) the code for the first five posts …
It simply just uses the <? php else and shows the title for all posts.(ps. I have edit “posts_per_page=20” to 5 and “$counter <= 5” to 2 beacause of the limit amount of posts I have in the test version of the website.)
Forum: Plugins
In reply to: working navigation with offset in loop*bump*
Forum: Plugins
In reply to: working navigation with offset in loopLooks solid!
How do I insert these post codes?
The following can’t be good….<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('posts_per_page=20&paged=' . $paged); if(have_posts()) : $counter = 1; while(have_posts()) : the_post(); if( !is_paged && $counter <= 5 ) : /*insert the code to show the full post*/ <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <?php the_excerpt(); ?> else : /*insert the code to show title only*/ <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> endif; $counter++; endwhile; /* insert the code for navigation here */ <div><?php wp_pagenavi(); ?></div> else: echo 'nothing found'; endif; ?>
Forum: Themes and Templates
In reply to: Margin-bottom @ thumbnail in post loopthnx works like a charm!
Forum: Fixing WordPress
In reply to: Paging with multiple loops in indexIs it possible to upload the code again? I am searching for the exact same thing for 2 days now… All the codes I find & test are either offset or navigation nothing works together….
Thanx in advance
Forum: Themes and Templates
In reply to: Margin-bottom @ thumbnail in post loop*BUMP*