• Resolved flyfisher842

    (@flyfisher842)


    I want to produce a locations list with the location link having a target attribute of “single-location”

    single location is the slug for a custom elementor template where I want to show the location information.

    I need the syntax to add the target = to the locationlink attribute.

    Your help is very much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter flyfisher842

    (@flyfisher842)

    More accurate would be to take the pages produced from the locationlink in the em database and display them with a nice elementor header with a background image and a transparent header with the theme footer at the bottom of the single location information.

    I have the template built with elementor for a single location but do not know hot to make the links in the locations list be displayed in the single location template

    • This reply was modified 3 years, 7 months ago by flyfisher842.
    Plugin Support angelo_nwl

    (@angelo_nwl)

    You can also use placeholders like <a href="#_LOCATIONURL" target="_blank"> #_LOCATIONNAME </a> in your events formatting settings or shortcodes

    Thread Starter flyfisher842

    (@flyfisher842)

    I will give it a try. Thanks for the help. Never occurred to me to use the placeholders in a url format. I have used them to display data in certain formats successfully.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    okay, let us know if you have further questions or updates.

    Thread Starter flyfisher842

    (@flyfisher842)

    @angelo_nwl

    I am reopening this ticket. Was not able to get the href to work as I needed it but have identified an addition to the event manager settings that would fix this single location issue I think.

    In the Formatting set > Location Pages is formatting for the overall list of locations targeted to the page chosen in the location pages Pages section.

    In the formatting there is formatting for a single location but there is no place to chose the single location page in the pages section under location list/archives. This section allows you to set a target page for the overall list of locations controlled by the location formatting. Please add a section just below the overall list to chose a target page to display the single location information and my issue would be solved I think.

    The overall list works fine with my elementor formatted template page and I see no reason that the same would not be true for a single location elementor page if the events manager had a chosen page to send the information to it.

    I hope this change to the settings can be done. I also hope this will clarify my problem for you.

    Thanks again for your help in resolving this issue.

    Thread Starter flyfisher842

    (@flyfisher842)

    @angelo_nwl

    Angelo,

    This would also work. I have chosen an elementor template named locations in the pages location/archives section and the formatting for the over all list goes to that page just fine. What is not happening is the link to the single location going to the same list page so the formatting for the single location can be applied.

    What is get is the results of the single.php from the theme not my locations elementor template.

    A simpler solution than what I suggested above would be to use the chosen locations archive page for both the list and the single location both controlled by the appropriate formatting section the in the formatting list.

    Thread Starter flyfisher842

    (@flyfisher842)

    @angelo_nwl

    I am using the general CONTENTS trigger on my locations page to pull the locations list from the settings.

    A trigger of SINGLE could be used to send the single location to that place on the locations page using the format for single would work ok I think.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    For single locations page, you can try to set Events > Settings > Pages > Location Pages > Display locations as =Post, and then in your current theme directory create single-location.php

    edit your single-location.php and then try this custom snippet (you can also copy your single.php format)

    <?php get_header(); ?>
    <div <?php post_class(); ?>>
    		<div class='post-header'>
    			<h1 class='post-title'><?php the_title(); ?></h1>
    		</div>
    		
    		<div class="post-content">
    			<?php 
    			global $post;
    
    			$EM_Location = em_get_location($post->ID, 'post_id');
    			
    			echo   $EM_Location->output('#_LOCATIONNAME');
    			
    		</div>
    </div>
    <?php get_footer(); ?>
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘add target to locationlink’ is closed to new replies.