[wp-hackers] Custom DB Table Settings

Sinan sinan at sinanisler.com
Tue Jan 22 21:27:25 UTC 2013


Because I was not know that. :)

Thanks.


2013/1/22 chris <chris at lod.com>

> Why not just
>
> update_option( 'posts_per_page', 12 );
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com [mailto:
> wp-hackers-bounces at lists.automattic.com] On Behalf Of Sinan
> Sent: January 22, 2013 3:06 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Custom DB Table Settings
>
> Joan Artés I realise this is not changing setting.
>
> This is local and temporary solution for posts per page - query_posts()
>
> But thank you for help :)
>
>
> 2013/1/22 Sinan <sinan at sinanisler.com>
>
> > Thank you Joan Artés
> >
> >
> > 2013/1/22 Joan Artés <jartes at gmail.com>
> >
> >> Hi,
> >>
> >> To change the post count I used this code:
> >>
> >> function modify_post_per_page( $query ) {
> >>     $query->query_vars['posts_per_page'] = 12;
> >>     return $query;
> >> }
> >>
> >> add_filter( 'pre_get_posts', modify_post_per_page' );
> >>
> >> Cheers
> >>
> >> Joan Artés
> >> http://joanartes.com
> >>
> >>
> >> 2013/1/22 Sinan <sinan at sinanisler.com>
> >>
> >> > I'm writing a theme its need special settings.
> >> > one them is post per page count. As you know it is 10 but I have
> >> > set
> >> this
> >> > at the beggining to 12 I write this for to do that setting
> >> >
> >> >
> >> > add_action( 'after_setup_theme', 'function_name' ); $wpdb->query( "
> >> > UPDATE  `wp`.`*wpsinshop*_options`
> >> >  SET  `option_value` =  '*12*'
> >> > WHERE  `*wpsinshop*_options`.`option_id` =22;  "
> >> > );
> >> >
> >> > *wpsinshop *custom db prefix. How can I can make this setting
> >> > better or easy way? Or if this way is better how can I get db
> >> > prefix for update
> >> it.
> >> > As you know some times prefix changing and if I make default wp_
> >> > prefix this setting some times not gonna work.
> >> >
> >> >
> >> > Thanks.
> >> >
> >> > --
> >> > Sinan İŞLER
> >> > sinanisler.com <http://www.sinanisler.com> fb.com/sinanisler
> >> > _______________________________________________
> >> > wp-hackers mailing list
> >> > wp-hackers at lists.automattic.com
> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> >
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> >
> >
> > --
> > Sinan İŞLER
> > sinanisler.com <http://www.sinanisler.com> fb.com/sinanisler
> >
>
>
>
> --
> Sinan İŞLER
> sinanisler.com <http://www.sinanisler.com> fb.com/sinanisler_______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Sinan İŞLER
sinanisler.com <http://www.sinanisler.com>
fb.com/sinanisler


More information about the wp-hackers mailing list