Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter MrNickSheppard

    (@mrnicksheppard)

    Plugin Author orillacart

    (@orillacart)

    Hello,

    Currently it is not possible automatically.
    The only way is by adding the text manually.
    You can paste the following code to your theme functions.php file and alter the text accordingly.

    add_filter("the_content","add_my_text",9);
    function add_my_text(){
     if(is_page("shop")){
      echo "Add the text that you want to display here.";
     }
    }

    Best Regards

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    That works! Great thanks

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    Resolved…

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    Oops…just noticed I destroyed all other text! Presume put code in wrong place…any tips where I can put it safely??

    Thanks

    Plugin Author orillacart

    (@orillacart)

    Hello again,

    Try again with the modified version of the code below and let me know.

    add_filter("the_content","add_my_text",13);
    	function add_my_text($a){
    		if(is_page("shop")){
    			echo "Add the text that you want to display here.".$a;
    		}
        }

    Best Regards

    Plugin Author orillacart

    (@orillacart)

    Modified version again, sorry about that but the site on which I have tested did not have product description and I did not get the problem until now.

    add_filter("the_content","add_my_text",13);
    	function add_my_text($a){
    		static $chk = 0;
    		if($chk == 0){
    			if(is_page("shop")){
    				echo "Add the text that you want to display here.".$a;
    			}else{
    				echo $a;
    			}
    		}else{
    			$chk = 1;
    			echo $a;
    		}
        }

    Best Regards

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    Hi – that retains text…but loads of formatting went badly awry (on multiple pages). Will it make any difference where in functions.php I’m adding it?

    Also tried the second version you posted but that removed all text again.

    Thanks for your help (and the plugin, tried a few and orillacart does the job!)

    Plugin Author orillacart

    (@orillacart)

    Hello again,

    Please update to the latest version of the plugin and add your text before the [framework component=”shop”] in the page content.
    You do not need to add the modification in your functions.php anymore.
    Please let me know if all is working well.

    Best Regards

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    Fantastic – thanks for your help!

    Plugin Author orillacart

    (@orillacart)

    Hello,

    I have checked your site, and I see that you have password protected the wp-admin folder. Unfortunately that will create problem because all wp ajax calls are executed trough file there. To fix that problem, you need also to add the code below to your .htaccess file:

    <Files admin-ajax.php>
        Order allow,deny
        Allow from all
        Satisfy any
    </Files>

    Refer to the article below for more information:
    https://www.wpbeginner.com/wp-tutorials/how-to-password-protect-your-wordpress-admin-wp-admin-directory/

    Best Regards

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    OK thanks – advised to to that by service provider as WP on their servers came under major brute force attack. What sort of problem…related to processing through shop?

    Plugin Author orillacart

    (@orillacart)

    Hello,

    The wordpress file that handles all ajax requests is located in the wp-admin folder. Every ajax request on your site goes trough that file and since the whole folder is blocked the ajax request can not be executed. In the article in my last response the suggested fix for that is to allow only the access to that file while keep the folder locked.
    The problem on the shop is that authentication popup is seen when i choose state in the checkout page, that makes ajax call to update the shipping options. But if you enable the shop widget you will most certainly see the problem when adding products in the cart. If the widget is enabled the products are added trough ajax.

    Best Regards

    Thread Starter MrNickSheppard

    (@mrnicksheppard)

    That’s done the trick. Thanks again

    i want the text in shop page in top but only for shop page. Its introduction part of company also not other page such as product display page, add to cart page… can you help me ASAP

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Text in shop page?’ is closed to new replies.