Subpages menu on sidebar plus widgets

If I’m understainding you correctly, you’ve hardcoded the wp_list_pages() function in to the widgetized area of the theme’s sidebar, and then, when you add a widget using WordPress’ back end Appearance->Widgets then you no longer see the output of the wp_list_pages() function? If that’s the case, then I think we’ve found your problem. If code … Read more

Show the grandmother/father of the childpage

You need to look at get_ancestors() to get the top level parent of a page. Just a note, for reliability, use get_queried_object() (or even better $GLOBALS[‘wp_the_query’]->get_queried_object()) to get the current post/page object on singular pages, $post can be quite unreliable You can try the following in your shortcode: $post = $GLOBALS[‘wp_the_query’]->get_queried_object(); // Make sure the … Read more

List of pages – AJAX load more

Previous Question That answer I’ve linked to shows the steps you’ll need to take. It probably didn’t come up in your searches as you weren’t using the right terms. As you’re a front-end dev, this is how I’d do it based on that persons advice. Don’t load anything in the template. Just have an empty … Read more

Query sub subpages based on specific date?

If you’re loading additional posts/pages, it’s better to use a new WP_Query instance. query_posts is only for modifying the main query. As for the dates, store them in a custom field in the format yyyy-mm-dd. You’ll use php’s date to get the current date, refer to WP_Query’s custom field parameters for how to query and … Read more

Conditional sidebar menu

Bainternet’s solution will definitely work, but it you want to use the page slug instead of ID you could put this in your functions.php file: // GET PAGE ID FROM THE SLUG, HELPER FUNCTION FOR IS_TREE function get_ID_by_slug($page_slug) { $page = get_page_by_path($page_slug); if ($page) { return $page->ID; } else { return null; } } // … Read more

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