Forum Replies Created

Viewing 8 replies - 76 through 83 (of 83 total)
  • Thread Starter bluedrag

    (@bluedrag)

    Thanks! I got it working!

    A little note for people trying to get qTranslate to only display the none active language, this is how you do it.

    <?php  
    
    if(qtrans_getLanguage() == 'en'){
    	echo '<li class="lang-fr active"><a href="https://konggraphics.com/wordpress/?lang=fr" hreflang="fr" title="Fran?ais"><span>Fran?ais</span></a></li>';
    }
    
    if(qtrans_getLanguage() == 'fr'){
    	echo '<li class="lang-en active"><a href="https://konggraphics.com/wordpress/" hreflang="en" title="English"><span>English</span></a></li>';
    }
    
    ?>

    This code will display an anchor to change to active language to french when english is active and english when french is the active language.

    Forum: Plugins
    In reply to: execPHP and includes
    Thread Starter bluedrag

    (@bluedrag)

    I should also note there is no php error when I load up the page, nothing happens at all.

    Thread Starter bluedrag

    (@bluedrag)

    Ok so I got the header working using the bloginfo(‘template_url’) tag instead of the TEMPLATEPATH tag. Now I am trying to do the same in the footer but it doesn’t seem to be working. Not only do I loose my footer when I impliment this code but the WP admin bar disapears

    <?php
        if (is_front_page()) {
                include (bloginfo("template_url") . 'front-contentfooter.php');
        }
    
        else {
                include (bloginfo("template_url") . 'contentfooter.php');
        }
        ?>
    
        <?php
    
        <!--basic2col_contentfooter();-->
        wp_footer();
    
        ?>
    
        <?php /*Basic2Col WordPress theme by Kristin K. Wangen https://wangenweb.com/ */ ?>
    
        </body>
        </html>

    any help is appreciated

    Thread Starter bluedrag

    (@bluedrag)

    it still doesn’t seem to be working. Here is the exact code I am using, perhaps I’m using the TEMPLATE_PATH tag wrong.. Thanks for your help.

    <?php
    
        if (is_front_page()) {
           include ('TEMPLATE_PATH. ../westbury/front-contentheader.php');
        }
    
        else {
           include ('TEMPLATE_PATH. contentheader.php');
        }
    
        ?>
    Thread Starter bluedrag

    (@bluedrag)

    Thanks buddy, thats exactly what was going on. Fixed it easily after realizing this. You saved me hours of ripping my hair out ??

    Thread Starter bluedrag

    (@bluedrag)

    I found the error ??

    just for people who look at this thread later with the same problem as myself this snippet of code was stopping it from working for some reason

    <?php the_content( __(‘<p>Read the rest of this entry »</p>’, ‘arras’) ); ?>
    <!–<?php wp_link_pages(array(‘before’ => __(‘<p>Pages: ‘, ‘arras’),
    ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>

    After commenting it out, everything worked fine.

    Thread Starter bluedrag

    (@bluedrag)

    actually i had the <?php i just forgot to put it in the post, my bad. I’ve read both of those pages a few times, doesn’t seem to be working ??

    Does it matter where exactly inside the loop I put the code? should it be in between two other pieces of code?

    Thread Starter bluedrag

    (@bluedrag)

    thanks a lot, that is a good idea, I’ll probably do that. but I’m curious as to if this would be hard for me to do from scratch, I’ve been reading up on creating wordpress themes from scratch (never done this before, although I have modified themes in the past) and I think this is something I’m very capable of doing, this was the only thing I was unsure about.

    So if anyone knows about doing this from scratch I would appreciate it. I just don’t understand how you would tell the loop to place its content inside certain divs, and after that, then what? is there a way to make wordpress generate a new divs to place posts inside? Maybe I’m just over thinking all of this and there is a much simpler way of doing it.

    Thank you wordpress community ??

Viewing 8 replies - 76 through 83 (of 83 total)