| bio | website | digisavvy.com |
|---|---|---|
| location | Los Angeles | |
| age | ||
| visits | member for | 7 months |
| seen | 15 hours ago | |
| stats | profile views | 4 |
I help businesses get more targeted website traffic & sell more of their products & services online http://bit.ly/trVUq9 and I can't resist a Hendricks.
|
Mar 21 |
awarded | Popular Question |
|
Feb 7 |
awarded | Teacher |
|
Feb 6 |
awarded | Commentator |
|
Feb 6 |
answered | Custom post types problem |
|
Jan 31 |
revised |
Return current page type added 163 characters in body |
|
Jan 31 |
answered | Return current page type |
|
Jan 31 |
comment |
Subpage Conditional This code would only run on a page with a post named 'Billy' 'if (is_page('Billy')) { echo "do this"; }else{ echo "do this instead"; }' |
|
Jan 30 |
comment |
Subpage Conditional To make sure my understanding is correct. You want to "do something" on all children of a specific Parent Page. Right? If so then this should work if(is_page() && $ancestor == $pid) {
"do this";
}else{
echo "do this instead";
}
That should fire off if you're on a page and that page is an ancestor of $pid where it's the page id |
|
Jan 30 |
answered | Subpage Conditional |
|
Jan 30 |
awarded | Supporter |
|
Jan 30 |
awarded | Scholar |
|
Jan 30 |
comment |
Using get_template_part to retrieve a template file based on current post type This helped quite a lot. Thank you, Simon |
|
Jan 30 |
accepted | Using get_template_part to retrieve a template file based on current post type |
|
Jan 30 |
comment |
Using get_template_part to retrieve a template file based on current post type I got it set now. Thank you for your help! '<?php get_template_part('parts/banner',$post->post_type); ?>' |
|
Jan 29 |
comment |
Using get_template_part to retrieve a template file based on current post type Taking your suggestion, I've changed up my naming convention to posttype-banner. This, by itself outputs what I want: <?php get_template_part( 'parts/dentistry-banner', '' ); ?> |
|
Jan 29 |
asked | Using get_template_part to retrieve a template file based on current post type |
|
Oct 3 |
comment |
Does WordPress consider a post name unique if that same post name is in multiple Post Types? Thanks Biranit. I currently have /%postname%/ set for permalinks. I think that WordPress, needs to have the actual "slug" be a unique value, regardless of the preceeding structure. I never knew that to be the case until this project I'm working on. A Child and parent page structure will give me what I want, but I need to have custom post types for this to work as expected. |
|
Oct 2 |
asked | Does WordPress consider a post name unique if that same post name is in multiple Post Types? |
|
Oct 1 |
awarded | Student |
|
Oct 1 |
answered | Using wp_get_nav_menu_items() to list children of children pages |