Forum Replies Created

Viewing 15 replies - 16 through 30 (of 83 total)
  • Thread Starter bluedrag

    (@bluedrag)

    I actually have two separate category templates for each category, so so the code you see above will only effect the category I am trying tosort alphabetically. Sorry I should have mentioned that above.

    Thread Starter bluedrag

    (@bluedrag)

    I’m afraid you’re overestimating my programming abilities. Should my code above be working? Am I close or far off?

    Thank you for responding to my post.

    Thread Starter bluedrag

    (@bluedrag)

    I don’t really understand how I would do this. I have two post categories. One I need to display by date (newest to oldest) and the other alphabetically.

    Thread Starter bluedrag

    (@bluedrag)

    I’ve used the same plugin to put PHP into widgets for years without any issue, and I actually have a seperate widget with PHP tags that is not getting this error.

    Thread Starter bluedrag

    (@bluedrag)

    Hi, sorry for the delayed response here. I will check to see if *.wordpress.com is whitelisted, I will let you know though, out of 6 WordPress websites all hosted on the same server, this is the only website Jetpack is timing out on.

    Since I posted this I have set up a redirect from the http site to the https site.

    • This reply was modified 6 years, 11 months ago by bluedrag.
    Thread Starter bluedrag

    (@bluedrag)

    I fixed the issue! Frirstly I noticed the $lang concatenation is redundant, so I removed it, and then I added another echo at the end of the link to make sure #wheretobuy is after the language code:

    
    <!--:en-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/'); ?>">Home</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/'); ?>">Features</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold#wheretobuy'); ?>">Where to Buy</a></li>
    </ul>
    <!--:-->
    <!--:fr-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/'); ?>">Acceuil</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/'); ?>">Charactéristiques</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold'); echo '#wheretobuy'; ?>">Ou Acheter</a></li>
    </ul>
    <!--:-->
    
    Thread Starter bluedrag

    (@bluedrag)

    Hi,

    Yes I am able to upload these images through the media manager. The problem is that, since I am migrating this from a different server all the images are already set up with links. If I re upload them I will have to change all the URLs. If I am able to upload them via FTP the old URLs i have already set up will work.

    Thread Starter bluedrag

    (@bluedrag)

    Oh my god. That’s so frustrating… haha.

    Thread Starter bluedrag

    (@bluedrag)

    Woah this worked! Thanks so much. You’ve been an amazing help. Would you mine explaining a little bit of what you did to fix it? I’ve been trying to work on my programming, I know some basic stuff but it’s definitely my weakest skill right now (work as a web designer, very comfortable with HTML/CSS and Photoshop)

    Thinking about it, it makes sense for the if statement checking the language to be inside the loop since the post ID will be different for each product.

    What did you change at the very end aside from organizing things better?

    Also – Aside I took a look at your portfolio earlier. Looks great!

    Again, thanks for the help.

    • This reply was modified 7 years, 4 months ago by bluedrag.
    • This reply was modified 7 years, 4 months ago by bluedrag.
    Thread Starter bluedrag

    (@bluedrag)

    Hey Konstantinos,

    Thanks for the detailed responses! Both seem to be working for me. The first shows ‘en’ for english and the second ‘fr’ for French. These are the correct language codes.

    The second bit of code shows the post ID number.

    Any idea what could be wrong with my meta?

    Thread Starter bluedrag

    (@bluedrag)

    Hi Xenos,

    I did not have this before my query! I have added it to the top of the page. Is this correct? After adding this certain template tags I was testing worked properly, like calling the custom field keys. The custom field keys byline_en and byline_fr still do not appear on my post page though. Also you were correct the qtrans_getLanguage() is incorrect. This is from the original qTranslate. I have changed this to what my fork of this plugin uses which is qtranxf_getLanguage()

    Here is my updated code:

    <?php get_header(); ?>
    
    <?php global $post; ?>
    
    <main id="content">
    
    			<h1 class="product_gallery_header"><?php single_cat_title( __( '', true ) ); ?></h1>
    			
    			<div id="product_gallery" role="main">
    			
     			 <?php 	//This checks what language qTranslate has selected and returns the appropriate ShortDesc
    					if (qtranxf_getLanguage() =="en") {
    					   $key = "byline_en";
    					   $description = get_post_meta($post->ID, $key, true);
    					}
    					if (qtranxf_getLanguage() =="fr") { 
    					   $key = "byline_fr";
    					   $description = get_post_meta($post->ID, $key, true);
    					}
    				?>		
    			
    			
    			
    			
    			<?php while ( have_posts() ) : the_post(); ?>
     			
    			<div class="product_thumbnail">
    			<a href="<?php the_permalink() ?>">
    			<?php //the_post_thumbnail grabs the post's "featured image" this feature has added theme support in the child theme functions.php ?>
    			<?php the_post_thumbnail('thumbnail', array('class' => 'thumbnail')); ?>
    			</a>
    			
    			<?php //This piece of code figures out the corrosponding post_title of the featured image ?>
    			<h1 class="post_caption"><?php the_title(); ?></h1>
    			<p><?php echo $description; ?></p>
    			</div> <!-- product_thumbnail -->
    		 
    
    			<?php endwhile; // end of the loop. ?>
    			
    			<div class="clear"></div>
    
    </div><!--#product_gallery-->
    
    </main>
    
    <?php get_footer(); ?>
    Thread Starter bluedrag

    (@bluedrag)

    I found the answer to this. You can

    in the admin section go to settings > languages

    Under the general tab there is an “untranslated content” section.

    In this section make sure “Show displayed language prefix when content is not available for the selected language.” is unchecked.

    Thread Starter bluedrag

    (@bluedrag)

    Thanks! I’ll try this out.

    Thread Starter bluedrag

    (@bluedrag)

    So how to you export a database then? through PHPMyAdmin?

    Thread Starter bluedrag

    (@bluedrag)

    I’m sorry I’m not entirely sure what is different with the steps you listed and the things I listed, aside from the format of the exported content file.

    Could you elaborate on what step I missed?

Viewing 15 replies - 16 through 30 (of 83 total)