• Resolved wouterdoorn

    (@wouterdoorn)


    Hi,

    I tried reaching out through the email address provided on the shoofly website and through an email address from an earlier support question, but I’m not getting a reply. Are you available for support?

    The question concerned an error I am getting in chromse dev console in the post admin area:

    guest-author-post.js?ver=1.1.13:1 Uncaught TypeError: jQuery(…).select2 is not a function

    at guest-author-post.js?ver=1.1.13:1:42

    Not sure what the consequences are, but wanted to let you know anyway.

    I do have another question that is more immediate:
    I am trying to make a guest author page without using the archive function because that doesn’t seem to be compatible with Multisite Language Swichter (MSLS doesn’t recognize the slug). The problem I am facing is that I can’t get the WP_Query in my single-guest-author.php to show only the posts from the specific author for that author page. If I enable the archive function in your plugin I can get it to work on archive-guest-author.php with the standard if ( have_posts() ) query, so I guess it is possible, but I can’t figure out the query $args to select a guest author, I always get the posts for the original user (which means all posts). Nay ideas?

    Best,

    Wouter

    • This topic was modified 2 years, 11 months ago by wouterdoorn.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author A. Jones

    (@nomadcoder)

    Wouter, thanks for reporting the javascript bug and the difficulty getting a response via the support page.

    The free plugin does not give you the option to access guest authors by the author but you can probably create a custom query by email address. It’s a bit complicated. The premium plugin should allow you to query by author.

    Thread Starter wouterdoorn

    (@wouterdoorn)

    Thanks for the quick response. I am actually using the premium plugin. Querying by author doesn’t work. I can get the correct display_name and description using the_author_meta, but nothing else. The ID is always the original user ID (1). Using the_author doesn’t work, i guess because of the same reason. I am just getting all the posts every time (or no posts at all).

    Plugin Author A. Jones

    (@nomadcoder)

    You can try to email me at shooflysolutions@gmail.com. That old email address is supposed to forward but I guess that it isn’t working.

    I need to know what your settings are on the first panel, which theme you are using, and if you are trying to write your own query or using a page builder and which page builder you are using.

    Thread Starter wouterdoorn

    (@wouterdoorn)

    Resolved with the help of the author.
    For future reference here the code I ended up using in single-guest-author.php to get all posts from a guest author ordered by title:

    <?php
    $query = get_queried_object();
    $id = $query->ID;
    global $is_guest_author_query;
    global $wp_query;
    $args = array(
    ‘orderby’ => ‘title’,
    ‘order’ => ‘ASC’
    );
    $is_guest_author_query = true;
    $wp_query = gap_guest_author_archive_query($id, $args);
    ?>

    <?php
    if ( $wp_query->have_posts() ) {
    while ( $wp_query->have_posts() ) {
    $wp_query->the_post();
    wp_reset_query();
    ?>`

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support not working, error and WP_query $args question’ is closed to new replies.