Creating multiple pages

post_parent must be a single number, not an array. Each post can have only one parent. If you want to insert posts for multiple parents, use something like this: foreach ( array(17, 25, 27, 29) as $parent ) { wp_insert_post ( array( ‘post_title’ => $something, ‘post_type’ => ‘page’, ‘post_author’ => 1, ‘post_status’ => ‘publish’, ‘post_parent’ … Read more

adding a unique page to an existing site

There are several ways to do that depending on the type of the content which will be in the page, but the most straight forward is to creat a new page template that will generate the content/visual in the required way, then create a page and assign the template to it. The page then will … Read more

Loading custom jQuery and HTML in a WordPress page

I would do this in a page template. In your theme, create a file named page-app.php with the following content: <?php /** * Template Name: App */ function wpdev_137109_enqueue_scripts() { $file=”/js/myscript.js”; wp_enqueue_script( ‘myscript’, get_stylesheet_directory_uri() . $file, array( ‘jquery’ ), filemtime( get_stylesheet_directory() . $file ), TRUE ); $file=”/css/mystyle.css”; wp_enqueue_style( ‘mystyle’, get_stylesheet_directory_uri() . $file, array(), filemtime( get_stylesheet_directory() … Read more

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