Rewrite Rules to custom template

Found the solution: functions.php: add_action(‘init’, ‘wp_university_full_rewrite’); function wp_university_full_rewrite() { add_rewrite_rule( ‘university/([^/]*)/?$’, ‘index.php?pagename=university&uni_name=$matches[1]’, ‘top’); } add_filter(‘query_vars’, ‘wp_university_full_query_vars’); function wp_university_full_query_vars( $query_vars ) { $query_vars[] = ‘uni_name’; return $query_vars ; } function get_data_with_query( $name_query ) { $data = []; global $wpdb; $data = $wpdb->get_row(“SELECT * FROM table WHERE name=””.$name_query.”””, ARRAY_A ); return $data; } custom_template.php: <?php $name_pull = … Read more

Include Lumen/Laravel app in custom WordPress template

Okey so what I did was not using a WordPress theme template and instead deploying the app how I normally would without WP (e.g. create the folder /my-apps/my-app and put the index and htaccess file in there). After that I wrapped the index.php manually with require ‘../../wp-load.php’; in the template functions (get_header() etc.)

Advanced templating / WordPress as a CMS questions

You can actually achieve anything with wordpress. But by design, wordpress is not a CMS with a built-in feature that it offers multiple editable areas of which you can classify and manage the content for while being able to configure those in layouts that are understand by the theme. Not even the default one. As … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)