Create custom page in WooCommerce

Create a new page in /wp-admin (in the left column: Pages -> Add New); create new custom page template after reading through this doc; put your code in there; go into the page you created in #1 and assign the page template to it (in the right column, Page Attributes box, the drop-down under ‘Template’ … Read more

Custom Search Page Pagination Not Working

You’re running into a conflict between your replacement query and the default search query that’s running behind the scenes. Instead of running a new WP_Query, try modifying the default query by hooking to pre_get_posts: function wpse276396_search_filter($query) { if ( !is_admin() && $query->is_main_query() ) { if ($query->is_search) { $text = urldecode( get_query_var(‘search_text’) ); $my_products = aws_search_byozan($text); … Read more

What is the best way to include a widget in a Page?

This plugin might be the easy way. http://wordpress.org/extend/plugins/add-widgets-to-page/ But for a scratch method… Look into Theme Twenty-Ten’s functions.php file and find where the dynamic sidebars are registered. It looks like this: <?php function twentyten_widgets_init() { // Area 1, located at the top of the sidebar. register_sidebar( array( ‘name’ => __( ‘Primary Widget Area’, ‘twentyten’ ), … Read more

jQuery plugin only in one page/post

If you only want to use the library “jquery.typist” on one page you could just add it by the conditional is_page() but if you want to use it on more than one page you should just minifyi all your js-files into a single one and compress it and cache it. It is better to use … Read more

How to display list of child pages of parent page in wordpress?

Add this code to your functions.php. An explanation of the code is given below. function wpb_list_child_pages() { global $post; $id = ( is_page() && $post->post_parent ) ? $post->post_parent : $post->ID; $childpages = wp_list_pages( ‘sort_column=menu_order&title_li=&child_of=” . $id . “&echo=0’ ); //you can add `&depth=1` in the end, so it only shows one level if ( $childpages … Read more