Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author akyusa01

    (@akyusa01)

    Hi ??

    You can certainly add/change the page templates as you wish.

    If you want to add the company name to the template-cr3ativconference.php, you would need to update that template in two places (we have a ‘highlighted’ loop and a non-highlighted loop.

    Do a find for this: (should bring up 2 instances)

    $cr3ativ_confspeakers = get_post_meta($post->ID, 'cr3ativ_confspeaker', $single = true);

    and add this line (to bring in company name, so the full code will look like this:

    $cr3ativ_confspeakers = get_post_meta($post->ID, 'cr3ativ_confspeaker', $single = true);
    $speakerurltext = get_post_meta($post->ID, 'speakerurltext', $single = true);

    This will bring in the speaker name and the company name, then look for this (again should be 2 instances of this):

    foreach ( $cr3ativ_confspeakers as $cr3ativ_confspeaker ) :
    
    	           $speaker = get_post($cr3ativ_confspeaker);
                        $speakerlink = get_permalink( $speaker->ID );
                        echo'<div class="speaker_list_wrapper">';
    	        		echo get_the_post_thumbnail($speaker->ID).'<a href="'. $speakerlink .'">'. $speaker->post_title .'</a></div>'; 
    
    				endforeach;

    and change it to this (keep in mind, you will need to add your own HTML and CSS if you want to style this specifically):

    foreach ( $cr3ativ_confspeakers as $cr3ativ_confspeaker ) :
    
    	           $speaker = get_post($cr3ativ_confspeaker);
                        $speakerlink = get_permalink( $speaker->ID );
                        echo'<div class="speaker_list_wrapper">';
    	        		echo get_the_post_thumbnail($speaker->ID).'<a href="'. $speakerlink .'">'. $speaker->post_title .'</a>'.($speakerurltext).'</div>'; 
    
    				endforeach;

    That should do it. ??

    Thread Starter ohrendruck

    (@ohrendruck)

    It doesn’t work, any other ideas? Tanks

    Plugin Author akyusa01

    (@akyusa01)

    Hmmm, I created a couple of sample page templates from our Conference theme.

    Have a look at this page: https://mythemepreviews.com/conference/conference-2-page-test/

    I created this as a sample for a client who wanted something similar. It adds a little more information that what you are looking for, but you should be able to get the general idea.

    You’ll need to add some CSS to style this, but try this code:

    <?php
    $cr3ativ_confspeakers = get_post_meta($post->ID, 'cr3ativ_confspeaker', $single = true); 
    $speakertitle = get_post_meta($post->ID, 'speakertitle', $single = true); 
    $speakerurltext = get_post_meta($post->ID, 'speakerurltext', $single = true); $speakerurl = get_post_meta($post->ID, 'speakerurl', $single = true); 
    ?>    
    <?php
    if ( $cr3ativ_confspeakers ) { 
    
    foreach ( $cr3ativ_confspeakers as $cr3ativ_confspeaker ) :
    
    $speaker = get_post($cr3ativ_confspeaker);
    $speakerimg = get_the_post_thumbnail($speaker->ID);
    $speakerlink = get_permalink( $speaker->ID );
    $speakertitle = get_post_meta($speaker->ID , 'speakertitle', $single = true); 
    $speakerurltext = get_post_meta($speaker->ID, 'speakerurltext', $single = true); 
    $speakerurl = get_post_meta($speaker->ID, 'speakerurl', $single = true);
                                                 
    echo'<div class="speaker_list_wrapper">';
    echo'<span class="speakerimage">'. $speakerimg .'</span>';
    echo '<span class="speakername"><a title="'. $speaker->post_title .'" href="'. $speakerlink .'">'. $speaker->post_title .'</a></span>';     echo '<span class="speakercompany"><a title="'. $speakerurltext .'" href="'. $speakerurl .'">'. $speakerurltext .'</a></span>';
    echo '<span class="speakertitle">'. $speakertitle .'</span></div>'; 
    
    endforeach; 
    
    } ?>

    the CSS I used is:`span.speakerimage, span.speakername, span.speakercompany, span.speakertitle {
    display: block;
    clear: both;
    font-size: 13px;
    line-height: 1.2em;
    margin: 3px 0;
    }`

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘company name – template-cr3ativconference’ is closed to new replies.