Aakif Kadiwala
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WP-admin(custom link)Hi
Yes, it’s Possible.Please use this plugin – HC Custom WP-Admin URL
it’s a very simple plugin.Thanks.
Forum: Developing with WordPress
In reply to: My own shortcode show only for logged in user not publicHi
if(is_user_logged_in()){ return $string; }else{ return ''; }
Please try this code.
- This reply was modified 7 years, 3 months ago by Aakif Kadiwala.
Forum: Developing with WordPress
In reply to: wp_query and a key with mathematical operationsHi,
orderby => $fee
This is wrong.We can’t do order by like this.
We can orderby only on that values which is saved in the Database.1st way
Fetch the data in the simple way, and store in the Array.
And we can change the the order as per our requirements.2nd way
add_action( 'transition_post_status', 'wp_status_publish', 10, 3 ); function wp_status_publish( $new_status, $old_status, $post ) { if ( $new_status == 'publish' && $old_status == 'auto-draft' ) { $id = $post->ID; $type = get_post_type( $id ); $meta_check = get_post_meta($id, 'commission_added', true); if( $type == 'ficha_vehiculo' && $meta_check != "yes"){ $price = get_field('price'); // Your Calculations $temp = ((discount/100)*$price); $discount = $price-$temp; $commission=1.33/100; $fee = (($discount*$commission)+$discount)/120; update_post_meta( $id, 'commission_added', 'yes', true ); add_post_meta( $id, ''commission', $commission, true ); } update_post_meta( $id, 'commission_added', 'yes', true ); } }
Above code is executed when we published the New Post from Auto-Draft.
And also above code is add the meta of Calculated Commission in current Post.
For this we use “transition_post_status” Hook.With this you can get all the details related to post using Post ID.
- Fetch the Price
- Calculate the commission on it
- Add the meta of that commission in the current Post ID.
add_post_meta( $post_id, $meta_key, $meta_value, true );
Now, You can fetch the data with OrderBy on Commission(Meta,which is added in above steps).
2nd way is better
And Sorry for late reply.
- This reply was modified 7 years, 4 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 4 months ago by Aakif Kadiwala.
Forum: Fixing WordPress
In reply to: Posting pictures to Instagram and FacebookHi,
For 2nd Question
Yes, it is possible.WordPress have Plugins for Facebook Feed & also Instagram Feed.
Forum: Developing with WordPress
In reply to: wp_query and a key with mathematical operationsHi,
create a new variable for store numeric operation.
for example,
$temp = ((discount/100)*price); $key = 'price-'.$temp;
Then you can assign $key varible in key of Meta Query.
Full Solution :
————————$temp = ((discount/100)*price); $key = 'price-'.$temp; 'meta_query' => array( array( 'key' => $key, 'value' => array($precio_min, $precio_max), 'compare' => 'BETWEEN', 'type' => 'NUMERIC' ) );
[Moderator Note: Code fixed. To ensure your code is usable by others, always enclose your code in
`backticks`
, or use the ‘code’ button.]- This reply was modified 7 years, 4 months ago by James Huff.
- This reply was modified 7 years, 4 months ago by bcworkz.
Forum: Fixing WordPress
In reply to: When i post something in a category it gets posted in the home pageHi,
have you created a new pages ?
and can i know in your Website Setting Home-Page is Selected ?Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Captcha Image is not displayed.Hi,
Design issue is also solved.
Now, i want to add this captcha in Contact form 7. but i can’tPlease Give me Any Suggetions.
Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Captcha Image is not displayed.Thanks Mike.
I think am doesn’t explain the problem properly…?
in-short I want to change the position of captcha image and text box.
and i want to add label “verification”.i hope now you understand…
Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Captcha Image is not displayed.Thanks Mr.Mike for share your code.
This is my comment Form
Image verification : Label
Captcha Image
Captcha Textbut i want this
Image verification : Label Captcha Image
Captcha TextSo i don’t want to change any file of the plugin.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.
Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Captcha Image is not displayed.Hello,
Error 500 – Internal Server Error
I got it the problem. It’s a server issue.
Means i checked in another server then it’s running perfectly.And i want to know about hooks of this plugin, Because i want to change the layout from theme page.
Please give me suggestions as soon as possible.
- This reply was modified 7 years, 11 months ago by Aakif Kadiwala.