Phantom page can’t get rid of/can’t get at to change

it’s an attachment post. when you upload files, WP generates an attachment, which is just a type of post in WP, and has it’s own URL. your image is named mountainrose, hence the mountainrose.html URL. Also, you should accept answers to your questions, people will be unwilling to help you with a 0% accept rate. … Read more

Search child pages from a specific page parent

I have no idea if this will work, but couldn’t you reference the post_parent in the query args? function SearchFilter($query) { if ($query->is_search) { //$query->set(‘post_type’, ‘page’); global $post; $query->set( ‘post_parent’, $post->ID ); } return $query; } add_filter(‘pre_get_posts’,’SearchFilter’); Again, completely untested. I’m not terribly familiar with using $query->set().

WordPress pages not working out correctly with HTML

WordPress store your pages in mysql database MySQL -> YOUR-DATABASE-NAME -> wp_posts / Your-Prefix_posts -> post_type for pages wp_type=page & for posts wp_type=post when you use wordpress visual editor it generates its own html but when you use HTML editors you can use your own HTML & works fine.

Query specific Pages

As you can see on http://codex.wordpress.org/Function_Reference/get_pages you can query by meta_key , so to query by product custom field, you will do something like this . $args=array( ‘meta_key’ => ‘product’ ); $pages = get_pages( $args );

WordPress Query Posts From Category Post on Static Page

Weird Problem!, try the following: Make sure that the targeted categories are not empty. If you are using custom post type,include it in the query ‘post_type’=>’advertisement’ for example. If the targeted categories are special taxonomies,make sure to include it in the query : ‘term’=>’cars’ along with child ‘cars’=>’toyota’. in this example and just to make … Read more

Is it possible to check for shortcodes on a page?

Yes it is. Check this function (has_shortcode): Check for a shortcode in a page/post content One of the mistakes that many developers make when creating shortcodes (in themes and plugins) is always loading all scripts and styles. For efficiency’s sake, and also to better prevent conflicts, scripts and styles should only be loaded when they … Read more

Add Content to Content()

// Hook into the_content filter here function append_to_the_content($content){ ob_start(); // Start doing stuff here … // End doing stuff here … $new_content = ob_get_clean(); return $content.$new_content; // Append new content return $new_content.$content; // Prepend new content } // function append_to_the_content($content) // 11 priority avoid wpautop() that messes custom HTML add_filter(‘the_content’, ‘append_to_the_content’, 11); Regards.

Can I change the “Home” text in the menu?

What I did was really simple…In the admin panel I left the name as home, then I used conditional statements to change the name. For the navigation I used: <ul> <li <?php if ( is_home() ) { ?>class=”current_page_item”<?php } ?>><a href=”https://wordpress.stackexchange.com/questions/32328/<?php bloginfo(“url’) ?>”>About Us</a></li> <?php $args = array(“exclude” => “”.page_name(‘Homepage’).”, “title_li” => “”); wp_list_pages( $args … Read more

Enqueue script on every page except one

Try giving your function its own parameters and do a template_redirect, something like this: <?php function mypage_scripts() { if ( !is_admin() ) { wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js’, true, ‘1.6.2’, false); wp_enqueue_script(‘jquery’); /* My Script */ function contact_form_script() { if ( !is_page(‘contact’) ) { wp_enqueue_script(‘myscript’, get_bloginfo(‘template_url’) . ‘/js/myscript.js’, array(‘jquery’), ‘1.1’, false); } } add_action( ‘template_redirect’, ‘contact_form_script’ ); … Read more