Jump to content
Sign in to follow this  
sois

When using a post cagetory in a Features box, posts are out of order.

Recommended Posts

sois

I am not using the features option with the custom Features category. I am having it use a custom category. Why is it not showing the posts in descending order? It is showing the posts in ascending order.

Share this post


Link to post
Share on other sites
sois
PageLines Framework 2.0.1 Wordpress 3.3.1

Share this post


Link to post
Share on other sites
Rob
I do not believe the Category view for the feature slider gives you any option for the order. It may be embedded in code to show older posts first, culminating in the latest post last (which is logical).

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
sois
That isn't logical. That would make the feature virtually useless. It would show the same posts forever. Can this be tweaked?

Share this post


Link to post
Share on other sites
Rob
The use of the Category mode is best when someone has a steady flow of content in a category, not when the category is static. In such circumstances, you're absolutely correct, the sliders would be there forever. However, under circumstances where the flow of posts in the category is regular, then it's perfectly logical. Yes it can be tweaked. Create a category called "Featured" and rotate posts that appear in other categories into that one too on a regular basis. I've experimented with this and edited one post every week to include it in that category and it appears, giving the slider new content. Since you can edit older ones out of the category without affecting them in any other way, the sliders will rotate. If you don't have plans to add new content at least every few weeks, then the Category mode is not appropriate to your needs. You'd be best using the static, default mode.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
sois
My content IS a steady flow. Every week we add new videos. I don't want to manually rotate posts. The whole point is to make things automated. I found a cool plugin that automatically creates posts in any category I would like whenever my videographer posts a new video to YouTube. Right now, PageLines isn't providing much value add besides a nice looking template. I wanted a more dynamic solution and unfortunately PageLines is the aspect fighting with me. Can the order at least be fixed to descending in the next version of PageLines?

Share this post


Link to post
Share on other sites
Simon
I'll have a test version for you soon

Share this post


Link to post
Share on other sites
Simon
try this version: http://dl.dropbox.com/u/29858470/section.php

Share this post


Link to post
Share on other sites
Simon
Actually i left the debugging in that file, look for the plprint line and delete it ;)

Share this post


Link to post
Share on other sites
sois
Thank you for the new options, however, it actually works counter intuitively. Ascending gives me the option I want, where the most recent file is on the left. Weird side effect, the thumbnails now do not work. Was the meta for feature thumbnails changed from feature-thumb?

Share this post


Link to post
Share on other sites
Simon
Have not changed the thumbs, they are generated from the featured image.

Share this post


Link to post
Share on other sites
Simon
Wait i see, if its set to random, the thumbs are not random.

Share this post


Link to post
Share on other sites
sois
Hmmm. Well, since it is not possible to use a linked images as a feature image, I altered the YouTube plugin to add the image and thumb to the meta. For some reason after I got this file, it still accepts the main image but not the thumb meta. Oh well, that is beyond the scope of PageLines, I believe. Thank you again, pross!

Share this post


Link to post
Share on other sites
sois
Hmmm, on second thought, the thumbs should still work. What type of parameter is feature-thumb looking for? An URL?

Share this post


Link to post
Share on other sites
Simon
No it looks at the post, if it has a featured image it takes the original image size for feature background, and uses the smallest size for the thumbnail.

Share this post


Link to post
Share on other sites
sois
This doesn't seem to be the case. Even with the default features, they have explicit URL's listed for the feature-thumb meta tag. Now after you sent me the edited file, the feature-thumb value is not populating the thumbnail for the feature if I select a post category. Something is still broken.

Share this post


Link to post
Share on other sites
Simon
Sorry i thought you had in category mode. No feature-thumb has not changed. If its in CPT mode it takes the thumb image from the thumb field in the meta settings, if in category mode it uses the featured image thumbnail.

Share this post


Link to post
Share on other sites
sois
I am in category mode. Before you sent me this change, I was able to add a feature-thumb URL to the wp_postmeta table for each post and it showed up as a thumbnail. Now after your edit, it will not reference the feature-thumb meta data. This was all in category mode. Nothing has changed other than the new section.php file.

Share this post


Link to post
Share on other sites
Simon
Ok so in cat mode you want it so if feature-thumb is set, use that, if not use featured image thumb, and if that fails fall back to default thumb right? What about the main background image? Same logic?

Share this post


Link to post
Share on other sites
sois
The main background image ideally should be able to be uploaded, but the default black gradient image is just fine. In category mode, I'd like to take any image from the post and use that as a thumb. Barring that, I'd like to reference an URL in the meta table, it doesn't matter what tag, just something I can tell the plug in to point it to. I originally tweaked it to import to the features area, but that is not going to work for various reasons, mainly that you can't view feature posts as you can regular posts. I know that feature is coming, but our season starts in a month :) If I can get this working, I'm halfway home, the other project looks easy!

Share this post


Link to post
Share on other sites
Simon
Well in category mode it wont take any image in the post, it uses the featured image for that post. Your plugin just has to add a featured image to the post when it creates the post using http://codex.wordpress.org/Function_Reference/set_post_thumbnail

Share this post


Link to post
Share on other sites
sois
Ugh, but it WAS working before you sent that adjusted file. It was working because I provided an URL to the feature-thumb meta value in the wp_postmeta table. This is how features work by design from what I can tell, why can't that same value be pulled for a regular post and if there is no value, just use the default setting?

Share this post


Link to post
Share on other sites
Simon
[code]$feature_thumb = apply_filters( 'pagelines-feature-cat-default-thumb', $this->base_url . '/images/fthumb3.png' );[/code] [code]$feature_background_image = apply_filters( 'pagelines-feature-cat-default-image', $this->base_url.'/images/feature1.jpg' );[/code] Thats the two filters provided already, you can use those with a little custom function to check if the post has the meta info you need and pass it back.

Share this post


Link to post
Share on other sites
sois
Where do I place the custom PHP so it doesn't get overwritten the next time I upgrade?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×