skidevil
Forum Replies Created
-
Forum: Hacks
In reply to: Action Hook like "edit user profile update"Haha, how could I miss that?!
Thanks a lot! It’s exactly what I was looking for…
Forum: Hacks
In reply to: query_posts, offset and paginationSure,
I wanted to achieve that the first post of each site is displayed different (bigger thumbnail, other font, etc.)
I did this using two queries. The first query does not makes any trouble at all. First I thought I could use offset and pagination for the second post, but that doesnt work. Instead you use something like:
<?php $my_query = new WP_Query('category_name=featured&posts_per_page=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <!-- Do stuff... --> <?php endwhile; ?>
and
<?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue;?> <!-- Do stuff... --> <?php endwhile; endif; ?>
For explanation read:
https://codex.www.ads-software.com/The_Loop#Multiple_Loops_in_Action
Forum: Hacks
In reply to: Good way to save a boolean for each postAs long as you dont have tons of information to store you can use meta values.
Meta values tend to be very slow if you store a lot of information.
Forum: Hacks
In reply to: Different authorpage for authorsYou could design a specific page for each author and add a header-redirect in your author.php if author_x is being displayed.
Forum: Hacks
In reply to: Custom posts with standard categoriesYou have to register a new taxonomy aligned to your new post_type to get something like a category. Have a look:
https://codex.www.ads-software.com/Function_Reference/register_taxonomy
Forum: Hacks
In reply to: comment_formAny suggests?
Forum: Hacks
In reply to: query_posts, offset and paginationHm, does not solve my actual problem, but thanks for the link!
The technique used @multiple Loops in Action brought me to a solution I tested and which worked…
Is there any special reason why ‘offset’ and pagination doesnt work togehter?
Forum: Hacks
In reply to: query_posts, offset and paginationI generate the URLs via the function posts_nav_link()…
Not sure what you mean, but I dont think thats the problem, coz I got no problem if I do not use the offset parameter. So I dont think the problem has something to do with &paged not being loaded…
Forum: Hacks
In reply to: query_posts, offset and paginationThanks for the advice, but doesn’t work…
Indeed it does not make any difference wether you use:
$page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
or:
$page = get_query_var(‘paged’);
Any other ideas?