Imran ul Haque Ansari
Forum Replies Created
-
This code is working for me.
<div class="featuredImg"> <span class="pibfi_pinterest"> <?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?> <span class="xc_pin" onclick="pin_this(event, 'https://pinterest.com/pin/create/button/?url=<? the_permalink(); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title();?>')"> </span> </span></div>
i am also looking for featured image.
There is no way to remove this option from backend,but i have do this by manually in the code.
1)go to the plugin folder edit the dgx-donate.php file.
2)findfunction dgx_donate_get_donor_section
at line no 593 you will see
$output .= "<p><input type=\"checkbox\" name=\"_dgx_donate_add_to_mailing_list\" $checkAddMailingList /> Add me to your mailing list</p>\n";
just comment this line.This is the temporary solution,when the plugin update this setting will lose.
Forum: Plugins
In reply to: [Seamless Donations is Sunset] No Widgets, No Short CodeUse this shortcode
[dgx-donate]
in page or post.you can also use
echo do_shortcode("[dgx-donate]");
in your theme fileForum: Fixing WordPress
In reply to: create custom content typeForum: Fixing WordPress
In reply to: dropdownForum: Fixing WordPress
In reply to: dropdownPlease share the url of your website
Forum: Fixing WordPress
In reply to: create custom content typeYou can create categories of state and cities,or
you can also create the post meta.
this post meta will two drop down first for state and second for cities.
see here how to create the Meta Box
https://www.deluxeblogtips.com/2010/04/how-to-create-meta-box-wordpress-post.htm
Forum: Fixing WordPress
In reply to: create custom content typeUse this code
function hotel() { $labels = array( 'name' => _x( 'Hotel', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Hotel', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Hotel', 'text_domain' ), 'parent_item_colon' => __( 'Parent Hotel:', 'text_domain' ), 'all_items' => __( 'All Hotel', 'text_domain' ), 'view_item' => __( 'View Hotel', 'text_domain' ), 'add_new_item' => __( 'Add New Hotel', 'text_domain' ), 'add_new' => __( 'New Hotel', 'text_domain' ), 'edit_item' => __( 'Edit Hotel', 'text_domain' ), 'update_item' => __( 'Update Hotel', 'text_domain' ), 'search_items' => __( 'Search hotel', 'text_domain' ), 'not_found' => __( 'No hotel found', 'text_domain' ), 'not_found_in_trash' => __( 'No hotel found in Trash', 'text_domain' ), ); $rewrite = array( 'slug' => 'hotel', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Hotel', 'text_domain' ), 'description' => __( 'Hotel information pages', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'menu_icon' => '', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'Hotel', $args ); } // Hook into the 'init' action add_action( 'init', 'hotel', 0 );
Forum: Fixing WordPress
In reply to: A special menu for logged in users – how?Use this plugin
https://www.ads-software.com/plugins/theme-my-login/Forum: Fixing WordPress
In reply to: User counter on my siteYou Are Welcome ??
Forum: Fixing WordPress
In reply to: User counter on my siteTry this code
<?php $wpcode_user_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users;"); $total = "1000"; $remain = $total-$wpcode_user_count; $now = $total-$remain; ?> We Are <?php printf("%04d", $now); ?> Users
Forum: Fixing WordPress
In reply to: Get posts content to the frontpageYou can use this code:
<?php echo get_post_field('post_content', 63); ?>
Forum: Fixing WordPress
In reply to: User counter on my siteYou can use this
We Are <?php echo '00' . $wpcode_user_count ; ?> Users
May be it work for you.
Forum: Plugins
In reply to: [Theme My Login] [Plugin: Theme My Login] adding new fields?I have added the phone number field in my registration form.
i just copy theme-my-login\templates\register-form.php file in my theme folder and added this code below the email field<p> <label for="user_phone<?php $template->the_instance(); ?>"><?php _e('Phone'); ?></label> <input type="text" name="user_phone" id="user_phone<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value('user_phone'); ?>" size="20" /> </p>
and add this code in my function.php
function tml_edit_user_profile( $profileuser ) { ?> <p> <label for="user_phone">Phone Number</label> <input id="user_phone" type="text" name="user_phone" value="<?php echo $profileuser->user_phone; ?>" /> </p> <?php } add_action( 'edit_user_profile', 'tml_edit_user_profile' ); function tml_user_register( $user_id ) { if ( !empty( $_POST['user_phone'] ) ) update_user_meta( $user_id, 'user_phone', $_POST['user_phone'] ); } add_action( 'user_register', 'tml_user_register' );
This code is working on my site.
and thanks Jeff for such a good plugin,it is easy to customize.