Move price below short description in Woocommerce single products [closed] Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!WooCommerce - Replace Price with Variable Price on Single Product PageRemove Woocommerce Product Short Descriptionwoocommerce product excerpt description (short)limit woocommerce product short description in home page and category pageAdd content above the product short description on the product page in WooCommerceMove woocommerce category description below productsWoocommerce: Display Product Variation Description on shop catalog pageMove Add To Cart button and Variation Selector above product short description in WoocommerceSingle product category description using shortcodes in Woocommercewoocommerce variable product price not showing in shop page

What does Turing mean by this statement?

Caught masturbating at work

How were pictures turned from film to a big picture in a picture frame before digital scanning?

Tips to organize LaTeX presentations for a semester

Flight departed from the gate 5 min before scheduled departure time. Refund options

what is the log of the PDF for a Normal Distribution?

What does it mean that physics no longer uses mechanical models to describe phenomena?

Why are vacuum tubes still used in amateur radios?

I can't produce songs

What does the writing on Poe's helmet say?

Sally's older brother

Can an iPhone 7 be made to function as a NFC Tag?

Resize vertical bars (absolute-value symbols)

Co-worker has annoying ringtone

Does silver oxide react with hydrogen sulfide?

Why is std::move not [[nodiscard]] in C++20?

Monty Hall Problem-Probability Paradox

i2c bus hangs in master RPi access to MSP430G uC ~1 in 1000 accesses

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

malloc in main() or malloc in another function: allocating memory for a struct and its members

Is there public access to the Meteor Crater in Arizona?

Moving a wrapfig vertically to encroach partially on a subsection title

Delete free apps from library

AppleTVs create a chatty alternate WiFi network



Move price below short description in Woocommerce single products [closed]



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!WooCommerce - Replace Price with Variable Price on Single Product PageRemove Woocommerce Product Short Descriptionwoocommerce product excerpt description (short)limit woocommerce product short description in home page and category pageAdd content above the product short description on the product page in WooCommerceMove woocommerce category description below productsWoocommerce: Display Product Variation Description on shop catalog pageMove Add To Cart button and Variation Selector above product short description in WoocommerceSingle product category description using shortcodes in Woocommercewoocommerce variable product price not showing in shop page



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am using Woocommerce for a small online shop and using Movedo Wordpress theme by greatives.



I am trying to move the product price below short description in single product pages. I inserted the code in functions.php file of my child theme:



remove_action('woocommerce_single_product_summary', 
'woocommerce_template_single_price', 4 );
add_action('woocommerce_single_product_summary',
'woocommerce_template_single_price', 29 );


But it ends up displaying the price twice: single product page.



What I am doing wrong? Any help is appreciated.










share|improve this question















closed as too broad by ochi, thewaywewere, DebanjanB, greg-449, Billal Begueradj Mar 9 at 19:06


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

    – LoicTheAztec
    Mar 16 at 0:15

















1















I am using Woocommerce for a small online shop and using Movedo Wordpress theme by greatives.



I am trying to move the product price below short description in single product pages. I inserted the code in functions.php file of my child theme:



remove_action('woocommerce_single_product_summary', 
'woocommerce_template_single_price', 4 );
add_action('woocommerce_single_product_summary',
'woocommerce_template_single_price', 29 );


But it ends up displaying the price twice: single product page.



What I am doing wrong? Any help is appreciated.










share|improve this question















closed as too broad by ochi, thewaywewere, DebanjanB, greg-449, Billal Begueradj Mar 9 at 19:06


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

    – LoicTheAztec
    Mar 16 at 0:15













1












1








1


2






I am using Woocommerce for a small online shop and using Movedo Wordpress theme by greatives.



I am trying to move the product price below short description in single product pages. I inserted the code in functions.php file of my child theme:



remove_action('woocommerce_single_product_summary', 
'woocommerce_template_single_price', 4 );
add_action('woocommerce_single_product_summary',
'woocommerce_template_single_price', 29 );


But it ends up displaying the price twice: single product page.



What I am doing wrong? Any help is appreciated.










share|improve this question
















I am using Woocommerce for a small online shop and using Movedo Wordpress theme by greatives.



I am trying to move the product price below short description in single product pages. I inserted the code in functions.php file of my child theme:



remove_action('woocommerce_single_product_summary', 
'woocommerce_template_single_price', 4 );
add_action('woocommerce_single_product_summary',
'woocommerce_template_single_price', 29 );


But it ends up displaying the price twice: single product page.



What I am doing wrong? Any help is appreciated.







php wordpress woocommerce product hook-woocommerce






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 10 at 20:20









LoicTheAztec

98.4k1472114




98.4k1472114










asked Mar 8 at 23:24









Sayed totomobilSayed totomobil

114




114




closed as too broad by ochi, thewaywewere, DebanjanB, greg-449, Billal Begueradj Mar 9 at 19:06


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by ochi, thewaywewere, DebanjanB, greg-449, Billal Begueradj Mar 9 at 19:06


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

    – LoicTheAztec
    Mar 16 at 0:15

















  • To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

    – LoicTheAztec
    Mar 16 at 0:15
















To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

– LoicTheAztec
Mar 16 at 0:15





To review and moderators: This question is not too broad, and the question provide some code. My answer took me 1mn… Please consider reopening the thread.

– LoicTheAztec
Mar 16 at 0:15












1 Answer
1






active

oldest

votes


















1














You are not targeting the right hook priority when using remove_action()… Try this instead:



add_action('woocommerce_single_product_summary', 'move_single_product_price', 1);
function move_single_product_price()
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29);



It should only display one price only in the new desired location.



Code goes in function.php file of your active child theme (or active theme).






share|improve this answer

























  • Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

    – Sayed totomobil
    Mar 9 at 9:12












  • As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

    – Sayed totomobil
    Mar 9 at 9:14











  • Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

    – Sayed totomobil
    Mar 9 at 9:14











  • I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

    – Sayed totomobil
    Mar 9 at 10:23











  • I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

    – Sayed totomobil
    Mar 9 at 12:45

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You are not targeting the right hook priority when using remove_action()… Try this instead:



add_action('woocommerce_single_product_summary', 'move_single_product_price', 1);
function move_single_product_price()
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29);



It should only display one price only in the new desired location.



Code goes in function.php file of your active child theme (or active theme).






share|improve this answer

























  • Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

    – Sayed totomobil
    Mar 9 at 9:12












  • As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

    – Sayed totomobil
    Mar 9 at 9:14











  • Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

    – Sayed totomobil
    Mar 9 at 9:14











  • I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

    – Sayed totomobil
    Mar 9 at 10:23











  • I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

    – Sayed totomobil
    Mar 9 at 12:45















1














You are not targeting the right hook priority when using remove_action()… Try this instead:



add_action('woocommerce_single_product_summary', 'move_single_product_price', 1);
function move_single_product_price()
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29);



It should only display one price only in the new desired location.



Code goes in function.php file of your active child theme (or active theme).






share|improve this answer

























  • Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

    – Sayed totomobil
    Mar 9 at 9:12












  • As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

    – Sayed totomobil
    Mar 9 at 9:14











  • Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

    – Sayed totomobil
    Mar 9 at 9:14











  • I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

    – Sayed totomobil
    Mar 9 at 10:23











  • I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

    – Sayed totomobil
    Mar 9 at 12:45













1












1








1







You are not targeting the right hook priority when using remove_action()… Try this instead:



add_action('woocommerce_single_product_summary', 'move_single_product_price', 1);
function move_single_product_price()
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29);



It should only display one price only in the new desired location.



Code goes in function.php file of your active child theme (or active theme).






share|improve this answer















You are not targeting the right hook priority when using remove_action()… Try this instead:



add_action('woocommerce_single_product_summary', 'move_single_product_price', 1);
function move_single_product_price()
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 29);



It should only display one price only in the new desired location.



Code goes in function.php file of your active child theme (or active theme).







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 9 at 10:57

























answered Mar 9 at 8:35









LoicTheAztecLoicTheAztec

98.4k1472114




98.4k1472114












  • Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

    – Sayed totomobil
    Mar 9 at 9:12












  • As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

    – Sayed totomobil
    Mar 9 at 9:14











  • Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

    – Sayed totomobil
    Mar 9 at 9:14











  • I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

    – Sayed totomobil
    Mar 9 at 10:23











  • I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

    – Sayed totomobil
    Mar 9 at 12:45

















  • Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

    – Sayed totomobil
    Mar 9 at 9:12












  • As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

    – Sayed totomobil
    Mar 9 at 9:14











  • Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

    – Sayed totomobil
    Mar 9 at 9:14











  • I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

    – Sayed totomobil
    Mar 9 at 10:23











  • I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

    – Sayed totomobil
    Mar 9 at 12:45
















Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

– Sayed totomobil
Mar 9 at 9:12






Hi @LoicTheAztec Thank you for your reply. I replaced my code by yours. alas it does not change anything. I appreciate your intention to help me.

– Sayed totomobil
Mar 9 at 9:12














As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

– Sayed totomobil
Mar 9 at 9:14





As I have the same value for (..hooked woocommerce_template_single_rating - 10) (..hooked woocommerce_template_single_price - 10) I wondered if it create a conflict single_rating/single_price. But No.

– Sayed totomobil
Mar 9 at 9:14













Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

– Sayed totomobil
Mar 9 at 9:14





Can it come from a modification in the parent theme by the theme editor? Or can an entry in the database not reset?

– Sayed totomobil
Mar 9 at 9:14













I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

– Sayed totomobil
Mar 9 at 10:23





I added the code above. it does not work. I always have twice the price, one up and the other down. Thank you @LoicTheAztec for your time.

– Sayed totomobil
Mar 9 at 10:23













I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

– Sayed totomobil
Mar 9 at 12:45





I confirm: the text appears on the pages of my site. I misunderstood. I thinked this text will replace the price.. The text du test : appears

– Sayed totomobil
Mar 9 at 12:45





Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved