Jump to content
Sign in to follow this  
saltydisciple

How can I set a default Carousel meta information for all posts?

Recommended Posts

saltydisciple

Hi, Is there a way to set default Carousel meta information for all post pages. I haven't found an option for it PageLines 2.0. Do I have to set the information separately for hundreds of posts? Thanks in advance for the reply!

Share this post


Link to post
Share on other sites
Rob
Actually yes and no. You wouldn't set things for the carousel on the posts, but instead on the pages. So if you have 30 posts to include in a carousel, you would do so on only one page. Your level of control thus is much improved and the look of your carousel may be either the same across your site or, different, as you please.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
saltydisciple
Thanks rangelone! I think I didn't say what I meant clearly enough... what I meant was that I have a lot of posts. They are all set as 'single post' in the PageLines Meta Settings. Now there is the tab called Carousel Meta Settings. I seem to have to set the Carousel Meta Settings for each post separately, since I want to show a nextgen gallery in the Carousel and have special setting for it set in the Single Post - Carousel Meta Settings. Is there a way to do this so that I don't have to go through every post and do the changes separately for all of them? Thanks!

Share this post


Link to post
Share on other sites
petere21
Perfect I have to change 950 single post carousels handy (the same features) other way I cannot use it. I want to ask developers to solve this problem or just simply show where in styles we can change settings for (carousel for posts) from category and freateres for width 330 px.

Share this post


Link to post
Share on other sites
Jenny
I believe the fix for that is coming in the next release (2.1 I think it is). For now, please view the topic I created about this here: http://www.pagelines.com/forum/discussion/16155/how-to-make-carousel-display-correctly-on-single-post

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
saltydisciple
Thanks all! Although this did not solve my problem (I will now have to go through all of my posts separately and set correct options for carousel meta) I will eagerly wait for release 2.1, which should fix this problem. Do you have any estimate on when this 2.1 will be released?

Share this post


Link to post
Share on other sites
saltydisciple
I tried to make a global declaration for these settings for 'single_post' type posts. My declaration did not work, could you direct me on how to change the declaration below so that it works? Or can it even be done this way? [code]add_action('pagelines_carousel_list', 'metainfo'); function metainfo(){ if( get_post_type() == 'single_post' ) { add_post_meta(3, 'carousel_animation_speed', 1000, false); add_post_meta(3, 'carousel_display_items', 5, false); add_post_meta(3, 'carousel_items', 20, false); add_post_meta(3, 'carousel_mode', ngen_gallery, false); add_post_meta(3, 'carousel_scroll_items', 5, false); add_post_meta(3, 'carousel_ngen_gallery', 1, false); } }[/code] Thanks in advance for the reply!

Share this post


Link to post
Share on other sites
kastelic
I'm not sure about this code but its worth a shot. I do think that you should use this: [code]if ( is_single() )[/code] rather than [code]if( get_post_type() == 'single_post' )[/code]

Share this post


Link to post
Share on other sites
Simon
That code is going to get you into trouble ;) On every page load your going to add the meta to post '3' again and again, until you have millions of them! You need to add: [code]global $post;[/code] Grabbing the post global will give you the ID $post->ID Also please check before adding to the db! Use [url="http://codex.wordpress.org/Function_Reference/get_post_meta"]get_post_meta[/url] to see if they are already set. Just check for one, if its false then set them.

Share this post


Link to post
Share on other sites
saltydisciple
Thank you kastelic and pross! I really appreciate the help! I hope this works :)

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  

×