iqbal1486
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Do I need to go each page for a Change Form?Hi Satnamk,
In WordPress, you can put put your zoho CRM code in header.php (which is is your theme).
This file is a art of every WordPress page.
So put once in header.php and it will be every where.The other option is to create shortcode and put shortcode everywhere.
So in future, if you would like to change the HTML of the form, you just need to change in function file where you have created a shortcode and it will take effect everywhere.Hope this will help to some level
Thanks
@semperaye
The code i have provided is to add the class to specific template.
You can useis_page
function or any other functions of wp through which you get the id of that particular page. Use that condition instead of theis_page_tempalte
and you are done.Please go through the code throughly
Thanks
Forum: Developing with WordPress
In reply to: Add a custom column in users list page/*this will add column in user list table*/ function add_column( $column ) { $column['text_checkbox'] = 'Check Box'; return $column; } add_filter( 'manage_users_columns', 'add_column' ); /*this will add column value in user list table*/ function add_column_value( $val, $column_name, $user_id ) { switch($column_name) { case 'text_checkbox' : return get_user_meta($user_id, $key, $single); ; break; default: } } add_filter( 'manage_users_custom_column', 'add_column_value', 10, 3 );
This is what you required, right?
Hope this will be the solution.
ThanksForum: Developing with WordPress
In reply to: ajax response with json not workingWill you please give a try to php code like this
add_action("wp_ajax_show_comment", "mu_show_comment"); function mu_show_comment() { $message = isset($_POST['x']) ? $_POST['x'] : 'no message found'; $info = array( "content" => "apple" ); echo json_encode($info); exit; }
i think you were wrong here:
$info = array( "content" => "apple" );
Please give a try
Thanks
Forum: Developing with WordPress
In reply to: the_excerpt() not workingjust use
echo get_the_excerpt()
instead ofthe_excerpt()
.
Hope it will solve the issueForum: Developing with WordPress
In reply to: Hook for plugin install?Hi wputler,
We have unistall.php file in plugin that is executed at last while uninstalling the plugin.you can code as per your requirement in uninstall.php file located at root of the plugin.
For example: Deleting Table from Database related to Plugin while uninstalling it.
Hi Semperaye,
As per my knowledge there is no such plugin.
Default wordpress has body class that is attached to the class attribute of body tag.
you can use below filter to add class to the body tag.add_filter( 'body_class', 'custom_class' ); function custom_class( $classes ) { if ( is_page_template( 'page-example.php' ) ) {//you can use page id by getting from get_the_id() $classes = array(); //empty array or you can reuse this $classes[] = 'nolinks'; } return $classes; }
You can create your own plugin by adding this code in a file having plugin default code.
i.e. creating you custom plugin code ??- This reply was modified 7 years, 9 months ago by iqbal1486.
Forum: Fixing WordPress
In reply to: WordPress Front End DatabaseHi Joeyfogas,
You can perform crud operation with the database
See below php code.
https://www.codingcage.com/2014/12/simple-php-crud-operations-with-mysql.htmlYou can implement for logged in user.
ThanksForum: Fixing WordPress
In reply to: Installation failed 500 Internal server errorHi Nitasha,
In header.php , do you have any custom code like
<!–[if lte IE 6]>Some files included<![endif]–>
?
If yes, then will you please remove for while and install your plugin again.Thanks
Ok. I will look after it and let you know.
BTW Thank you so much. ??Forum: Plugins
In reply to: [WooCommerce] Split the order email by category.ohk @mike.. Will look after this.
Thank youForum: Plugins
In reply to: [WooCommerce] Need to fetch category name from product id?Thank you.
but i need at that stage so.
I have tried with query and finally got it.function get_terms_by_post_type( $taxonomies, $post_types, $pId ) { global $wpdb; $query = $wpdb->prepare( "SELECT t.*, COUNT(*) from $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN $wpdb->term_relationships AS r ON r.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN $wpdb->posts AS p ON p.ID = r.object_id WHERE p.post_type IN('%s') AND tt.taxonomy IN('%s') AND p.ID = $pId GROUP BY t.term_id", join( "', '", $post_types ), join( "', '", $taxonomies ) ); $results = $wpdb->get_results( $query ); return $results; } function get_description_by_term_id( $termid ) { global $wpdb; $query = "SELECT t.* from $wpdb->term_taxonomy AS t WHERE t.term_id = $termid GROUP BY t.term_id"; $results = $wpdb->get_results( $query ); return $results; } $terms = get_terms_by_post_type( array('product_cat'), array('product'), $product_id ); $termDescription = get_description_by_term_id($terms['0']->term_id);
Is there any other way?
Then plz mention.
Again thank you for your kind response.Forum: Plugins
In reply to: [WooCommerce] Need to fetch category name from product id?Thanking you for your response.
But..
I have used th function this way.$result = get_the_term_list( 88, 'product_cat', 'People: ', ', ' ); echo "<pre>"; print_r($result); echo "</pre>";
Here , 88 is a product id and ‘product_cat’ is a taxonomy for product post type.
I have already fetch the product id from order table using order id.
When i use above code in function file and run website, it trigger me an error.
i.e. Invalid taxonomy.WP_Error Object ( [errors] => Array ( [invalid_taxonomy] => Array ( [0] => Invalid taxonomy ) ) [error_data] => Array ( ) )
Forum: Plugins
In reply to: [Theme My Login] Error message issue?but it should show the error message that username and password are empty, on submit.
its not showing error when username and password are blank and hit submit.
how this is related to design?
if it is related to design, then it does not show the other error messages even.Forum: Themes and Templates
In reply to: [Contango] How to make a child theme for this Theme?Thank you .. for your response.
We have solved it. Its a issue with header file.