WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Aleph] <?php aleph_the_author_profile_link(); ?> Not Working (17 posts)

  1. eac18509
    Member
    Posted 5 years ago #

    Greetings,

    I have added the following <?php aleph_the_author_profile_link(); ?> to my themes index.php and archive.php files yet when you view the site there isn't a link to view the author profile.

    Running Php 5.2.6
    Wp 2.6.2
    Plugins: Cimy User Extra Fields

    Thanks in advance for the help.

  2. Detective
    Member
    Posted 5 years ago #

    Hi,

    Nothing is displayed? If you manually enter the url of a profile, does it work?

  3. eac18509
    Member
    Posted 5 years ago #

    Yes, if I manually enter the url of a profile it works fine.

  4. sharebrain
    Member
    Posted 5 years ago #

    Same here ... :( profile site work but when i add <?php aleph_the_author_profile_link(); ?> to my themes index.php and archive.php files when you view the site there isn't a link to view the author profile.

    greetings,
    thomas

    p.s. thx a lot for this wonderful plugin ! :)

  5. eac18509
    Member
    Posted 5 years ago #

    sharebrain - Agreed it is a wonderful plugin. It can really turn wordpress into a social blog platform.

    I wonder if it my hosting company? I've got a reseller account with HostGator. Maybe sometime type of conflict?

    I've tried using different themes also. ProudFolio from woothemes.com, the default wp theme, and Personal form wpdesigner.com.

  6. sharebrain
    Member
    Posted 5 years ago #

    hi eac ...

    in my case it definatly not the hosting company because i am on my own server :) The strange thing is now it works ... BUT <?php aleph_the_taxonomy_link('author-favorites'); ?> won´t work in my loop an index.php NOT :((

    i wonder if i can add to favourites not only on a single view ?

  7. Detective
    Member
    Posted 5 years ago #

    Hi,

    I just found a bug in the plugin :'( That explains why the profile link doesn't work.

    I can't submit a new version of the plugin now, because it's incomplete. To fix the problem, edit the file el-aleph/template/aleph-user-tags.php in your wp-content/plugins folder. Find the function aleph_the_user_profile_link and replace it with:

    function aleph_the_user_profile_link($caption = '', $u = NULL) {
    	global $user;
    	if (!$u)
    		$u = $user;
    	$profile_url = aleph_get_user_profile_url($u);
    	if ($profile_url !== false) {
    		if (empty($caption))
    			$caption = $u->display_name;
    		echo '<a href="' . $profile_url . '">' . $caption . '</a>';
    	}
    }

    That should fix the problem. Sorry about that ...

  8. sharebrain
    Member
    Posted 5 years ago #

    any hint how to get the "add to favorites" button work on the index.php ? on single.php it works fine but not in categorys, index or archives .... :(

    thx a lot !

  9. Detective
    Member
    Posted 5 years ago #

    In aleph.php, in function aleph_the_taxonomy_link, find this:

    if ($taxonomy == 'author-favorites'){
    			if (!$post) return; // nothing to do here
    			$term = $userdata->ID;
    			$object_id = $post->ID;
    		}

    Replace it with this:

    if ($taxonomy == 'author-favorites' && (is_archive() || is_single())) {
    			$term = $userdata->ID;
    			$object_id = get_the_ID();
    		}

    Does it work?

  10. sharebrain
    Member
    Posted 5 years ago #

    ahhh ... you know what ... it worked all the time but it doesn´t show up on post that i made. hmmm....thats weird becuase i want to add posts to my favorites that i posted too. because i don´t want to forget them. :)

    so is it possible to show up the add favorites button even at posts that user xy posted when user xy is looged in ? :)

    greetings,
    thomas

    p.s. the aleph_the_author_profile_link fix works great ! !

  11. eac18509
    Member
    Posted 5 years ago #

    Thank you for the reply.

    I made the changes listed in the aleph-user-tags.php file and it works:-)

    Is it possible to show the latest (ex.10) of the authors posts and comments on the profile.php file?

  12. sharebrain
    Member
    Posted 5 years ago #

    yeah .... i was working on that too (show last post by this author) but i couldn´t solve the problem ... i copyed it from the original author.php but it didn´t work :(
    any solution for this ?

  13. Detective
    Member
    Posted 5 years ago #

    Try this:

    <?php
    query_posts("author=" . aleph_get_user_ID() . "&showposts=10");
    while(have_posts()): the_post(); ?>
         <div class="post"><a href="<?php the_permalink();?>"><?php the_title(); ?></a> <small>(<?php the_date(); ?>)</small
    ></div>
    <?php endwhile; ?>
    <p><a href="<?php echo aleph_get_user_posts_url(); ?>">See All Posts by this User</a></p>
    <?php  } ?>

    Put that in your profile.php.

  14. eac18509
    Member
    Posted 5 years ago #

    Detective - Thanks so much for the code to display the last 10 posts on the profile page. Can the comments of that user be shown also?

  15. Detective
    Member
    Posted 5 years ago #

    Please mark this topic as resolved, as the original problem was solved :)

    Currently there is no way no display comments from a user (at least i don't know one). Sorry :(

  16. eac18509
    Member
    Posted 5 years ago #

    Detective thanks so much for all the help!

  17. sharebrain
    Member
    Posted 5 years ago #

    yeah detective ... two important things before closing this thread:

    a. the last 10 posts works like a charm
    and eben more important :

    b. THANK YOU ! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags