Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • I am experiencing the exact same issue I believe. Ideally, I want to use the do_shortcode in my template so that I have more control over where it is outputted. The only issue is that the average ratings are 0 and reviews 0, when in fact there are reviews.

    If I remove the do_shortcode from my template and tick the checkbox on the page, everything works perfectly as expected. This is a great plugin and I want to continue to use it.

    @ogessel – Did you receive a response?

    Thread Starter creative_lounge

    (@creative_lounge)

    Wow figured it out..so the issue I had which I perhaps didn’t make clear is that I was trying to display child pages not only on the parent page itself but also on the child pages.

    The above code would have worked fine on the parent page alone, but as soon as I am on any child page $post->ID no longer refers to the top parent but instead the page I am on and will not work as intended.

    In this instance I stumbled this guys function which worked a treat.
    http://www.webcitizenmag.com/2010/05/20/how-to-get-top-parent-page-id-in-wordpress/

    Hope this helps others,
    Thanks again

    Thread Starter creative_lounge

    (@creative_lounge)

    Thanks Martha,

    Basically I get nothing printed. When you say $post is not set up, am missing some code then ? I am placing this code outside the loop but by declaring $post as a global variable I thought I could still access the whole post object.

    Thanks for your time helping me understand this Martha, appreciate it,

    Cheers

    Thread Starter creative_lounge

    (@creative_lounge)

    I was suspecting it was menu position issue, but didn’t realise that a conflict over menu position could exist. I just though they would just fall under each other !? Thanks for your explanation. It makes a lot more sense now.

    Thread Starter creative_lounge

    (@creative_lounge)

    Thanks Nickkos. That did the trick and saved me many painful hours.

    Thread Starter creative_lounge

    (@creative_lounge)

    @codingpet.com

    To answer your question I don’t use a plugin for the permalink though Yoast SEO is removing the category base. My permalink setting is as you stated /%category%/%postname%/

    I think looking back when developing the site I was also having issues with using . as the category base. So it was convenient that Yoast SEO was able to handle that one for me instead.

    Cheers
    Paul

    Thread Starter creative_lounge

    (@creative_lounge)

    This topic is resolved

    Thread Starter creative_lounge

    (@creative_lounge)

    Thank you for looking into my issue codingpet.com I appreciate it. All sorted now.

    Thread Starter creative_lounge

    (@creative_lounge)

    All sorted now thanks chandanonline4u for looking into this it was a but strange, but like most wp issues it was a plugin that was screwing up the categories. Got a bit scary…just glad all is fixed.

    Thanks
    Paul

    Thread Starter creative_lounge

    (@creative_lounge)

    Thanks for looking into this for me @chandanonline4u.
    Perhaps rather lazily the footer are a series of hard-coded links that point to the category url in question e.g. <li><a href="<?php bloginfo('url'); ?>/accommodation/backpackers-budget/">Backpackers & Budget</a></li>

    Thanks

    Thread Starter creative_lounge

    (@creative_lounge)

    Thanks..This is the category code for accommodation. I am sure though the code will be OK..as it was working fine. I am wondering if third party plugin is to blame here. De-activating but still no luck

    <section class="contentWrapper">
    		<span id="bc">You are here:</span>
    		<?php if ( function_exists('yoast_breadcrumb') ) {
    			yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    		} ?>
    
    		<?php if(is_category(array(20,18,21,22,19,23))){ ?>
    		<h1>Stay <span>- <?php echo single_cat_title() ?> Accommodation</span></h1>
    		<?php } else { ?>
    		<h1>Stay <span>- Waiheke Accommodation</span></h1>
    		<?php }?>
    
    			<div class="clear"></div>
    		<?php
    		$categories = get_the_category();
    		foreach ($categories as $cat) {
     		}
    		$category = get_category($cat);
    		if ($category->cat_ID) {
    			if($category->category_parent)
    				$children = wp_list_categories('hide_empty=0&orderby=name&child_of=' . $category->category_parent . '&title_li=&echo=0');
    				else $children = wp_list_categories("orderby=name&hide_empty=0&title_li=&child_of=".$category->cat_ID."&echo=0");
    				$children = str_replace('<li>No categories</li>', '', $children);
    		}?>
    				<nav class="sub_nav">
    					<ul>
    						<?php echo $children ?>
    					</ul>
    				</nav>	
    
    		<?php $catID = get_query_var('cat'); ?>
    
    		<aside id="intro">
    			<?php echo category_description( $catID ); ?>
    		</aside>
    
    		<div class="clear"></div>
    
    		<section class="article_wrapper">			
    
    			<?php
    				$featured = new wp_query();
    				$featured->query('cat=' . $catID . '&showposts=1&orderby=rand');
    
    					while($featured->have_posts()) : $featured->the_post();
    						$wp_query->in_the_loop = true;
    						$featured_ID = $post->ID; ?>
    						<article class="feature">
    							<h2>Feature</h2>
    							<figure>
    								<?php $imgrow = 1; ?>
    								<?php while(the_repeater_field('images')): ?>
    									<?php if($imgrow == 1) { ?>
    										<a href="<?php the_permalink(); ?>"><img src="<?php the_sub_field('image'); ?>" alt="<?php the_title(); ?>"/></a>
    										<caption></caption>
    									<?php } ++$imgrow; ?>
    								<?php endwhile; ?>
    							</figure>
    							<div class="articleContent">
    								<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    								<p><?php custom_excerpt(60); ?>
    							<footer>
    								<p><strong>Tagged: </strong><?php echo get_the_category_list(__( ' ', '' )); ?><?php the_tags('', '', ''); ?></p>
    							</footer>
    							</div>
    
    							<?php endwhile; ?>
    						</article>
    
    		<div class="clear"></div>	
    
    		<!-- Google Sub Header Menu -->
    		<div class="googleSubAds">
    			<ul>
    
    			</ul>
    		</div>
    		<!-- end -->
    
    		<?php $i = 1 ?>
    		<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    			<article class="listing captionfull<?php if($i == 3) echo " last";  ?>">
    				<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    				<figure>
    				<?php $imgrow = 1; ?>
    					<?php while(the_repeater_field('images')): ?>
    						<?php if($imgrow == 1) { ?>
    							<a href="<?php the_permalink(); ?>"><img src="<?php the_sub_field('image'); ?>" alt="<?php the_title(); ?>" /></a>
    							<caption></caption>
    						<?php } ++$imgrow; ?>
    					<?php endwhile; ?>
    				</figure>
    
    				<div class="articleContent">
    					<p><?php custom_excerpt(12); ?>
    				</div>
    			</article>
    			<?php if($i == 3){
    			$i = 1;
    			} else {$i++;}
    			?>
    			<?PHP endwhile ?>
    		</section><!--end of article_wrapper-->
    			<?php else: ?>
    				<div class='noListings'>
    					<h2><?php _e('Sorry, there are currently no listings under this section. We actively working on this..come back again soon.'); ?></h2>
    				</div>
    			<?php endif; ?>
    			<?php
    			    global $wp_query;
    			    $total_pages = $wp_query->max_num_pages;
    			    if ($total_pages > 1){
    			      $current_page = max(1, get_query_var('paged'));
    			      echo '<div class="page_nav">';
    			      echo paginate_links(array(
    			          'base' => get_pagenum_link(1) . '%_%',
    			          'format' => 'page/%#%',
    			          'current' => $current_page,
    			          'total' => $total_pages,
    			          'prev_text' => 'Prev',
    			          'next_text' => 'Next'
    			        ));
    			      echo '</div>';
    			    }
    			?>
    			<div class="googleFooterBanner">
    			</div>
    			<?php get_footer(); ?>
    	</section><!--end of content Wrapper-->
    creative_lounge

    (@creative_lounge)

    You may have already found the solution, but if not take a look at this plugin, that will solve your issue.

    http://wordpress.org/extend/plugins/hikari-category-permalink/

    Cheers

Viewing 12 replies - 1 through 12 (of 12 total)