Forum Replies Created

Viewing 15 replies - 1 through 15 (of 25 total)
  • Thread Starter gojak

    (@gojak)

    Thanks for the update 🙂

    Hi,
    As far as I can see plugin inserts it’s own template inside page that you set up to display Q/A. You can’t change template through your theme, instead look for wp-content/plugins/dw-question-answer/inc/templates/default folder and inside you have two PHP files you have to manually adjust: content-start-wrapper.php and content-end-wrapper.php

    In content-start-wrapper.php look for:

    default:
    echo '<div id="container">
    <div id="content" role="main">';
    break;

    and replace it with your own structure, example:

    default:
    echo '<div id="primary" class="site-content"><div id="content" role="main">';
    break;

    Then open content-end-wrapper.php and close all sections, instead:

    default:
    echo '</div></div>';
    get_sidebar();
    break;

    this will close example structure:

    default:
    echo '</div><!-- #content -->
    </div><!-- #primary -->';
    break;

    Once you properly insert your theme structure the plugin will display correctly. If sidebar is not displayed correctly try to insert it also like this:

    default:
    echo '
    </div><!-- #content -->
    </div><!-- #primary -->';
    get_sidebar();
    break;

    Is this working for you?
    All the best

    I managed to create pagination that works with qTranslate, it doesn’t resets language to a default one.

    function mytheme_pagination($pages = '', $range = 999)
    { 
    
     global $paged; if(empty($paged)) $paged = 1;
     if($pages == '')
     {
     global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages)
     { $pages = 1; }
     }
     if(1 != $pages)
     {
     echo "<div class='pagination'>";
     if($paged > 1 && $showitems < $pages) echo "<a  href='".get_pagenum_link($paged - 1)."' class='page-numbers'>&lsaquo; Previous</a>";
     for ($i=1; $i <= $pages; $i++)
     {
     if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
     {
     echo ($paged == $i)? "<li class='page-numbers'><span class='current'>".$i."</span></li>":"<a  href='".get_pagenum_link($i)."' class='page-numbers'>".$i."</a>";
     }
     }
     if ($paged < $pages && $showitems < $pages) echo "<a  href='".get_pagenum_link($paged + 1)."' class='page-numbers'>Next &rsaquo;</a>";
    
     echo "</div>";
     }
     }

    I am designer – not a coder, so any suggestions to this code would be appreciated.

    Cheers!

    When I use this pagination works except when I click on pagination no 1, then it resets language:

    function mytheme_pagination() {
    	global $wp_query;
    
    	$big = 999999999; // This needs to be an unlikely integer
    
    	// For more options and info view the docs for paginate_links()
    	// http://codex.wordpress.org/Function_Reference/paginate_links
    	$paginate_links = paginate_links( array(
    		'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),
    		'current' => max( 1, get_query_var('paged') ),
    		'total' => $wp_query->max_num_pages,
    		'mid_size' => 5
    	) );
    
    	// Display the pagination if more than one page is found
    	if ( $paginate_links ) {
    		echo '<div class="pagination">';
    		echo $paginate_links;
    		echo '</div><!--// end .pagination -->';
    	}
    }

    When I use this, pagination works only on pagination 1, for all others (2, 3,4…) it resets language:

    /*
     * Pagination for archive, taxonomy, category, tag and search results pages
     */ 
    
    function mytheme_pagination() {
        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="pagination">';  
    
          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>';  
    
        }  }

    Anyone? Thanks!

    Got it. Actually it is: taxonomy-faq_category.php
    I completely forgot about this…
    Cheers!

    Hi,
    Is it possible to change archive or category page as well? I tried category-qa_faqs.php and faq-category.php but it seems that it’s not simple as that. 🙂

    Weirdest thing is that after reactivating plugin a couple of times pagination works normal except when I click on page number 1 on category page after switching to page 2 or 3,it resets language to default one. It seems that qTranslate still needs a couple of more fixes…

    Cheers

    This was a bad solution since it is not a fix… it is something… 🙂

    It seems that qTranslate multi language pagination is not displaying 4o4 links (at least for me) when permalinks are set to default (?p=123). Interesting thing is that with default permalinks qTranslate only works in Query Mode (?lang=en). The bad thing is that pagination is still broken for the other language, in category it displays pagination for all posts instead for that cat only.
    On a category page default language(en) pagination works just fine on all settings.

    Hi,
    I have similar problem with free Max Magazine theme. This is what I did to fix pagination on home page displaying recent posts. I have changed default function.php part:

    $paginate_links = paginate_links( array(
    		'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),
    		'current' => max( 1, get_query_var('paged') ),
    		'total' => $wp_query->max_num_pages,
    		'mid_size' => 5,
    		'add_fragment' => ''
    	) );

    with this:

    if(qtrans_getLanguage() == 'de')
    	$paginate_links = paginate_links( array(
    		'base' => str_replace( $big, '../../../page/%#%', get_pagenum_link($big) ),
    		'current' => max( 1, get_query_var('paged') ),
    		'total' => $wp_query->max_num_pages,
    		'mid_size' => 5,
    		'add_fragment' => ''
    	) );
    
       else if(qtrans_getLanguage() == "en")
    $paginate_links = paginate_links( array(
    		'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),
    		'current' => max( 1, get_query_var('paged') ),
    		'total' => $wp_query->max_num_pages,
    		'mid_size' => 5,
    		'add_fragment' => ''
    	) );

    However, this doesn’t effect category page pagination and archives page pagination. Don’t know why, I am still researching.

    Thread Starter gojak

    (@gojak)

    No problem, thanks!

    Thread Starter gojak

    (@gojak)

    Thank you, no more questions. 🙂

    All the best!

    Thread Starter gojak

    (@gojak)

    My mistake. For including in template:

    <div class="inheritssomeclass">
    <?php echo do_shortcode('[document gallery]'); ?>
    </div>

    Thread Starter gojak

    (@gojak)

    Or perhaps to add it in widgets, that would be cool since than it would automatically be listed if a page has attachments… simmilar to Document Attachment Widget.
    Thanks

    Thread Starter gojak

    (@gojak)

    Probably… Anyway I was using this plugin one time only so I had no chance to look into it further. 😉

    Thread Starter gojak

    (@gojak)

    I just hid line 119 //$percentage = $score[1] / $score[2] * 100 . ‘%’;
    and it is still working like charm. I had no time to work more on this… I hope this helps

Viewing 15 replies - 1 through 15 (of 25 total)