Using posts as the source for the slider will cause the links for the slider to point to the associated posts. Of course, promotions can be linked to anywhere.
Are you trying to display posts and promotions in the same slider?
if by same slider you mean the same code ie: [promoslider height="390px" category="homepage"]
then yes, this code allows me to make promotion from the “promotion admin” and its working fine.. i have a few images there and it works great…
but i’d like to insert a post too, and i wonder how to do this…
thoughts?
thx for the reply, appreciate it.
Having a single slider (shortcode) that pulls both promotions and posts is a bit complicated. You would have to pass your own custom query results using the ‘promoslider_custom_query_results’ filter as defined here.
ok, is there anyway you could provide me with a example code excerpt that uses the ‘promoslider_custom_query_results’ filter so that i could tweak it to the intended usage?
Since you mentioned its a bit complicated ill understand if you can’t… but in the event that you can, it would greatly help me get a head start and feel somewhat less intimidated by this upcoming customization.
thanks for constant feedback Woodent!
Here is some sample code that I used on a site to display specific custom graffiti jewelry products from the WP E-commerce plugin:
add_filter('promoslider_custom_query_results', 'tagurslf_product_query', 10, 2);
function tagurslf_product_query( $results, $id ){
if( $id == 'homepage_slider' ){
$results = array();
$posts = array(
4162, // Letters
5847, // Love Pendant
102, // Graffiti Bracelets
50, // Rings
111, // Custom Pendant
4279, // Graffiti Scroll Earrrings
5852, // QT
5862, // OM Pendant
5890, // Dog Tag
);
foreach( $posts as $post ){
$results[] = get_post($post);
}
}
return $results;
}
Hopefully that will give you an idea. You could also run get_posts() for the latest post and then run get_posts() to fetch the promotions from a specific category and then splice them together.
great, any way to contact you to have some custom work done? for a fee.
Great, email sent… thx for the support 🙂
Hiring “Woodent” for my project was the best thing that could happen to me!!! WOW totally nailed it and made my vision come true… if anybody wonders… i soooo recommend him, fast efficient, professional and get the job done at a way to reasonable price!