Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Read these articles for more information.
    Category_Templates
    Stepping_Into_Templates
    wpdb_Class

    You could build a page template, for viewing only the news-category posts. In the template code, a database query for news-category posts only should be used.

    I don’t know which theme you are using, but the title is usually set in the wp-admin General Settings screen. Coloring should be done in the stylesheet.

    Forum: Your WordPress
    In reply to: please check my site
    jim-de-groot

    (@jim-de-groot)

    You could add some more style to the categories drop-down box. The standard styling is a bit ugly, while the rest good looking.

    I have a question for you. Do you use threaded comments? I’m using the Inove theme also, in the Figaro 200px header edit. And the wp2.7 build-in feature for threaded comments is not working for me. I was wondering if you are able to turn on the threaded comments for your inove theme. Normally it is done in the admin-backend under Settings>Discussion.
    I’ve enabled it from there but it’s not working.

    See also this topic:
    http://wordpress.org/support/topic/259644?replies=3
    because I want to use this on another blog too.

    Thread Starter jim-de-groot

    (@jim-de-groot)

    I’ve tried that already, but that isn’t working. That’s why I was asking it.

    An Example of the blog I’m working can be found here:
    http://www.software-innovators.nl/2009/03/29/het-nut-van-pauzes/#comments
    This blog is using a custom theme. When you view the page’s source code, you can see the structure and naming.

    The reactions are at the bottom, but the [reply] links that should be displayed for threaded comments are not there.

    jim-de-groot

    (@jim-de-groot)

    add something like:

    background:transparent url(http://nka.weebly.com/uploads/2/1/0/3/2103304/9819065.png) repeat scroll 0 0;

    to your http://nka.weebly.com/files/main_style.css file on line 75 for styling the logo div.

    Forum: Your WordPress
    In reply to: please check my site
    jim-de-groot

    (@jim-de-groot)

    maybe you should give a link to your site

    Thread Starter jim-de-groot

    (@jim-de-groot)

    Maybe you can add some extra constraints to decrease the number of members to show. For example test on the number of submitted posts or something like that.

    For paging you could look how its done for archive pages. Maybe you could figure out how it is done there with wp_pagenavi. I’m not sure if it is build in for archive pages or if it is part of the WP-PageNavi plugin I am using.

    Thread Starter jim-de-groot

    (@jim-de-groot)

    this subject is solved

    Thread Starter jim-de-groot

    (@jim-de-groot)

    Thanks LASTKNIGHT, I’ll try to use it.

    At the moment I have modified the Quizzin plugin in such a way that the result get saved in a new database table with the users name and emailadress. Now the results are only saved if the player is a logged-in user, otherwise the results are not saved.
    Ideal would be if after the last question of the quiz, not logged-in users would have to give name and emailadress and that if they are new users, submitting would register them to the wp database and the name and emailadress would also be used for saving the result of the quiz.

    I hope it is clear what I’m trying to do. Further questions or suggestions are always welcome.

    Thread Starter jim-de-groot

    (@jim-de-groot)

    I’ve done it now with this code:

    $roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
    
    /* Loop through users to search for the admin and editor users. */
    foreach( $roles as $role )
    {
      	// all users with admin or editor role
    	if($role == 'administrator' || $role == 'editor')
      	{
    	  	$this_role = "'[[:<:]]".$role."[[:>:]]'";
    	  	$query = "SELECT * FROM $wpdb->users WHERE ID = ANY (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'wp_capabilities' AND meta_value RLIKE $this_role) ORDER BY user_nicename ASC LIMIT 10000";
    	  	$users_of_this_role = $wpdb->get_results($query);
    	  	if ($users_of_this_role)
    		{
    	    	foreach($users_of_this_role as $user)
    			{
    		    	$curuser = get_userdata($user->ID);
    		      	$author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename);
    				echo "<div class='post'>";
    					echo "<a href='.$user_link.' title='.$curuser->display_name.'>";
    						echo "<h2>$curuser->display_name</h2>";
    					echo '</a>';
    					echo "<a href='.$user_link.' title='.$curuser->display_name'>";
    						echo get_avatar($curuser->user_email, '80', $avatar);
    					echo '</a>';
    					echo '<p>'.$curuser->description.'</p>';
    				echo '</div>';
    		    }
    	  	}
    	}
    }
    ?>

    I stoppped matching on $name, but used $role instead. That way I won’t have to use the translation.

    Thread Starter jim-de-groot

    (@jim-de-groot)

    Thanks for your quick reaction scribu.

    I’m new to wp and php, so i’m not familiar with the functions and variables inside the code example.
    I’m not sure how to apply your suggestion to my code, because I want to test on the roles in their Dutch translated names like this:

    <?php
    
    /* Loop through users to search for the admin and editor users. */
    //list each role and each user with that role
    global $wp_roles;
    foreach( $wp_roles->role_names as $role => $name )
    {
      	$name = translate_with_context($name);
      	if($name == 'Beheerder' || $name == 'Bewerker')
      	{
    	  	//echo '+Users in the role '.$role .' ('. $name . '):';
    	  	$this_role = "'[[:<:]]".$role."[[:>:]]'";
    	  	$query = "SELECT * FROM $wpdb->users WHERE ID = ANY (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'wp_capabilities' AND meta_value RLIKE $this_role) ORDER BY user_nicename ASC LIMIT 10000";
    	  	$users_of_this_role = $wpdb->get_results($query);
    	  	if ($users_of_this_role)
    		{
    	    	foreach($users_of_this_role as $user)
    			{
    		    	$curuser = get_userdata($user->ID);
    		      	$author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename);
    				echo "<div class='post'>";
    					echo "<a href='.$user_link.' title='.$curuser->display_name.'>";
    						echo "<h2>$curuser->display_name</h2>";
    					echo '</a>';
    					echo "<a href='.$user_link.' title='.$curuser->display_name'>";
    						echo get_avatar($curuser->user_email, '80', $avatar);
    					echo '</a>';
    					echo ''.$curuser->description.'';
    				echo '</div>';
    		    }
    	  	}
    	}
    }
    ?>

    How should I use this array to get the same functionality?
    $roles = array('Beheerder', 'Bewerker', 'Auteur', 'Abonnee');
    “Beheerder” is an admin
    “Bewerker” is an editor
    “Auteur” is an author
    “Abonnee” is a subscriber

    Thread Starter jim-de-groot

    (@jim-de-groot)

    Yesterday I thought I had the right solution, but now I discovered a new problem. It works in Firefox but not in Internet Explorer.
    In IE there is this php error:
    “Warning: Invalid argument supplied for foreach()” for the line:
    foreach( $wp_roles->role_names as $role => $name )

    Can you help me again MichaelH?

    Thread Starter jim-de-groot

    (@jim-de-groot)

    Thanks Michael, with your help I could make it work the way I wanted.

    Thread Starter jim-de-groot

    (@jim-de-groot)

    How can I seperate on different roles with wp_list_authors()?
    Does it have an argument for roles or levels?

Viewing 15 replies - 1 through 15 (of 16 total)