How to show Conditional Statement In CMB2 for input text?

this will be like this <?php $project_counter = get_post_meta(get_the_ID(), ‘projects’, true); ?> <?php if(!empty($project_counter)) {?> <?php echo $project_counter; ?> <?php } else {echo __(“<h2> Input value from theme option panel </h2>”, “casanova”); } ?>

How to show a message to a user?

You could use javascript if you wanted. So wherever the button click is checked, you could add something like this: <?php $message = “Your comment has been submitted”; echo “<script type=”text/javascript”>alert(‘$message’);</script>”; ?> That is if it is supposed to happen when they click the button – I might be misinterpreting the question.

Facebook Quote Plugin for Blockquote?

Kept on searching and found that I can just add a url parameter for the quote (source): URL (of course) → u custom image → picture custom title → title custom quote → quote custom description → description Example: https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fstackoverflow.com%2Fq%2F20956229%2F1101509&picture=http%3A%2F%2Fwww.applezein.net%2Fwordpress%2Fwp-content%2Fuploads%2F2015%2F03%2Ffacebook-logo.jpg&title=A+nice+question+about+Facebook&quote=Does+anyone+know+if+there+have+been+recent+changes+which+could+have+suddenly+stopped+this+from+working%3F&description=Apparently%2C+the+accepted+answer+is+not+correct.

Different Urls for mobile and desktop homepages

I don’t think you can accomplish this using WordPress alone since there is no way (that I know) for WordPress (or PHP for that matter) to detect if it’s desktop or mobile. I’d imagine you could use some simple Javascript however to detect if you’re on mobile and then use window.location to redirect to your … Read more

How to delete posts older than one year with post meta, post attachments and files?

I find-out an way, when working on a cron related project. 1. Install and active [WP Crontol plugin][1] 2. Go to Tools->Cron Events. 3. Create new cron job at `Add PHP Cron Event tab. Here, I use PHP code global $wpdb; $posts_table = $wpdb->prefix . ‘posts’; $term_relationships_table = $wpdb->prefix . ‘term_relationships’; $postmeta_table = $wpdb->prefix . … Read more