16 reputation
5
bio website wpler.com
location Mallorca
age 42
visits member for 2 years, 3 months
seen Sep 4 at 13:19

PHP & Wordpress developer


Aug
3
awarded  Student
Jun
29
answered Update own Plugin Repository on Multisite
Jun
26
asked Update own Plugin Repository on Multisite
May
23
awarded  Popular Question
Apr
19
answered Add post tag without post id
Apr
19
asked Add post tag without post id
Jan
26
asked Custom-Posttype & Custom Taxonomy WP_Query
Sep
8
comment In widget, the value of select field doesn't get updated, changes after saving
I don't know, why WP doing this, but sometimes the ->the_post() will not halt the globals for using into the script. Therefore i get the ID after the foreach() in this way: <?php $my_query = new WP_Query('post_type=my-post-type'); foreach($my_query as $mypost): $postid = (int)$mypost->ID; ?><option value="<?php echo $postid ?>"><?php get_the_title($postid); ?></option><?php endforeach; ?>
Sep
6
comment In widget, the value of select field doesn't get updated, changes after saving
Ok, use it in another way directly by the Query: `<?php foreach($the_query->posts as $post) : $postid = $post->ID; ?>...<?php endforeach; ?>
Sep
5
awarded  Tumbleweed
Sep
4
comment In widget, the value of select field doesn't get updated, changes after saving
Ok, go to control if the ID are coming: <?php while ( $the_query->have_posts() ) : $the_query->the_post(); echo get_the_ID(); ?> If the ID are printed, capsulate it into a variable and use this.
Sep
4
awarded  Teacher
Sep
3
answered In widget, the value of select field doesn't get updated, changes after saving
Aug
29
comment Add new template file in plugin
[Here][1] you will find the answer ;) [1]: wordpress.stackexchange.com/questions/3396/…
May
24
awarded  Autobiographer