Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author pepe

    (@pputzer)

    What does your PHP log say? It would appear that your server is not applying the new template code. This could be the result of editing the wrong template or of some caching mechanism.

    Plugin Contributor Scott Bressler

    (@sbressler)

    Is $author_id defined where you put this code? What happens if you just write echo $author_id?

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Thank you! that did make sense. Alright so now I added the right function to return the ID, but now wherever I place the call for the media, it always aligns it as a right column! This is the link for your reference: https://sailemagazine.com/author/DanaAlAttar/

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Ok so I set the sidebar to false, but I would like to get it the same way you showed it in the screenshots, all consistent size thumbnails, how can I do that?

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    I have one only problem now,, the media credit page will only know if the author has posts assigned to them, but my artists are separate from my writers so they only have media assigned to them not posts. Is there anyway around it?

    Plugin Author pepe

    (@pputzer)

    You have to set the parameter $exclude_unattached to false. (I’m assuming that some of those “media only” images are not used in any post.)

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Alright, what about the case where the author isn’t exactly assigned to any post? just media credit?

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Hello? Any update on this please?

    Plugin Author pepe

    (@pputzer)

    Please show us your exact code, otherwise we could only guess.

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Thank you Pepe,
    here is the code of the author page:
    <?php get_header(); ?>
    <?php $sidebar = pukka_get_option(‘show_category_sidebar’); ?>
    <div id=”content” class=”<?php if(!empty($sidebar) && ‘none’ != $sidebar){ echo ‘sidebar-‘ . $sidebar; } ?>” role=”main”>

    <div class=”content-wrap”>
    <header class=”archive-header”>
    <h1 class=”archive-title”><?php echo get_the_author(); ?></h1>
    </header><!– .archive-header –>
    <?php if ( get_the_author_meta( ‘description’ ) ) : ?>
    <?php echo get_the_author_meta( ‘description’ ); ?>
    <?php endif; ?>
    <p></p>
    <?php display_author_media(get_the_author_ID(), $sidebar = false, $limit = 15,$link_without_parent = false, $header = “<h5>Recent Artwork</h3>”, $exclude_unattached = true); ?>
    <?php if ( have_posts() ) : ?>

    </div> <!–. content-wrap –>

    <?php
    /* Queue the first post, that way we know
    * what author we’re dealing with.
    */
    the_post();
    ?>
    <?php
    /* Since we called the_post() above, we need to
    * rewind the loop back to the beginning.
    */
    rewind_posts();
    ?>

    <?php /* The loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( ‘content’, get_post_format() ); ?>
    <?php endwhile; ?>

    <?php pukka_paging_nav(); ?>

    <?php else : ?>
    <?php get_template_part( ‘content’, ‘none’ ); ?>
    <?php endif; ?>

    </div><!– #content –>

    <?php
    if(!empty($sidebar) && ‘none’ != $sidebar){
    get_sidebar($sidebar);
    }
    ?>
    <?php get_footer(); ?>

    Plugin Author pepe

    (@pputzer)

    <?php display_author_media(get_the_author_ID(), $sidebar = false, $limit = 15,$link_without_parent = false, $header = "<h5>Recent Artwork</h3>", $exclude_unattached = true); ?>

    is semantically wrong AFAIK. To the best of my knowlege, PHP doesn’t have pass by name. It might evaluate correctly ($<var> = <literal> evaluates to <literal>), but the parameter assignment is by position only. Furthermore, I already adviced you to set the $exclude_unattached parameter to false. Did you even try that?

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Hello Pepe, not sure what are you referring to by this “HP doesn’t have pass by name. It might evaluate correctly ($<var> = <literal> evaluates to <literal>), but the parameter assignment is by position only.” And this php statement you mentioned I copied it exactly from the FAQs page of the plugin, just replaced $author_id with “get_the_author_ID()”
    As I mentioned if the author has a post assigned to them the media shows perfectly, only if the author has no posts assigned to them I won’t get any media regardless of the credit.

    Plugin Author pepe

    (@pputzer)

    I guess then we will have to change the FAQ. Never mind the technical exposition, please change the $exclude_unattached to false and try again. Also, I’d like to see a PHP error log for one of your “media only” authors.

    Thread Starter Iman Ben Chaibah

    (@imanbenchaibah)

    Still same issue… How can I show you the error log? where to get it from?

    Plugin Author pepe

    (@pputzer)

    You have to set error_log to the log file path in your php.ini.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘author page doesn't show the media gallery’ is closed to new replies.