WordPress.org

Ready to get started?Download WordPress

Forums

Feedgeorge WordPress Plugin
custom page for aggregated map (8 posts)

  1. malcor
    Member
    Posted 2 years ago #

    Hi, is there a way how to show aggregated map of posts on the custom page? Not at homepage?

    http://wordpress.org/extend/plugins/feedgeorge-wordpress-plugin/

  2. kismet31
    Member
    Posted 1 year ago #

    I would like to do this also!

  3. feedgeorge
    Member
    Plugin Author

    Posted 1 year ago #

    Hi

    Sorry for late reply. Thank you for our plugin.

    For work at custom pages, you have to modify some coding in our plugin because of map show only at home or index page. Please try to following steps below:
    - Go to the plugin directory ( wp-content/plugins/feedgeorge_wordpress_plugin)
    - go to "includes" directory and look for the file called classes.php
    - Edit the classes.php, search the function the_title() and the function load_script()
    - Remove code is_home() (in line 148 )
    - and remove code "if (is_home())" ( in line 433)
    - copy the code <?php show_fgeorge_map([height]); ?> to custom page template.

    Please try.

  4. kismet31
    Member
    Posted 1 year ago #

    Thanks for the response, feedgeorge, it's appreciated :)

    Hi - this works to a point. I have been able to get the feedgeorge map to appear on my custom page, but it doesn't contain the markers from any of my posts!

  5. feedgeorge
    Member
    Plugin Author

    Posted 1 year ago #

    Do you include the looping post code like index page in your custom page template?
    Example:
    <?php while ( have_posts() ) : the_post(); ?>
    <h2><?php the_title() ?></h2>
    .......
    <?php endwhile; ?>

  6. kismet31
    Member
    Posted 1 year ago #

    Yup! I'll post the code below.

    While I'm a programmer by trade, I'm new to wordpress and PHP. (I usually do JSP or ASP.NET)

    It shows the map, it just doesn't show any of the markers on it; whereas if I put the show_fgeorge_map() call into the index page, then it works perfectly well.

    When I look at fg_ajax.php, I assume that this will pull all posts out that are part of my wordpress instance, regardless of origin, but I can't figure out how they make it onto your map, so I'm having trouble tracing the code to try and reverse engineer it.

    Help? Thanks again!

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <h1><?php the_title(); ?></h1>

    <?php show_fgeorge_map(180); ?>

    <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
    <?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    <?php edit_post_link('Edit this entry', '<p>', '</p>'); ?>
    </div>

    <?php endwhile; endif; ?>

  7. feedgeorge
    Member
    Plugin Author

    Posted 1 year ago #

    In custom page template, Please try the way as example below:-

    <?php query_posts(array( 'post_type' => 'post' )); ?>

    <?php show_fgeorge_map(180); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h1><?php the_title(); ?></h1>
    <?php the_content('<p class="serif">Read the rest of this page ยป</p>'); ?>
    <?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    <?php edit_post_link('Edit this entry', '<p>', '</p>'); ?>
    </div>

    <?php endwhile; endif; wp_reset_query(); ?>

  8. Norman C Hoffmann
    Member
    Posted 1 year ago #

    Can you please post a copy of the edited php code of classes.php to copy and paste into editor or upload?. I am making changes to code but getting this error:

    Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/xxx/public_html/xxx-content/plugins/feedgeorge-wordpress-plugin/includes/classes.php on line 149

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.