curtisblackwell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Single Custom Post TypeThere’s probably a better way to do this, but this does work:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $postid = get_the_ID(); ?> <?php endwhile; endif; ?> <?php query_posts( array( 'p' => $postid, 'post_type' => '_cpb_locations' ) ); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> [insert your code here] <?php endwhile; endif; ?>
I only know a little bit of php and I’m not all that familiar with WordPress code, but it seems there’d be a better way to do this. This has an extra loop just to get the current posts ID and assign it a variable for the desired query.
Hope this helps if you haven’t already figured it out (I see it’s been 6 months…).
p.s. You’ll want to replace
_cpb_locations
with whatever you called your custom post type in functions.php.Forum: Themes and Templates
In reply to: What is image.php?The image.php file is used when you link an image to the post-file in the image uploader.
If you click that image in the post, it will bring you to another post-like page that is about the image. A common use of the image.php file will post the caption and description on this page.
Forum: Plugins
In reply to: PHP Detect Imageyou should look into the PhotoJAR plug-in.
Forum: Fixing WordPress
In reply to: body moves on pages where scrolling is possiblei put the background url in the page-wrap and that fixed it.
Forum: Fixing WordPress
In reply to: body moves on pages where scrolling is possiblei’ve discovered that if i take out <?php the_content() ?>, the body and header are in the right place
Forum: Fixing WordPress
In reply to: Unordered Lists Wrapping Incorrectlyyeah, i tried that and it just bumped the ul down below the image to the right.
Forum: Fixing WordPress
In reply to: Unordered Lists Wrapping Incorrectlyany other ideas?
Forum: Fixing WordPress
In reply to: Unordered Lists Wrapping Incorrectlygood idea on the text-indent. i was trying a negative margin on first-line and nothing happened.
the negative indent does fix the problem of the wrapped line lining up with the first line; however, putting a margin or padding on the ul isn’t moving the ul over, unless it’s a ridiculous amount like 800px. if i set it to the amount necessary to make this work, i won’t be able to float an image to the right.
Forum: Fixing WordPress
In reply to: Header is one pixel off in mozilla based browsersWell, that’s strange… removing the
html { overflow-y: scroll; }
fixed the header.
Thanks thisisedie.
Forum: Fixing WordPress
In reply to: different styling for parent and children pagesI found a friend who knew what to do:
ul#sidebar { float: left; font-family: "Century Gothic", Arial; list-style: none; text-align: right; width: 150px; } ul#sidebar li a { color: #f7c96d; text-transform: uppercase; } ul#sidebar li ul li a { color: #ffffff; font-size: 13px; text-transform: lowercase; } ul#sidebar li ul { padding-bottom: 20px; }
I was overthinking it. Thanks for your assistance stvwlf.
Forum: Fixing WordPress
In reply to: different styling for parent and children pagesThought I should add that I do need to use wp_list_pages bceause the church I am doing this for needs to be able to update the content without assistance.
Forum: Fixing WordPress
In reply to: different styling for parent and children pagesThanks, you were right about making the selectors more specific, but not all of them are working.
Here’s a mockup of what I’m trying to accomplish.
Here’s what I have so far.
I’m working live with Coda, so it will likely look different when you see it, so here is a screenshot of a parent page; and here is a screenshot of a child page.
The CSS looks like this:
/* SIDEBAR */ ul#sidebar { float: left; font-family: "Century Gothic", Arial; list-style: none; text-align: right; width: 150px; } ul#sidebar .page_item .current_page_item a { color: #900000; } ul#sidebar .page_item .current_page_parent a { color: #ffffff; } ul#sidebar .page_item a { color: #f7c96d; text-transform: uppercase; }
.pagenav { … } wouldn’t do anything for me, and neither is .current_page_parent { … }.
.current_page_item { … } is only working for child pages, not the parents.
Forum: Fixing WordPress
In reply to: different styling for parent and children pagesstvwlf,
Thanks, but I’ve tried looking through that and have tried all that I thought should work, and it just didn’t.
It seems I should be able to accomplish the styling with:
.pagenav { ... } .page_item { ... } .current_page_item { ... } .current_page_parent { ... }
but it didn’t work.