Jump to content

Archived

This topic is now archived and is closed to further replies.

Leonardo da Vinci

Add some specific links like Facebook, Twitter or any url link

Recommended Posts

Leonardo da Vinci

Hey

 

I recently bought a single Bits plugins, It's amazing plugins 

 

I have a question:

 

It's possible to add some specific links like Facebook, Twitter or any URL links in the bottom of the Page/Post title?

 

                                                                                           

                                                P O S T      T I T L E

 

                                                                                                   ------------------

 

 

                                                                                                        Image of

                                                                                                       an Author 

 

 

                                                                                                   -------------------

 

                                                                         Facebook link      Twitter link      any other links

 

 

 

Facebook / Twitter / any other links will change depend on the author , means each author has a specific Facebook/Twitter/links addresses.

 

Thanks

 

Thanks   

 

Share this post


Link to post
Share on other sites
ellenmva

The links, are they specific to the author -- their Facebook, Twitter, etc? If so, are they added in the users' accounts? If so, I can help you come up with a function to display those links and put it in PL Nextbox. Might take a little work.

 

Let me know if that is what you are looking to do. If not, are they generic links that will be the same for every post?

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
Leonardo da Vinci

Thanks for your reply 

Each author has own Facebook/Twitter link.

 

Share this post


Link to post
Share on other sites
ellenmva

Leonardo da Vinci And those links are custom fields under the user? Looking for how those links are added for the author. Or are you planning on adding them?

 

Best,

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
Leonardo da Vinci

these links are added by a plaugin called Cimy User Extra Fields . means I can add any link I want to any user/author.

I just want to add these links in single bits like a post title or other mete post links .

 

Share this post


Link to post
Share on other sites
ellenmva

Leonardo da Vinci I looked at Cimy User Extra Fields and was able to do what you want. So, I added two fields, FACEBOOK and TWITTER for users. To add the fields to SingleBits, use the PL Nextbox section (part of club membership), drag it under post title in your template and put the following code in (replace the capitalized field names with your field names). Also, make sure to check the box, Allow PHP Execution.

$facebook = get_cimyFieldValue(get_the_author_meta( 'ID' ), 'FACEBOOK'); 
$twitter  = get_cimyFieldValue(get_the_author_meta( 'ID' ), 'TWITTER'); 

echo '<ul class="author-links">';

if($facebook)
	echo '<li><a href="'. cimy_uef_sanitize_content($facebook) .'" target="_blank"><i class="fa fa-facebook"></i></a></li>';

if($twitter)
	echo '<li><a href="'. cimy_uef_sanitize_content($twitter) .'" target="_blank"><i class="fa fa-twitter"></i></a></li>';

echo '</ul>';

My_blog___Hello_world_.png

 

I'm using Font Awesome to display the social network icons. To style, here is some LESS to add to the Custom -> Custom LESS/CSS box in the DMS Editor.

@facebook:          #3B5998;
@twitter:           #00ACED;

.author-links {
  text-align: center;
    a {
        margin-right: 10px; // Here in-case you wish to add margins
        padding: 0px; // Here in-case you wish to add padding
    }
    li {
        display: inline;
    }
    .fa {
        .border-radius(0px); // Here in-case you wish to add a radius
        margin-bottom: 5px;
        min-width: 30px;
        color: #FFF;
        text-align: center;
        font-size: 18px;
        line-height: 30px;
    &:hover { .transition(background 400ms linear); }
    }
    
    .fa-facebook {
        background-color: @facebook;
    &:hover { background-color: lighten(@facebook, 10%); }
    }
    
    .fa-twitter {
        background-color: @twitter;
    &:hover { background-color: lighten(@twitter, 10%); }
    }
}

Here is the code in the Custom LESS/CSS Box

 

My_blog___Hello_world_.png

 

Let me know if this works for you.

 

Best,

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
Leonardo da Vinci

Thanks a lot Ellen for all that 

It's not working, I think the host I have does not support PHP Codes , I hosts my site with Flywheel.

Thanks

Share this post


Link to post
Share on other sites
ellenmva

Leonardo da Vinci It should work with Flywheel. Did you check the box in PL Nextbox to Allow PHP Execution?

 

Can you show me what you get? Also, if the site is online I can take a look if you want to send me an admin login.

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
Leonardo da Vinci

mysite

 

Username: flywheel

Password: ilikenightsky

 

Thanks

 

Share this post


Link to post
Share on other sites
Leonardo da Vinci

Please may you send me your email to send you an admin account

Thanks

 

Share this post


Link to post
Share on other sites

  • Similar Content

    • JudithKlinger
      By JudithKlinger+
      Help! I urgently need to remove the "This post was last edited..." that is now appearing anywhere that I've used Single Bits for a post. 
      James Giroux kindly provided this reply...but it does nothing. HELP! 
      This is from the Single Bits section by Ellen.  The code to add to the functions.php to remove this is:
      if(class_exists('elsueSingleBitsPlugin')) { $instance = elsueSingleBitsPlugin::this(); remove_filter('the_content', array($instance , 'add_mod_hatom_data'), 5 ); }
    • JudithKlinger
      By JudithKlinger+
      I'm stuck in a loop. We're developing a magazine type format and having been using Single Bits Single Post as the template..fine, no problem. Looks great! 
      But, some of the articles now have either a lot of media, or multi media, so we wanted to set up another template for these posts. But, if I change the media content on one post, it 
      changes it on the others. I've tried setting up Custom Posts, but that removes the post from the wp post "categories" and then deletes the post from something like HoverNews that pulls by category. 
      So how do I have the media change for each post? I've tried setting up a separate template for each of these particular, media specific posts...but that doesn't help either because they are posts, not pages. 
      Can PM you the link as the site is not live yet. Thanks!!
    • stoltz
      By stoltz+
      I want to change the text color of the post title in a specific post - How do I do that through CSS?
       
      I've downloaded a plugin which allows me to add custom CSS in specific posts, but I do not seem to get the selectors right.
       
      I am using the light-bg class on the single-bit container as well, which then includes a single-bit with the post title.
       
       
       
       
    • flourishdesignstudio
      By flourishdesignstudio+
      I am working on a website right now that uses custom tab colors that also match the background color of the tab content area. However, when a tab is open the tab bg color appear slightly different than the bg of the content area. I have double checked all my setting and can't seem to find a way to override this. 
       
      Would a link be helpful so you can see what I am referring to? I will include a screenshot in case that works...
       
      Thank you so much for all your help!
       
×