Link to Particular Page Within Template PHP Code

You probably want to use get_permalink and get_the_title. Example: <a href=”https://wordpress.stackexchange.com/questions/19555/<?php echo get_permalink( YOUR POST ID ); ?>”><?php echo get_the_title( YOUR POST ID ); ?></a> Replace YOUR POST ID with the ID of the post you’d like to link to. Post ID’s will change from install to install, however, so this might not work as … Read more

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 );

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

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