MartinLeclercq
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Cannot insert images in posts, very strangecan you see the insert image screen?
Forum: Fixing WordPress
In reply to: Home Pagedepends on the theme you’ve installed. Can you give a link?
Forum: Fixing WordPress
In reply to: Custom Post Type as a child of a Page?You can set your permalinks with: Custom Post Permalinks plugin.
On the permalink page you can set the custom post type url:page/%custom post type%
That way you can assign a custom post type to be hierachically under a page.
What I’m looking for is a solution for this matter:
Now I understood that you can also assign a category to a page by using the exact same name. But I haven’t found how to assign a taxonomy and custom post type to be hierchically under a page.Forum: Fixing WordPress
In reply to: Custom post type and Categorytnx for your input! That works like a charm.
I’m also using a plugin ‘Folding Category list’ (FoCaL). You can choose NOT to show the empty categories in the list. All the categories with custom post types then also disappear.
Probably a bug in the plugin. Damn. Probably have to make a accordion list myself then. Or does anybody know a sollution?
Forum: Fixing WordPress
In reply to: Custom Posts & Paginationah yes, that’s it. Thanks
Forum: Fixing WordPress
In reply to: Custom Posts & PaginationDo you mean I have to change it in how to address the loop for the custom post type?
How does your call for the custom post type loop then look like?Forum: Fixing WordPress
In reply to: Custom Posts & PaginationI also tried to get that right. Does it have something to do with using wp_query?
Forum: Themes and Templates
In reply to: Home Page – Different Category, Different Templateyou can use the if argument:
<?php
if ( in_category(‘fruit’) ) {
include ‘single-fruit.php’;
} elseif ( in_category(‘vegetables’) ) {
include ‘single-vegetables.php’;
} else {
// Continue with normal Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
// …
}
?>(https://codex.www.ads-software.com/Function_Reference/in_category)
I’ve done it for a site and used this:
<?php if ( in_category( array( 6,7,8 ) ) ) : ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<div class=”projectlink”><?php if (in_category (6)): ?> Show this text in category 6
<?php elseif (in_category (7)): ?> Show this text in category 7
<?php elseif (in_category (8)): ?> Show this text in category 8
<?php endif; ?><h2 class=”entry-title”><?php the_title(); ?></h2>
<?php the_content( ); ?>
<?php endif; ?></div><!– projectlink –>
</div><!– post –>
Or maybe this is what you want; query_posts
For example if you want to show the category number 4: query_posts(‘cat=4’);
Put this before starting the loop. End the loop and run the loop again for the rest of your posts.(https://codex.www.ads-software.com/Function_Reference/query_posts)
Forum: Fixing WordPress
In reply to: Featured Image Linkno, i’m having the same question. Been trying different approaches, but no luck…
Forum: Fixing WordPress
In reply to: Display sequential post number/count (not post id)??Tnx for your quick reply, the query_post did the trick!! Almost too easy…
Do you know if it’s still possible to alter the ‘post order’ like I normally do with ‘postmash’. Your code overrules postmash and it would be great if I can alter the ‘post order’ whenever I want.
Does ‘orderby=menu_order’ do the trick?
Forum: Fixing WordPress
In reply to: Display sequential post number/count (not post id)??Hi, I’ve also installed your script. It works great. Only problem is that the code in the index.php is published the other way round. In the html the top id=9 and the bottom =1. It needs to be the other way around for me. So that way I can use moving boxes:
https://grafischlokaal.nl/werkplaats
Can you help me with that?
Thanks