• Resolved webby102

    (@webby102)


    Hi there again.

    I was wondering, is there any way to have the meetings list page behave like a regular WordPress page? Ideally, it would be nice to just create a standard WordPress page, get a shortcode from your plugin, paste that shortcode in the newly created page and be done. That would allow us to “easily” maintain the page, use a heading, sidebar widgets, etc.. without having to revert to a hack.

    In the FAQ I saw “How can I override the meeting list or detail pages?”. That gets close but there is the issue of having to remember to monitor the page for breakage after an update.

    Maybe you could consider it for a future update:)

    Thanks!

    • This topic was modified 7 years ago by webby102.
Viewing 3 replies - 1 through 3 (of 3 total)
  • meetingguide

    (@meetingguide)

    Thanks. Yes, I’ve heard this request before.

    It’s not very simple to implement though. There’s a lot of logic that happens on that page, so it’s a lot to incorporate into a shortcode. And exposes us to more theme conflicts, which is not a thrilling prospect. But most of all, the plugin needs to know the address of the page that the user puts the list on, for the detail page back buttons. I’m not sure how to know that, and moreover, there’s nothing to stop the user then from having multiple pages.

    That was one request actually, that you be able to make individual landing pages for reach region with a shortcode. There’s a definite case to be made for that from an SEO perspective.

    It just seems like a lot more than I have capacity for right now, but I’ll keep thinking about it.

    This is open source, so anyone who can do a good job is free to jump in ??

    lovethecode

    (@lovethecode)

    make a taxonomy page preserving your theme titled taxonomy-tsml_region.php, activate a Tag Cloud to show Meeting Places by City, selecting the Regions taxonomy in the Tag Cloud. Fuse the following code into your theme in the taxonomy-tsml_region.php in your theme folder:

    <table class=”tsml_region table table-striped”><thead><tr><th class=”location”>Meeting Place</th></thead><tbody>
    <?php
    $tax = $wp_query->get_queried_object(); echo “<h1>Region: “. $tax->name.”</h1>”;
    ?>
    <?php // do_action( ‘__before_loop’ );##hooks the header of the list of post : archive, search…
    ?>

    <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();
    $args = array(
    ‘post_type’ => ‘tsml_meeting’,
    ‘post_status’ => ‘published’,
    ‘numberposts’ => -1,
    );
    $number = count( get_posts( $args ) );

    //$number = count(get_posts(‘post_type=tsml_meeting&post_status=publish&numberposts=-1&orderby=name&order=asc’));
    ?>
    <tr><td>“><?php the_title(); ?> <?php // echo $number; ?></td></tr>

    <?php endwhile; ?>

    <?php endif; ##end if have posts ?>

    <?php // do_action( ‘__after_loop’ );##hook of the comments and the posts navigation with priorities 10 and 20 ?>
    </tbody></table>

    • This reply was modified 7 years ago by lovethecode. Reason: clarification
    lovethecode

    (@lovethecode)

    although, the point of an override is to create a page that can be preserved though updates.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Future request: shortcode for pages’ is closed to new replies.