11 reputation
3
bio website wpler.com
location Mallorca
age 42
visits member for 1 year, 11 months
seen Mar 27 at 8:34

PHP & Wordpress developer


Jun
7
asked Go-Script get_option without theme
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