Directory location of new page

WordPress does not create a new file in the filesystem when you create a page from the backend. The data you enter into the backend is saved to the MySQL database where it is retrieved by various and sundry queries and displayed by code in one or more templates. There is no “directory location” for … Read more

Add feed to a custom page

The only way to accomplish this would be to add in new rewrite rules for these urls. There are a bunch of different ways to accomplish this, but here’s one example: <?php add_filter( ‘generate_rewrite_rules’, ‘me_filterRewriteRules’ ); function me_filterRewriteRules( $wp_rewrite ) { $newRules = array(); // Replace [your-slug] with the slug of your page $newRules[‘[your-slug]/feed/?$’] = … Read more

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

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)