Blog

Curl with WP

Curl is  used to transfer data with urls. $url = 'https://abc.co'; $username= 'username'; $password = 'password'; //status active $data = array("query"=>'title:"Curl in wordpress'); $data_json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_json))); curl_setopt($ch,…

debug 500 errors in NodeJS,ExpressJS application

In app.js file at end of code write // error handler app.use(function (err, req, res, next) {   // set locals, only providing error in development   res.locals.message = err.message;   res.locals.error = req.app.get('env') === 'development' ? err : {};   // render the error page   console.error(err);   res.status(err.status || 500);   res.render('error', {     message: err.message,     error: err   }); }); Then create a new ejs file called error.ejs in /views folder and put following code There was some error <pre> <%= message; %> <br>…

Essentional fuction in wordpress

1.the_title():Display or retrieve the current post/page title with optional markup. 2.the_content():-Display the post content. 3.the_filed():-display the post/page content. get_field():-Returns the value of a specific field. echo get_field("field_name" );echo get_field("field_name",post_ID ); This example shows how to load the value of field…

Introduction to TypeScript

What it is ? In simple words,Typescript is a superset of javascript. That means it is javascript plus so much more options for developers. It is pure Object Oriented and strongly typed like C# and java and it compiles to…

Reasons my clients want me to develop a custom theme for every wordpress website

In my first few years in web development, I worked on custom web application development using PHP MVC  frameworks and ASP.NET.I used to ignore WordPress as it wasn’t considered real programming work. With my limited knowledge about its user base…

10 Typography rules every designer should know

Typography is one of the most important aspect of website design.No matter how good our color choices are, we need proper typography to compliment our content. Here are 10 rules that you must follow Maintain Visual Hierarchy Establish the order…