Forums

Inserting a line of php into Query Posts widget? (2 posts)

  1. meisbored
    Member
    Posted 1 year ago #

    Not sure if I'm posting in the right place or whatnot, I'm new around here. Feel free to point me in a different direction.

    On my front page I'm using instances of the Query Posts widget to display the most recent posts in various categories.

    I'm also using the Geo Mashup plugin to geotag the posts and have them all linked to a map.

    This next part may only make sense to people who are familiar with the both widgets: I want to add the "show on map" link to the posts being displayed by the Query Posts widget.

    I have this line of code: <?php echo GeoMashup::show_on_map_link('show_icon=0'); ?>
    which I have inserted into loop.php and single.php, so the link shows up in the meta section (right after the comment link/edit link) on Category, Archive, and Single Post pages.

    However, I cannot find a way to display the link within the Query Post areas on my homepage. Not sure if there's a place I can stick that code to make it work or what, I'm new to php and WordPress in general. Any ideas?

  2. Dylan Kuhn
    Member
    Posted 1 year ago #

    If I understand the query posts plugin, it's for users intimidated by PHP template code, so using Geo Mashup template code with it may not be an option. Maybe in the next version, or just use query_posts in your template instead of widgets (http://codex.wordpress.org/Template_Tags/query_posts).

Topic Closed

This topic has been closed to new replies.

About this Topic