If you have decided to code your next web application on top of WordPress framework, following are some of key considerations that would help you to get started quickly:
Following is detail on all of the above points:
…later in the code use following command:
$conn = mysql_connect( DB_HOST, DB_USER, DB_PASSWORD );
@mysql_select_db( DB_NAME, $conn );
$result = @mysql_query( $query, $conn );
The recommended method would be to encapsulate the database code in a class such as DBHandler.php, create an instance of DBHandler, pass the query as $query, and return the $result.
global $wp_query;
$type = $wp_query->query_vars[‘ptype’];
In functions.php, add following code:
add_filter( ‘rewrite_rules_array’,’my_insert_rewrite_rules’ );
function my_insert_query_vars( $vars )
{
array_push($vars, ‘ptype’);
return $vars;
}
Last updated: 26th April, 2024 In this blog post, we will discuss the logistic regression…
Last updated: 22nd April, 2024 As data scientists, we navigate a sea of metrics to…
Last updated: 22nd April, 2024 This post will teach you about the gradient descent algorithm…
Last updated: 19th April, 2024 Among the terminologies used in training machine learning models, the…
Last updated: 19th April, 2024 Model parallelism and data parallelism are two strategies used to…
Last updated: 4th April, 2024 In machine learning, model complexity, and overfitting are related in…