Issue with page not erasing

I’m a little confused about the current setup, but in general, I would suggest logging into your friend’s WP Admin Dashboard and going to Appearances > Customize > Static Front Page and selecting the “New Home” page like so: If you are using any caching plugins, then also be sure to purge the cache from … Read more

Converting Posts to Pages

A while ago I added a function to one of my sites to change a set of posts from one type to another. I can’t remember exactly why, but I’ve dug it out and updated it a little, and it is tested and working. The function Place this in functions.php so that it can be … Read more

Show parent’s child and also child’s, child on a page?

Will get_pages() work for you? http://codex.wordpress.org/Function_Reference/get_pages If I’m understanding your question correctly, you would want something like this: $children_of_page = get_pages(array( ‘child_of’ => $post->ID, ‘parent’ => $post->ID //defining both parent and child forces the list to only include direct children. )); $children_of_first_child = get_pages(array( ‘child_of’ => $children_of_page[0][ID], ‘parent’ => $children_of_page[0][ID] )); If you wanted to … Read more

Childpage title + content on Parent Page

You rarely ever need a custom SQL query, use the tools WordPress has to offer: $query = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘orderby’ => ‘menu_order post_title’, ‘order’ => ‘ASC’, ) ); if ( $query->have_posts() ) : ?> <?php while ( $query->have_posts() ) : $query->the_post() ?> <div id=”page-<?php the_ID() … Read more

Issue in If else condition [closed]

Try to replace the following: <?php $sectyp = array( ‘meta_query’ => array( array( ‘key’ => ‘section_type’, // selecting the section type “Normal” or “Parallax” ‘value’ => ‘Parallax’ ), ), ); ?> with <?php $sectyp = get_post_meta(get_the_ID(), ‘section_type’, true); ?> and replace <?php if($sectyp) { ?> with <?php if($sectyp == “Parallax”) { ?>

Create page excerpts for landinpage

You can get an array of child pages using get_children. Use the parent page’s ID as post_parent. Once you have the array, you can loop through them and display whatever info you want. For example, to show the page title (linked) and the excerpt you could do: $args = array( ‘post_parent’ => $post -> ID … Read more

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