ajax page template

As it seems, it’s an easier way, using get_template_part and some php magic. What you do is get the page name from post_metadata filter the filename without the extension and add it to get_template_part. Of course all your data must conform a predefined variable (or just pass the id to the template) because you have … Read more

Front end login form not working on live site

Do not use wp_login function it is deprecated , instead use wp_signon. wp_signon function returns WP_Error on failure so use it to evaluate condition as following. <?php if ( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == ‘log-in’ ) : $login = wp_signon( array( ‘user_login’ => $_POST[‘user-name’], ‘user_password’ => $_POST[‘password’], ‘remember’ => $_POST[‘remember-me’] … Read more

Widget Development – Displaying dropdown content

$instance[‘page_id’] should be the post ID of the selected post. So … function widget($args, $instance) { $post = get_post( $instance[‘page_id’] ); echo $post->post_content; // you should add the common filters here var_dump( $post ); // more data } … should be a good start. To save the last value in the configuration form use selected(): … Read more

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