EntarteteMuzak
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Display parent title grandchildren content on ancestor-page.Ha ha.
Never saw your post.
Thanks anyway @wpthemesnzForum: Themes and Templates
In reply to: Display parent title grandchildren content on ancestor-page.Solved it!
<?php $pages = get_pages('child_of='.$post->ID.'&sort_order=asc&sort_column=menu_order&parent='.$post->ID); foreach($pages as $page) { ?> <?php echo $page->post_title ?> <?php $pages = get_pages('child_of='.$page->ID.'&sort_order=asc&sort_column=menu_order&parent='.$page->ID); foreach($pages as $page) { $content = $page->post_excerpt; $content = apply_filters('the_content', $content); ?> <?php echo $content ?> <?php } ?> </div> <?php } ?>
Forum: Themes and Templates
In reply to: Display parent title grandchildren content on ancestor-page.I came across this, which works for ancestor child (parent):
<?php $pages = get_pages('child_of='.$post->ID.'&sort_order=asc&sort_column=menu_order&parent='.$post->ID); foreach($pages as $page) { ?> <?php echo $page->post_title ?> <?php } ?>
But what about displaying the child of each parent within that loop?
Forum: Themes and Templates
In reply to: Display each submenu separateAh. Solved it. The Advance Menu Widget did it for me:
https://www.ads-software.com/extend/plugins/advanced-menu-widget/Forum: Plugins
In reply to: [eShop] Show prices including taxI guess editing the cart-functions.php along the lines of this hack could do the trick?
Not sure where to start though.
Essentially what I want to do is just show the tax directly in the cart (before check out).
Couldn’t one just change the item value and sub total value to show including tax instead of excluding?Forum: Plugins
In reply to: [eShop] Show prices including taxWhat one could do is simply recalculate the cart in the check out. The including tax column then display the same total as in the regular cart and the excluding tax column display a figure which is 25% less. If I could manage to do this and have it printed on the receipt I would be more than happy.
Forum: Fixing WordPress
In reply to: Ascending posts not working?No, sorry that doesn’t work.
Catchable fatal error: Object of class stdClass could not be converted to string in /storage/content/26/129226/palaistra.org/public_html/wp-includes/query.php on line 1420
Forum: Fixing WordPress
In reply to: Remove shortcode from contentFixed it with this:
in Functions
<?php add_filter( 'the_excerpt', 'remove_columns' ); function remove_columns( $excerpt ) { return preg_replace ("/\[(\S+)\]/e", "", $excerpt); }?>
In template:
<?php remove_all_shortcodes('the_excerpt') ; the_excerpt(); ?>
The only thing that ticks me is that the […] after the excerpt disappears if I use this technique on the excerpt.
Forum: Plugins
In reply to: [WP Columnize] [Plugin: WP Columnize] Remove shortcode from content?Fixed it with this:
in Functions
<?php add_filter( 'the_excerpt', 'remove_columns' ); function remove_columns( $excerpt ) { return preg_replace ("/\[(\S+)\]/e", "", $excerpt); }?>
In template:
<?php remove_all_shortcodes('the_excerpt') ; the_excerpt(); ?>
The only thing that ticks me is that the […] after the excerpt disappears if I use this technique on the excerpt.
Forum: Fixing WordPress
In reply to: Remove shortcode from contentCan I use the strip shortcode function?
Forum: Fixing WordPress
In reply to: Post grid that adds code to post 1,2,3,4Thank you!
I’ll try and look into the modulus operator…Forum: Fixing WordPress
In reply to: Add custom field data to PHP string?Thank you! That solved my problem.
Forum: Fixing WordPress
In reply to: Display Category parent (defined by name), but not childrenWell, that did it!
Thank you.Forum: Fixing WordPress
In reply to: Display Category parent (defined by name), but not childrenOk.
But, I’m sorry I still don’t get it.
Could you put something together so that I get the hang of it?I want to display 3 posts on the index-page from a certain category. This category has three children or subcategories. If I use my code snippet I get posts from both the parent category and the children. I want to be able to exclude the children from index-page and just display the parent category.
I’d rather not base the solution on IDs since I need to use the theme on different sites and category IDs may differ (that is if I have to write the IDs myself and not have WordPress retrieve them for me).
Forum: Fixing WordPress
In reply to: Display Category parent (defined by name), but not childrenHmm. I think I may have been unclear on what I want.
If I have this:
<?php query_posts( array( 'category_name' => 'Category', 'posts_per_page' => 3, 'order' => 'DESC' )); ?>
How can I add something like this?
'exclude' => 'Subcategory1, Subcategory2, Subcategory3'
or
'exclude' => 'children'