Can I override the values loaded by add_theme_support in function.php?
Problem: I’m setting up a site based on the Twenty Seventeen theme and that theme includes in its function.php file a section to set the size of the custom-logo: //code
Problem: I’m setting up a site based on the Twenty Seventeen theme and that theme includes in its function.php file a section to set the size of the custom-logo: //code
Get post content by usingpost id in wordpres function custom_content($post){ $my_postid = 6;//This is page id or post id $content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters(‘the_content’, $content); $content
Create a short code in wordpress function my_shortcode() { //buffering //Object Start ob_start(); date_default_timezone_set(‘asia/kolkata’); //echo date(‘H:i:s’); echo ‘<div id=”mytime”></div>’; // object get contents $output_string = ob_get_contents(); // clean object ob_end_clean();
Display specific data from custom database table in WordPress <table border=”2″> <tr> <th>ID</th> <th>Firstname</th> <th>Lastname</th> <th>Email</th> <th>Phone</th> <th>Message</th> </tr> <?php global $wpdb; $table_name = $wpdb->prefix . “my_plugintable”; $result = $wpdb->get_results
Delete data from database table in wordpress <?php if(isset($_POST[“del”])){ global $wpdb; $table_name = $wpdb->prefix . “my_plugintable”; $idval = $_POST[“idval”]; $wpdb->query( $wpdb->prepare( “DELETE FROM $table_name WHERE ID = %d”, $idval)); }
update form data inserted in database in wordpress if(isset($_POST[‘contactformupdate’])) { $id = $_REQUEST[‘id’]; extract($_POST); global $wpdb; $table_name = $wpdb->prefix . “my_plugintable”; if(($wpdb->update($table_name, array(‘firstname’=>$firstname, ‘lastname’=>$lastname, ’email’=>$email, ‘phone’=>$phone, ‘message’=>$message), array(‘ID’=>$id)))){ $msg =
Dharmanagar, Tripura, India.