skiabox
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] Setting up fake worker failed…Thank you very much sir for your rapid answer.
I did what you suggest in your post and now I am able to see the pdf in the page.
Thank you again!Forum: Fixing WordPress
In reply to: Plugin that adds lines to .htaccess and wp-config.phpThank you sir for the rapid answer.
I will try to implement it immediately and I will post the results or any problems I’ve found down the road!Forum: Developing with WordPress
In reply to: How to create a post with image from external code?Thank you sir for your kind replies!
I don’t want to upload an image to the wordpress database, just display the image in the post created by wordpress api using image url.
Do you believe it is possible!
Thank you again for your time!??
Forum: Plugins
In reply to: [Custom Post Type UI] Theme reference is everywhere in the generated codeSo, if I get it right, I can remove all “twentyseventeen” references inside the code (this is my theme) without breaking any functionality?
If I leave it like it is now, with all these twentyseventeen references, can somebody that uses another theme, use the final plugin at the end of the tutorial?
Thank you so much for your help!Forum: Plugins
In reply to: [Custom Post Type UI] Theme reference is everywhere in the generated codeThank you sir for your rapid answer!
The assumption you made about tutorial creation time is true.
At least the part of the tutorial I am reading now was created back in 2015.
Sorry for my naive questions but I am new to wordpress plugin development.
What do you suggest that I do now since I am using your plugin to create another plugin?
Remove theme references by hand?
Thank you again!Forum: Developing with WordPress
In reply to: How to create a post with image from external code?I believe that one possible solution for plugin installation with one click is the following :
https://wpreset.com/programmatically-automatically-download-install-activate-wordpress-plugins/
Forum: Developing with WordPress
In reply to: How to create a post with image from external code?Thank you sir once again for your rapid answer.
Is it possible for the current wordpress version or the next Gutenberg version to create a wordpress post from external code without having to install manually a plugin (I mean either without any plugin or installing the plugin programmatically)?
Sorry again for the mountain of questions!
I promise this is the last one!
??Forum: Developing with WordPress
In reply to: How to create a post with image from external code?In fact I don’t know if I was clear enough.
I want to use javascript totally externally (from example running on my laptop inside nodejs).
In fact I have created some code using the wpapi library but I have not managed to get to the next level, meaning create a post, because I am stuck with the authentication method.
Check my code below (the post creation part is not working of course).
Thank you again for your rapid answers!
I really appreciate your help sir!
??get_request.ts :
import WPAPI from 'wpapi'; import {prettyJ} from "../utilities/beautify"; const wp = new WPAPI({ endpoint: 'https://skiabox.atwebpages.com/wp-json/', // This assumes you are using basic auth, as described further below username: 'skiabox', password: 'skia0987' }); const apiPromise = WPAPI.discover('https://skiabox.atwebpages.com') .then( site => { return site.auth({ username: 'skiabox', password: 'skia0987' }); } ); // If default routes were detected, they are now available apiPromise .then( site => { // If default routes were detected, they are now available site.posts() .then( posts => console.log(prettyJ(posts)) ); //end of inner Promise site.comments() .then( comments => console.log(prettyJ(comments)) ); // If custom routes were detected, they can be accessed via .namespace() site.namespace('myplugin/v1').authors() .then(authors => console.log(authors)); // Namespaces can be saved out to variables: const myplugin = site.namespace( 'myplugin/v1' ); myplugin.authors() .id( 7 ) .then(author => console.log(author)); }); //end of outer Promise //create a new post wp.posts().create({ // "title" and "content" are the only required properties title: 'Your Post Title', content: 'Your post content', // Post will be created as a draft by default if a specific "status" // is not specified status: 'publish' }).then(function( response ) { // "response" will hold all properties of your newly-created post, // including the unique <code>id</code> the post was assigned on creation console.log( response.id ); }); //promises /*wp.posts().then( ( data => console.log(data) ) ).catch( (err) => console.log(err) );*/
Forum: Developing with WordPress
In reply to: How to create a post with image from external code?Thank you sir for you kind answer.
My problem is that all the documentation is based on php language.
Are there any examples in some other language?
(For example in the so popular javascript)
Thank you again for your help!This advice https://www.ads-software.com/support/topic/invalid-default-value-database-install-fail/page/2/#post-8638625 worked for me!!!
Thank you!Thank you for this tip!
Now the duplicator tool is working for me too!!!This is definitely a database problem.
Is there any email I can send the installer-log.txt sir?I see a lot of database errors.
I am gonna try the whole thing once more since I have fixed the mysql ‘problem’ and now I run mysql as root.
I’ll keep you posted.Ok, thank you very much for answering!
Forum: Fixing WordPress
In reply to: How to prohibit a post from showing at the front pageI’ve found 2 articles on the same subject.One is the official one that you also reffered to and another article that suggest that I should use only one condition in my if.
Official codex article:
if ( $query->is_home() && $query->is_main_query() )
Other site (https://premium.wpmudev.org/blog/how-to-exclude-category-from-wordpress-homepage/) article :
if ( $query->is_home )
So what solution do you suggest that I follow?
Thank you!