Linking to Child Theme PHP Files

Theme/Parent Theme/Child Theme usage is irrelevant here. Content is not added via Theme template file, no matter what Theme you use. Go to Dashboard -> Pages, and add new static Pages for each of your site’s pages. WordPress will generate them, and the Theme will display them. Edit ok so I figured out that I … Read more

List child pages by slug not ID?

Why don”t you use get_page_by_title() to get the page object, and then pass its ID as the child_of parameter? If you would rather use the actual slug, then get_page_by_path( $slug ) should do the trick. So: if ( $page = get_page_by_path( ‘your-page-slug’ ) ){ wp_list_pages( ‘orderby=name&depth=1&order=DESC&show_count=0&child_of=” .$page->ID . “&title_li=’ ); }

List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?

function show_subpages() { global $post; $subpages = wp_list_pages( array( ‘echo’ =>0, ‘title_li’ =>”, ‘depth’ =>2, ‘link_before’ => ‘&mdash; ‘, ‘child_of’ => ( $post->post_parent == 0 ? $post->ID : $post->post_parent), ‘exclude’ => ( $post->post_parent == 0 ? ” : $post->ID) )); if ( !empty($subpages) ) { echo ‘<ul id=”subpages” class=”wrapper”>’; echo $subpages; echo ‘</ul>’; } } … Read more

Injecting a custom sql query into a page/theme

The hooks you are looking for can be found in the WordPress Codex WP_Query – Filters: Filters posts_distinct – Alters SQL ‘DISTINCTROW’ clause to the query that returns the post array. posts_groupby – Alters SQL ‘GROUP BY’ clause of the query that returns the post array. posts_join – Alters SQL ‘JOIN’ clause of the query … Read more

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