kortschot
Forum Replies Created
-
Forum: Plugins
In reply to: Category overview page with comment countsEdit:
Fix in the setup_postdate, was in the wrong foreach:
<?php $categories = get_categories('child_of=225'); foreach ($categories as $category) { setup_postdata( $post ); $my_date = mysql2date("D j M Y - H:i", $post->post_date); //Display the sub category information using $category values like $category->cat_name echo '<div class="row clearfix">'; echo '<div class="col1"><div class="inner"><h2>'.$category->name.'</h2>'; echo '<p>'.$category->description.'</p>'; echo '<p class="recent"><strong>Meest recent:</strong></p>'; echo '<ul class="recentlist">'; foreach (get_posts('posts_per_page=2&cat='.$category->term_id) as $post) { echo '<li><a href="'.get_permalink($post->ID).'">'.get_the_title().'</a></li>'; } echo '</ul>'; echo '</div></div>'; //end .col1 .inner echo '<div class="col2">'.$category->count.'</div>'; echo '<div class="col3">X</div>'; //comment count here! echo '<div class="col4">'.$my_date.'</div></div>'; } ?>
The comment count is still an issue though.
Forum: Plugins
In reply to: [Pronamic Pay] iDeal successful payments won't change order statusok, thanks.
I found this…
Only gives a parse error for me in an empty functions.php.
But the description does exactly what I need.
Like Esmi’s idea… but without post format. (what by the way works great), only I want to try and get it a bit more user friendly… and what if I need the post-format for something else later on….
So I have a checkbox in post and page edit page where I can select if it is featured content or not.
So on index.php we can get it by a query like:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Hey thanks,
Ill check in to that… will let you know!
Paul
wow thanks a allot!
again, ill keep you posted.Hmm… must say, really liking this codewise, quick clean and simple.
It’s just a matter of educating the people who will be using it. Nevertheless still good practice to fiddle with the meta-box.
Ill update when I have something new, maybe somebody else takes a peak here and post’s some other thoughts.
thanks.
PaulYeah, well… kinda does what it needs to…
got this in functions.php
add_theme_support( 'post-formats', array('status')); add_post_type_support( 'page', 'post-formats' );
and this for the loop (this probably could be a little cleaner)
<section> <article id=""> <?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-status' ) ) ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post(); the_title(); echo '<br />'; endwhile; else: echo 'no'; endif; wp_reset_query(); ?> </article> </section>
Now if I could rename status in Featured someway… that possible?
I love the easiness but think my client prefers a more… tailored solution.Paul
hmm i’m intrigued by your idea using post formats…
Thing is that clients love it when stuff is named for what it is, where they have… well somewhat of a point, but I certainly will think this over.
Starting to get late here.
Thanks and i’ll let you know.Paul
Forum: Themes and Templates
In reply to: Featured content (post 'n pages)yeah… thanks, try some fiddle with that a bit.
thanks!
Forum: Themes and Templates
In reply to: Featured content (post 'n pages)Yeah, thats the thing…
Can be either a post or a page, so the client can check a checkbox on a post or page and say something like: “featured content”.
All kinds of issues here.. i know. It’s a “wish” from the client so he can just check the content he want to be featured. Doesn’t matter to him when its a post or a page.
I want him to use a post-type “featured” or something… and just loop it in there.
But I thought, lets check on the WP-forums first, who knows what PHP-Wizard made some magic that is already out there.
Forum: Themes and Templates
In reply to: Loop is looping stuff I don't want to be Looped =)awesome, this works like a glove.
Just pasted in in my project and works instant. I’m going to dissect your snippet tomorrow so I understand it.
Thanks, you just made my weekend!
With Regards,
PaulForum: Themes and Templates
In reply to: Loop is looping stuff I don't want to be Looped =)thanks, ill start playing with this.
I’m not that good with PHP, so its a trial and error thing for me. But one must learn.
Anyways thanks for the input, and I’ll post new code when I stumble upon a new flaw or solution.
Have a nice weekend.
Forum: Themes and Templates
In reply to: Loop is looping stuff I don't want to be Looped =)pastebin: https://pastebin.com/N1ZiqZ4V
Forum: Themes and Templates
In reply to: Categories list PHP helpthis just came to mind….
<?php foreach((get_the_category()) as $category) { echo ' <li><a href="#">cat_name . '">' . $category->cat_name .'</a></li> ' ; } ?>
Can’t test it out atm, does this look like a feasible solution?
Think I’m messing up all the points and apostrophes in the PHP.Forum: Themes and Templates
In reply to: Categories list PHP helpIm still looking in to this, so when somebody has something to add, please don’t hesitate to do so.