Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Xaplus

    (@xaplus)

    Thank you for your quick answer!

    – There were 2 sets of like/unlike because you probably visited the site while I was testing to uninstall and reinstall the plugin to see if my modifications were the problem. But they are not the problem, it doesn’t work even if using the default plugin… I rather say, it works only sometimes but normally it doesn’t. Anyway, my changes have been :I’ve changed the picture of the thumb, relocated the plugin with “<?php GetWtiLikePost();?>” and erased the line : “add_filter(‘the_content’, ‘PutWtiLikePost’);” to avoid having the like button twice.

    – I have changed what you told me. Now my “like” class is named “coco”

    What is next? I really don’t know what else to try

    https://lemoncoco.fr/le-temps/#.UbyPcvl8Ipg

    Thread Starter Xaplus

    (@xaplus)

    Thank you! Now it’s working!

    Why if give the source it shouldn’t be a problem, right?
    What do u mean by “I can say that”?

    Thread Starter Xaplus

    (@xaplus)

    Although changing “isset” to “empty” seems to work… but the other way around of course. Is there a way to inverse the conditions then? Something like:

    <?php
    $source = get_post_meta( $post->ID, '_source_custom_meta_input_value', true );
    if ( empty($source) ) {
    ?>
    echo "Nothing";
    <?php
    } else {
    div class="source"><span class="source-photos">Source Photo(s) :</span> <?php echo $source; ?></div>
    }
    ?>
    Thread Starter Xaplus

    (@xaplus)

    I’ve just tried but I’m still having the same problem.
    It shows either way, even if there’s nothing writen
    Any other ideas?
    Thanks!

    Thread Starter Xaplus

    (@xaplus)

    I also tried “this_custom_meta_input” instead of “custom_meta_input_value”

    Thread Starter Xaplus

    (@xaplus)

    And how can I make it appear only if the input is given?
    I want to use the second option u told me (line somewhere in the template (single.php ?))
    I’ve tried this, but i may not be recalling the good key ($source) because it shows even if there is no input text :

    <?php
    		$source=custom_meta_input_value;
    		if (!empty($source)) {
    		?>
    		    <div class="source"><span class="source-photos">Source Photo(s) :</span> <?php echo get_post_meta($post->ID, '_source_custom_meta_input_value', true ); ?></div>
    		<?php
    		} else { echo "Nothing";
      		}
    		?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter Xaplus

    (@xaplus)

    Thank you!! That’s exactly what I wanted! ??

    Thread Starter Xaplus

    (@xaplus)

    Here’s the link:
    https://lemoncoco.fr/la-peau-parfaite/

    It’s the line “Source: Getty Images / Ilovedoodle”
    I would like to look like this but right know it is inside the post and it’s not the “cleanest” way to do so. Moreover, I have problems with it when trying to add new functionalities like a “like button”.

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