Trouble with parent and child conditional tag to show content

If it is about child post types* or taxonomies**: // page/post/cpt parent check: $post_object = get_queried_object(); // check if the page has a parent if ( $post_object->post_parent ) // do stuff // cat/tax parent check: $taxonomy_object = get_the_category( get_query_var(‘cat’) ); // check if the cat/tag/tax has a parent: if ( $taxonomy_object->parent ) // do stuff … Read more

is_page conditional question

If the page slug is ‘contact’ then is_page(‘contact’) should work. You can check out the optional parameters for page in the codex here . Using post ID, e.g. 94 in your example will work regardless of permalink settings. If you want it to display for a specific template you can use is_page_template(‘contact.php’).

Conditional tags inside a class

Your real problem is the god class. You put rendering, sanitation, validation, saving and fetching data, and registration into one class. Separate your tasks to make it it OOP, and let the main class be a very simple front controller that handles the initial registration only. Here is a rough start, illustrating how I would … Read more

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