Yoris
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: User Photo] change the allowed photo file sizeI found that the adding this:
<input type="hidden" name="MAX_FILE_SIZE" value="512000" />
hidden input field just before the file select input field will restrict users from uploading files bigger than the specified value.Forum: Themes and Templates
In reply to: Single.php showing all posts?I don’t know what you did, but https://easingslider.matthewruddy.com/screenshots seems to be displaying only the screenshots now. So I guess it’s working…
Did you figure out what was wrong?Forum: Themes and Templates
In reply to: Posts per page query$num_of_posts = $wp_query->post_count;
will give you the number of post in the current query. However, as alchymyth said, you will have to use a custom query.
Which could look like this:<?php query_posts('posts_per_page=-1'); $num_of_posts = $wp_query->post_count; $max_num_post = get_option('posts_per_page'); if($num_of_posts > $max_num_post): ?> Your loop for more posts than the max number of post per page here. <?php else : ?> Your normal loop here. <?php endif; ?>
Forum: Themes and Templates
In reply to: Single.php showing all posts?I think it might be in the link you’re using.
I would expect a link to a single post to look like this:
https://easingslider.matthewruddy.com/category-name/post-titleYou could test this by making your post titles into links, to see what link you get then.
<h4><a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a></h4>
Forum: Developing with WordPress
In reply to: query_posts in category with tagYes, that works too!
Thanks!! You saved me from a lot of excluding.Forum: Developing with WordPress
In reply to: query_posts in category with tagWell to get back to the first problem…
I was faced with the same problem, while trying to find a fix I found the following. Excluding all categories, except the one you want, will get you the desired results. For example:I Was trying for this:
query_posts('cat=32&tag=hs1&showposts=5');
And as mentioned, it doesn’t work.
But this, excluding categories, does:query_posts('cat=-1,-3,-4,-5,-8,-9&tag=hs1&showposts=5');
Forum: Themes and Templates
In reply to: Just Getting StartedWell, have a look at wpdesigner.com. They have a lot of tutorials about wordpress, here’s the link https://www.wpdesigner.com/category/tutorials/
Hope it helps.Forum: Themes and Templates
In reply to: Creating a new themeCheck WPDesigner:
WPDesigner Tutorial (so you want to create wordpress themes huh)
Forum: Themes and Templates
In reply to: display bug for subpages on 404 and search resultsWell I found another solution.
<?php if(is_404() or is_search()) : ?> //put here what you want to show on your 404 and searchresults pages instead of de childpages <?php else : ?> <?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?> <?php endif; ?>
Forum: Plugins
In reply to: archives – current year in months, previous by yearI think this is what you want:
<ul> <?php wp_get_archives('type=yearly&limit=1'); ?> <ul> <?php wp_get_archives('type=monthly&limit='.date('m').'&show_post_count=1'); ?> </ul> <?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date DESC"); unset($years['0']); foreach($years as $year) : ?> <li><a href="<?php echo get_year_link($year); ?>" title="<?php echo $year; ?>"><?php echo $year; ?></a></li> <?php endforeach; ?> </ul>
Forum: Themes and Templates
In reply to: display bug for subpages on 404 and search resultsThanks!! I’ve been looking for a solution for this problem for some time now. And your solution works great for the 2 cases you’ve mentioned (404 page and erroneous search results).
But by adding this loop, you’ve created a new location where this error occurs. Being: when a search returns results form different child pages, or pages that have child pages. Because of the loop, the nav is displayed for every search result that is or has a child page. (This is my guess) For example, try searching ‘child’ on your page.
So I guess we are still looking for a (total) solution to our problem…