Xaplus
Forum Replies Created
-
Forum: Plugins
In reply to: [WTI Like Post] Counter updateThank 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
Forum: Fixing WordPress
In reply to: Independent line of code in the postsThank 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”?Forum: Fixing WordPress
In reply to: Independent line of code in the postsAlthough 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> } ?>
Forum: Fixing WordPress
In reply to: Independent line of code in the postsI’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!Forum: Fixing WordPress
In reply to: Independent line of code in the postsI also tried “this_custom_meta_input” instead of “custom_meta_input_value”
Forum: Fixing WordPress
In reply to: Independent line of code in the postsAnd 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.]
Forum: Fixing WordPress
In reply to: Independent line of code in the postsThank you!! That’s exactly what I wanted! ??
Forum: Fixing WordPress
In reply to: Independent line of code in the postsHere’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”.