anandg
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Opening permalink doesn’t show content on pageThe link is https://www.chrismochtar.nl/anand/rolandinus/
On the left is the navigation that I have created manually.
These categories all have a Category template, but that is never shown. I always see the Main Index Template.Category ID 2 is “Activiteiten” which has 4 posts.
Unfortunately the code<?php query_posts('cat=2'); ?>
gives no output.The code
get_category_link(2);
also doesn’t give the correct output.The code for Masterclass is:
<?php
$cat8 = $wpdb->get_row("SELECT cat_name FROM $wpdb->categories WHERE cat_id = 8");
$posts = get_posts( "category=8&numberposts=4" ); ?>
<?php if( $posts ) : ?>
<li><a href="#"><?php echo $cat8->cat_name; ?></a>
<ul>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<li><a>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>But content isn’t shown. It continues to show the Main Index Template instead of the content from the post that is clicked and the category template the post belongs to.
Forum: Fixing WordPress
In reply to: Opening permalink doesn’t show content on pageIt’s not the url from my profile. Can I send you the url?
Forum: Fixing WordPress
In reply to: Generate navigation list from posts and pagesI’ve turned all the pages into posts and now I’m manually retrieving the names of the categories and their posts. For example:
<?php
$cat9 = $wpdb->get_row(“SELECT cat_name FROM $wpdb->categories WHERE cat_id = 9”);
$posts = get_posts( “category=9&numberposts=4” ); ?>
<?php if( $posts ) : ?>-
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
- “><?php the_title(); ?>
<?php endforeach; ?>
<?php endif; ?>
The result is a list, which I’m turning with CSS into a CSS dropdown menu from A List Apart.
Forum: Fixing WordPress
In reply to: Generate navigation list from posts and pagesBut you can also limit the number of posts you show in the sidebar. I also know that the number of posts will be very limited.
I can get a list of all the categories, but if I use all posts, then I find it difficult to show the posts (limited number of posts, say 4 maximum) under the category it belongs.
I have tried it with a custom query. As a result I get an array. But I can’t seem to print it out like I want to.
Forum: Fixing WordPress
In reply to: Generate navigation list from posts and pagesAh, that’s too bad.
And what if I use only posts and no pages. Would it be possible then?
Forum: Fixing WordPress
In reply to: Generate navigation list from posts and pagesAh ok, I will mention which are posts and pages:
* Home (page)
* Company
– History (page)
– About (page)
* Articles
– article 1 (post)
– article 2 (post)
– article 3 (post)
* Photos (image gallery)
* Reports
– report 1 (page)
– report 2(page)
– etc.
* Register (page)
* Contact (page)Forum: Plugins
In reply to: Owen Winkler’s Role Manager pluginI also would like to use the Role Manager plugin. Could somebody email it to me or put the file online?
Thanks!
Forum: Fixing WordPress
In reply to: HTML Code is being messed up by the WYSIWYG editorI clicked the HTML button and pasted the HTML code in there.
I have disabled the rich text editor. Now when I paste the code it doesn’t rewrite the code.