labyrinthman
Forum Replies Created
-
Hello @codersantosh and thanks for your response.
How can I make update to the content via REST without losing the style?
When I update the content->rendered I lose all the styles.
Here’s the link to image so you can see what I’m talking about https://imgur.com/a/l8qZtMzForum: Developing with WordPress
In reply to: Guzzle post requestThanks @otto42 and @threadi
I realize where I made an error. I was putting authentication in wrong place, I was putting it while I was instantiating Client and not where I’m making a request.
Here is the code if somebody ever comes to the similar problem.$client = new Client([ // Base URI is used with relative requests 'base_uri' => 'https://website.com' ]); $response = $client->request('POST', "/wp-json/wp/v2/posts", [ 'json' => [ 'acf' =>[ 'acf_field_1' => 'value_1', 'acf_field_2'=> 'value_2' ] ], "headers" => [ "Authorization" => "Basic ".base64_encode($username.":".$application_password) ] ]);
Forum: Developing with WordPress
In reply to: Guzzle post request@threadi yes I did.
As I previously mentioned, I can do the POST request by using Postman but I can’t do it in my code. I have put my username and password in code but I don’t want to put it here on a public forum where anyone can see it.
I assure you that I did that.
Forum: Developing with WordPress
In reply to: Guzzle post requestHello @otto42 ,
I’m using Application Password method. When I use Postman I can make a POST request, but when I use Guzzle itself then I get an error.
I have found a way, I have solved it like this:
.fas.fa-chevron-circle-left{ color: transparent !important; width: 81px; height: 183px; background: url( https://celestyal.com/wp-content/themes/ftheme/src/images/Elements_ButtonLeft.svg ); background-repeat: repeat; background-repeat: no-repeat; left: -53%; position: relative; top: -79%; } .fas.fa-chevron-circle-right{ color: transparent !important; width: 137px; height: 89px; background: url( https://celestyal.com/wp-content/themes/ftheme/src/images/Elements_ButtonRight.svg ); background-repeat: repeat; background-repeat: no-repeat; left: -81%; position: relative; top: -93%; }
Hi @paaljoachim , thanks for your response.
I know that plugin will continue but for how long and will Classic Editor be payed?Since Gutenberg is the official editor in WordPress is it better if we do the transfer on our website?
Thanks for the code, I will try to implement it.
Hello @keraweb and thanks for the reply.
Is there a tutorial on Table Storage component?
Forum: Developing with WordPress
In reply to: Administrator lost it’s role on CPTThanks for the reply and the code @jzbydev but that did not help.
Now the user with role oglasi_role can not go into the dashboard.I have copy-pasted your code and unfortunately, it’s not working.
Forum: Developing with WordPress
In reply to: Administrator lost it’s role on CPTWhen I create a CPT and want to assign capabilities to a custom user role I get this error.
Fatal error: Uncaught Error: Call to a member function add_cap()...
- This reply was modified 4 years, 11 months ago by labyrinthman.
Forum: Developing with WordPress
In reply to: Word counter in realtime in metaboxI got it
//getting the classic editor var ed = tinyMCE.activeEditor; //getting the element that I need for displaying the count var wourdcount=document.getElementById('wourdcount'); var count = 1; function fn(){ count++; return ' '; } var con = tinyMCE.activeEditor.getContent().trim(); con = con.replace(/[\s]+/ig,fn); var words = count+1; count = 0; if(words >300){ wourdcount.innerHTML='Reduce the number of words. The number of words is '+words; }
Forum: Developing with WordPress
In reply to: Word counter in realtime in metabox@bcworkz
Is there a way to transfer a text from metabox to the main text editor.
Something like Yoast?Forum: Developing with WordPress
In reply to: Word counter in realtime in metabox@mr-case
Unfortunately, I’m not using Gutenberg. This is for the WooCommerce Product post type.Forum: Developing with WordPress
In reply to: Word counter in realtime in metaboxForum: Developing with WordPress
In reply to: Word counter in realtime in metabox