Team Member links

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #18726
    JDRipper
    Member

    Hello. When I use the “Team” page segment on my homepage, it works fine, but the images link to nowhere. I cannot find where I can edit the url to which these images link. They are set to the home page with “?team=nameoftheteammember” at the end which goes to nothing. I want them to go to a specific url. How do I change that url? Thanks.

    #18745
    Veena
    Moderator

    Will get back to you on this shortly.

    #18752
    Veena
    Moderator

    Pls change line number 118 in includes/register-post-types.php file to

    register_post_type('team', array(
                'labels' => $labels,
                'public' => true,
                'show_ui' => true,
                'hierarchical' => false,
                'publicly_queryable' => true,
                'query_var' => true,
                'exclude_from_search' => true,
                'show_in_nav_menus' => true,
                'menu_position' => 20,
                'has_archive' => false,
                'menu_icon' => LM_URI . '/assets/images/admin/users.png',
                'rewrite' => true,
                'supports' => array('title', 'editor', 'thumbnail', 'page-attributes')
            ));
    

    Pls have a look at the default page for team member and let us know if that meets your needs.

    #18754
    JDRipper
    Member

    Hm. I don’t have a folder called “includes.” I have wp-includes, which I’m guessing you mean. But no file in there called “register-post-types.php.” So I’m not sure the the code will work. And I’m not sure it will then let me change the url to where clicking on the team member image takes you…but I’m willing to try if you can tell me what file I actually have, or if it’s located somewhere else…

    #18771
    Veena
    Moderator

    Sorry i forgot to mention the main folder. Actually the file is in livemesh tools plugins folder – plugins/livemesh-tools/includes/register-post-types.php .
    By doing this change if you click the team-member image it will direct you to the single team-member page. Hope this is what your are looking for.

    #18792
    JDRipper
    Member

    What I want is to be able to go to a specific url. I want to change that url for each team member. The “?team=nameoftheteammember” isn’t what I’m looking for. I tried adding a custom field having name/key external_link_key and then adding this:

    <?php $key=”external_link_key”; $single=1; $external_link = get_post_meta($post->ID, $key, $single); ?>

    <?php if($external_link == “”){ ?>
    ” title=”<?php the_title(); ?>”> <?php the_post_thumbnail(); ?> <?php ;}
    else{ ?>
    ” title=”<?php the_title(); ?>”> <?php the_post_thumbnail(); ?> <?php } ?>

    I can enter the field external_link_key, but it still doesn’t take me to that url. Where can I change the url to whatever url I want…not just the team page. That’s not very helpful to me as the team page doesn’t have the information I want to display.

    #18811
    Veena
    Moderator

    Do you have a lot of team members?
    If you have a few then it will be better to add the the required HTML and have the link to the external page instead of changing the actual code.

    If it is all-important then use the below method and pls take a backup before making any changes.

    #18812
    Veena
    Moderator
    This reply has been marked as private.
    #18816
    JDRipper
    Member

    I’ve made the changes in the code you list. Now there’s no link at all with the images. I guess that’s better than the featured image just refreshing the page, but they don’t link to anything any more.

    I would adore just adding the the required HTML and have the link to the external page instead of changing the actual code. But I don’t know where to add/change the “required HTML!” Tell me where I can change the url to where the featured image links, and I’ll be delighted!

    I’d rather not change the code, and doing the exact steps you laid out doesn’t do anything except remove the link completely, so that’s not a solution.

    Thanks.

    #18819
    Veena
    Moderator

    The code is working for me.
    Anyways its not a preferable method , HTML way is the safest.
    You can copy the required html code of team page using “View page source”.
    – view-source:https://www.livemeshthemes.com/peak/home-2 and add it to a new page and link the team member img to a specific url.

    #18871
    JDRipper
    Member

    OK. Couldn’t make the code do anything, but I did figure out the html best way. Having the entire home page become html didn’t interest me, as that meant any time I changed a page segment I’d have to redo the process, which eliminates one of the big advantages to using the Peak theme, that you can change the home page easily by adding and removing page segments. But I was able to take the html for just the Team segment, edit it to make the changes I wanted, and then save it in the “text” tab of the team page segment, and that worked! Yay! So I can still use the page segments and my home page (home-2) works great. Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Team Member links’ is closed to new replies.