leandrodpzla
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Conditional tags not working inside the loopAfter have been reading for a while I figured out that I should use Wp_Query instead query_posts. I tested and works like a charm.
<?php $parent = $post->ID; $chil = $post->post_parent; ?> <?php if ( $post->post_parent ) {?> <?php $my_posts = new WP_Query('post_type=projects&orderby=menu_order&order=ASC&post_parent='.$chil); ?> <?php } else { $my_posts = new WP_Query('post_type=projects&orderby=menu_order&order=ASC&post_parent='.$parent); }?> <?php if ($my_posts->have_posts()) : ?> <?php while ($my_posts->have_posts()) : $my_posts->the_post(); ?> <li><a href="<?php echo qtrans_convertURL(get_permalink(), qtrans_getLanguage()); ?>" class="<?php if ( is_single($post->ID) ) { echo 'selected'; } ?>"><?php echo the_title(); ?></a></li> <?php endwhile; ?> <?php endif; ?>
Forum: Plugins
In reply to: [Plugin: qTranslate] Add &lang= to search results URLI found this solution!
Put this inside search form!
<input type="hidden" value="<?php if ($language == 'es') echo "es"; else echo "pt"; ?>" name="lang"/>
Forum: Themes and Templates
In reply to: Issue with wp_list_pages: not adding current_page_item classany ideas?
Forum: Themes and Templates
In reply to: Issue with wp_list_pages: not adding current_page_item classTe template code…
https://pastebin.com/75XG4eUAAnd the site…
https://p.ly/MTj2q(Will expire tomorrow, I don’t have the auhorisation to do it public yet)
Forum: Themes and Templates
In reply to: Issue with wp_list_pages: not adding current_page_item classNo, the code is outside the sidebar. Is inside the main body of the page template, outside the loop. And I’ve tried that hack and still getting current class missing…
I should put my code inside the sidebar?Thanks, what I did was delete the function on plug in’s files. That solved my problem cos I did’nt need the time funtction.