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

Archive page if else not working for post_excerpt and post_content

Apart from the horribly format issues you also have a typo: <?php $my_excerpt = $item->post_excerpt; if ($my_excerpt){ echo Str::limit($my_excerpt, 120);} else $content = ($item->post_content);{ $contentexcerpt = substr($content, 0, 150); echo $contentexcerpt, ‘…’; } ?> These lines: else $content = ($item->post_content);{ should be: else { $content = ($item->post_content); The parser registered a single line of code … Read more

Display inner pages like posts.[Like how post excerpt works]

By default, the page post type does not show the excerpt box like posts, but you can enable it like this(code goes into your theme’s functions.php file): add_action(‘init’, ‘excerpt_for_pages’); function excerpt_for_pages() { add_post_type_support( ‘page’, ‘excerpt’ ); } Then you can see the excerpt field when you edit your page. If not, make sure it is … Read more

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