apax27
Forum Replies Created
-
Forum: Plugins
In reply to: Plugin to fix characters when c&ping from MS Word?Hi Thanks for your reply.
I know this- it’s my client who is entering in these blog posts.
I already told her not to use word in the future but what’s done is done. Is there any way to fix these hundreds of posts that already exist?
yea for some reason that wasn’t working with the plugin and I didnt have time to mess around with it. I used “Display posts with Pagination” plugin instead. Definitely a major flaw with your plugin- otherwise it would be PERFECT! “Display posts with Pagination” is not as user-friendly and can’t do many things that your plugin can do… wish there was a way to combine the two! For that plugin, you need to know how to edit the plugin template files and cannot do everything in shortcodes (The only reason I am putting all this is for anyone who stumbles upon this in the future… I can’t tell you how frustrating it is to click through dozens of unresolved issues without finding the answer you’re looking for)
Forum: Plugins
In reply to: [Network Latest Posts] Shortcode isn't workingThanks for getting back to me. I tried all that and still nothing shows up. I am wondering if there is a step I skipped or if I am using the plugin incorrectly. I am trying to put the shortcode in a page within my site in order to display a list of posts within the same site.
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular Templateok for some reason on mine, the second one did not work but the first one did. I did a lot of trial and error so things got changed around a lot, but I always tried the code exactly as you posted first and then changed things around. I would have never known the hierarchical thing without your help so thank you very much for that! And thank you for taking the time to help a noobie like me 🙂
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateAlso it needed to be
<?php $pages = get_pages(array(and not
<?php $product_pages_args = array(Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateI know I had it set to 0 as well- I copied and pasted your code exactly and when it didn’t work I played with the numbers. The issue was child-of and depth.
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateThank you Ken and Chip. For some reason it doesn’t work with child of or depth but it works fine when i only do hierarchical.
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateI DID IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hallelujah! lol
Here is the explanation for those who want to “get it”:
hierarchical needs to be 0, not 1 for this to work!
You see, As I explained before all pages with the product.php template were children of another page. I guess wordpress defaults to
‘hierarchical’ => 1,
So by changing it to 0, it will display these pages.
Here was my final code for anyone stumbling upon this error
<?php $pages = get_pages(array( 'meta_key' => '_wp_page_template', 'meta_value' => 'product.php', 'hierarchical' => 0 ));Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateIt just returns
Array ( )Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateThe same thing,
array(0) { }
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateThe same thing I have been saying before… nothing shows up.
<?php $product_pages_args = array( 'meta_key' => '_wp_page_template', 'meta_value' => 'products.php', 'depth' => -1, 'hierarchical' => 1, 'child_of' => 0 ); $product_pages = get_pages($product_pages_args ); ?><ul> <?php foreach ( $product_pages as $product_page ) { echo '<li><a href="' . get_permalink( $product_page->ID ) . '">' . $product_page->post_title . '</a></li>'; } ?></ul>returns no results.
You may not remember, but if you go back you will see that I tried
var_dump( $product_pages );2 months ago as you suggested. The template absolutely exists but for some reason get_pages does not recognize it. Yet when I use wp_list_pages I get a list of the data I need, I just don’t want it in list-form and I can’t seem to style it in the CSS.
I am starting to really really hate wordpress!!
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular Templateno nothing works with get_pages. I have tried everything. I can’t understand why list_pages works, but get_pages does not.
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateWow thank you! I feel like I am so close!
wp_list_pages( $product_pages_args );works, but
$product_pages = get_pages( $product_pages_args );doesn’t work.
Very strange. I don’t know why I can’t use get_pages with this because after reading about get_pages for hours, it SHOULD work. I am a wordpress noob but I think part of it has to do that these are child pages, since when I used the same code on their parent pages, it worked fine. I tried playing around with “depth” and “hierarchial” but it didnt seem to help.
I am ok with using wp_list_pages, but I didn’t really want this in a list form. I guess I can just style it with css, unless there is a better way to do it.
Thanks to everyone who helped! You are good people to volunteer your time! 🙂
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular TemplateIgnore the rest of it- I can figure that out, but I want to take every page that has the template Product or “product.php” and make a new page that lists these pages. This is the same thing I’ve been trying to do since day 1. The getpages thing was only working on pages that had no parent
Forum: Themes and Templates
In reply to: Listing Links to All Pages Using A Particular Templatestill nothing… Do I use “echo” for the second part?
<?php $query = new WP_Query( array( 'meta_key' => '_wp_page_template', 'meta_value' => 'product.php' ?> <div class="category-listing"> <a href="<?php echo get_page_link($page->ID) ?>"><?php echo $content ?></a> <h4><?php echo $page->post_title ?></h4> <p><?php echo get_post_meta($page->ID,'product_number',true); ?><br /> <strong>List Price:</strong><?php echo get_post_meta($page->ID,'list_price',true); ?><br /> <strong>Our Price:</strong><?php echo get_post_meta($page->ID,'discount_price',true); ?></p> <p><a href="<?php echo get_page_link($page->ID) ?>">More Information</a></p>