Simple Share Buttons Add Plugin and Custom Post Type

Here is the solution : You need to hook an action to remove ssba button. Wp action runs pretty early and allow you to remove the ssba filter on the content which add the buttons list. function remove_share_buttons_custom_post() { if (in_array(get_post_type(),array(‘sar’))) { remove_filter( ‘the_content’, ‘show_share_buttons’); } } add_action(‘wp’, ‘remove_share_buttons_custom_post’);

PHP Button Custom link [closed]

I’m not sure what byt_render_link_button() does, but I try this. <?php byt_render_field(“description clearfix”, “”, “”, $accommodation_description_html, ”, false, true); if (!empty($current_url) && $current_url == $list_user_accommodations_url) { byt_render_link_button($submit_accommodations_url . ‘?fesid=’ . $accommodation_id, “gradient-button clearfix”, “”, __(‘Edit’, ‘bookyourtravel’)); } else { byt_render_link_button( ‘http://www.mywebsite.com’, “gradient-button clearfix”, “”, __(‘Book now’, ‘bookyourtravel’) ); }

Show my custom post id if a country or ip

I believe you can do something like this (not tested): if($_SERVER[‘REMOTE_ADDR’]==”89.0.0.0″ && $post->ID==15){ $post5 = get_post(‘5′); echo $post5->post_title; //Call custom meta using $post5->ID; } Update: If you’d like to replace the original object you can do the following: if($_SERVER[‘REMOTE_ADDR’]==”89.0.0.0″ && $post->ID==15){ global $post; $post = get_post(‘5’); setup_postdata($post); //Here you can call for the_content() or the_title … Read more

ACF Field to set Publish Date – Post Duplication upon Update

Drew, one thing about your code above is that the word dateAllergy should be in quotation marks like. I’m not sure of that is the problem but it’s worth changing. $datefield = get_post_meta($post_id, ‘dateAllergy’ ,true); Also, I just noticed that your $post_id variable will be empty too. You should change that to $post->ID. That would … Read more

How to show all posts of specific custom post type with their custom fields values?

The meta information is in a different db table from my understanding. What you’ll need to do is loop through each post and grab it’s meta data using get_fields(). Below is a sample from the query to find all the fields for a particular post. $rows = $wpdb->get_results($wpdb->prepare( “SELECT option_name, option_value FROM $wpdb->options WHERE option_name … Read more