Jump to content
x69chen

Change social website icons

Recommended Posts

x69chen

Hi I used to develop a website by another theme, and my boss still likes the social icons of it very much,

Like x69chen.com, the social icons on the right top, the round button ones, including the search button.

And now I have bought the PageLine Prof, I want to ask how I can change the icons like those?

I am a new starter, thanks for helping

Share this post


Link to post
Share on other sites
Rob

You can add a simple hook associated with the Branding section, plus some CSS.

You'll want the PageLines Customize plugin found in the Store (free), installed and activated.

Once activated, you go to Dashboard > Plugins > Editor.

On the top right, you'll see a drop-down list. Select Pagelines-Customize. It will say "Inactive". Ignore that.

In the right column, you will see pagelines-customize/functions.php. Click it to open and edit.

Copy and paste this:


add_action('pagelines_inside_top_branding', 'my_unique_icons');

// function name

function my_unique_icons(){

?>

<div class="my_unique_icons"><a href="http://www.yoursite.com"><img src="http://www.yoursite.com/images/myimage1.jpg"></a> <a href="http://www.yoursite.com"><img src="http://www.yoursite.com/images/myimage2.jpg"></a>

</div>

<?php }

// end function

You will also want to add this to Dashboard > PageLines > Site Options > Custom Code in CSS Rules:

#branding .my_unique_icons {

    float: right;

    z-index: 10;

    position: relative;

}

Each icon may need individual CSS as well to ensure its placement is in a row.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
x69chen

You can add a simple hook associated with the Branding section, plus some CSS.

You'll want the PageLines Customize plugin found in the Store (free), installed and activated.

Once activated, you go to Dashboard > Plugins > Editor.

On the top right, you'll see a drop-down list. Select Pagelines-Customize. It will say "Inactive". Ignore that.

In the right column, you will see pagelines-customize/functions.php. Click it to open and edit.

Copy and paste this:


add_action('pagelines_inside_top_branding', 'my_unique_icons');

// function name

function my_unique_icons(){

?>

<div class="my_unique_icons"><a href="http://www.yoursite.com"><img src="http://www.yoursite.com/images/myimage1.jpg"></a> <a href="http://www.yoursite.com"><img src="http://www.yoursite.com/images/myimage2.jpg"></a>

</div>

<?php }

// end function

You will also want to add this to Dashboard > PageLines > Site Options > Custom Code in CSS Rules:

#branding .my_unique_icons {

float: right;

z-index: 10;

position: relative;

}

Each icon may need individual CSS as well to ensure its placement is in a row.

thanks so much!

i will try it now

Share this post


Link to post
Share on other sites
x69chen

...

Hi sir I have followed your instruction step by step but seems it does not work,

I changed "www.yoursite.com" to my website address, upload an image and replace the "http://yoursite.com/...es/myimage2.jpg"

Do I need to make other changes?

As I said, I am a new starter, Sorry to take your time

Share this post


Link to post
Share on other sites
Danny

Hi,

Can you provide a link to the site where these social icons are not appearing please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
x69chen

Hi,

Can you provide a link to the site where these social icons are not appearing please.

Oh thanks here you go, x69chen.com

I just have one domination sorry about that

Share this post


Link to post
Share on other sites
Rob

That site appears to be using the following in the header. This may be done by placing a widget in the header, but that will need extra CSS to align.


<div id="social-media-icons">

<a class="social-media-icon facebook" href="http://facebook.com">Facebook</a>

<a class="social-media-icon twitter" href="http://twitter.com">Twitter</a>

<a class="social-media-icon youtube" href="http://youtube.com">Vimeo</a>

<a class="social-media-icon google-plus" href="http://google.ca">Google+</a>

<a class="social-media-icon linkedin" href="https://www.linkedin.com/">LinkedIn</a>

</div>

Then, in the CSS for that site I found this:

#social-media-icons {

float: right;

margin-top: 60px;

}

a.social-media-icon {

display: inline-block;

width: 32px;

height: 32px;

margin-right: 6px;

background-position: 0 0;

overflow: hidden;

text-indent: -1000px;

-moz-transition: background-position .25s ease;

-webkit-transition: background-position .25s ease;

-o-transition: background-position .25s ease;

-ms-transition: background-position .25s ease;

transition: background-position .25s ease;

}

a.social-media-icon:hover {

background-position: 0 -32px;

}

.facebook {

background-image: url('images/facebook.png');

}

.twitter {

background-image: url('images/twitter.png');

}

.pinterest {

background-image: url('images/pinterest.png');

}

.flickr {

background-image: url('images/flickr.png');

}

.vimeo {

background-image: url('images/vimeo.png');

}

.youtube {

background-image: url('images/youtube.png');

}

.google-plus {

background-image: url('images/google-plus.png');

}

.dribble {

background-image: url('images/dribble.png');

}

.linkedin {

background-image: url('images/linkedin.png');

}

You'd have to include the full URL, not images/ but your full URL to the image.

The hook should have worked. Is there a dev site we can see?

  • Like 1

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
x69chen

That site appears to be using the following in the header. This may be done by placing a widget in the header, but that will need extra CSS to align.

Oh I just find a demo site here http://demo.onedesigns.com/pinboard/,

I also found those codes in the Chrome, but how could I use them,

Could I directly put them in the Custom CSS code, or in the theme Editor?

Thank you for helping

Share this post


Link to post
Share on other sites
Danny

HI,

All custom CSS needs to be added to either the Custom CSS/LESS area in Custom Code, your child themes style.css file or if you're using the PageLines Customisation plugin, add the custom CSS to the plugins style.css file.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
x69chen

Hi I add the codes to the Custom CSS, also upload logos, get the url addresses and replace the images/ with the addresses, but they does not work,

and it says Custom LESS/CSS error.

also I find these codes which build in that theme

function pinboard_social_media_options() {

add_settings_field( 'pinboard_facebook_link', __( 'Facebook Page', 'pinboard' ), 'pinboard_facebook_link', 'pinboard_options', 'pinboard_social_media_options' );}

function pinboard_facebook_link() { ?>

<input name="pinboard_theme_options[facebook_link]" type="text" value="<?php echo pinboard_get_option( 'facebook_link' ); ?>" />

<?php}

I find these in their theme-option.php folder

Share this post


Link to post
Share on other sites
Rob

The CSS is placed in Dashboard > PageLines > Site Options > Custom Code in CSS Rules.

The first bit of text requires that you add a sidebar or some other element to the Header. To do this, you go to Dashboard > PageLines > Drag & Drop and you'll see "Header" (it will be blue). Drag an element like Universal Sidebar from Available Sections to Active Sections.

Then, go to Dashboard > Appearance > Widgets. Click on Universal Sidebar. Drag "Text Widget" into the Universal Sidebar. It will open.

Paste the code I provided in the first group into the text widget. Click save.

We may need to add more CSS later to align it.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
x69chen

Ok thanks so much for helping, I finished social icons, they look exactly the same ;)

And how about the Search icon? Seems like it is supported by a totally different codes?

Share this post


Link to post
Share on other sites
James B

The search field will be in a different hook. pagelines_search_form

You can edit that in the same manner as you did the icons. However you also might be able to get the same look using css to style the search field.

A full list of the hooks can be found here http://api.pagelines.com/hooks


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
x69chen

Ok I just finished :)

Thank you Rob, Danny and James for helping~

Have a good day

Share this post


Link to post
Share on other sites
James B

The topic was marked as resolved.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • janpeeters
      By janpeeters
      Over the last month I had extensive communications with the developer of the (premium) Anything Boxes section (in Pagelines store) (Adam Munns) and the developer of the WP Polylang Multilingual plugin (Frederic Demarle).
       
      This was because the following problem occurred:
      Anything Boxes showed all posts of two languages (Dutch and English) on the respective static frontpages for each language. It should of course have filtered posts for Dutch language on the Dutch frontpage and English on the English frontpage.
       
      The solution to this problem was simple in the end. When duplicating a page for use in another language the settings for Anything Boxes were not copied to the new page and I should have set these settings manually again on the new page. I wasn't aware of this, but it makes sense. Because of this the pages didn't know how to differentiate between posts from different languages.
       
      The dev of Polylang told me that Polylang is currently smart enough to synchronize metas like Featured images and page templates but it does not work out of the box with metas created by plugins and themes but (according to Frederic) it is rather easy to add them in the list using the filter 'pll_copy_post_metas'.
      He mentions that he is not sure that these 'PageLines Meta Settings' are stored in post meta but that would make sense according to him. He asks if the Pagelines dev team will be interested to support this feature in the future.
       
      I'm also wondering if you will consider adding Polylang translation support for manually editable strings like the 'Read more…' strings in Pagelines Settings.
       
      Well that's of course up to you but I thought to let you know to be able to take this into consideration. I also post this for other users in case they experience the same kind of trouble and are looking for an answer.
       
      Best regards,
      Jan Peeters
    • bankrollbuilder
      By bankrollbuilder
      I used a custom hook to put a banner ad in my header. It works but its not in the right position. it is centered and above my logo and I would like to float it to the right of my logo in the header. heres the link: http://shaboopie.com/shaboopie-wp/free-logos-pg1/

      thanks.

      Dan B.
    • starlit
      By starlit
      Can one have two hero sections on one page?

      I want a landing page which leads/advertises two subpages.

      Or is there another option?

      Please help.

      THANK YOU
    • hutruk
      By hutruk
      Hi!

      I am using the shortcodes for tabs, as described in the documentation.

      When I insert the following code:


      [pl_tabs][pl_tabtitlesection type="tabs"] [pl_tabtitle number="1"]Title 1[/pl_tabtitle] [pl_tabtitle number="2"]Title 2[/pl_tabtitle] [/pl_tabtitlesection] [pl_tabcontentsection] [pl_tabcontent active="yes" number="1"] Lorem ipsum dolor sit amet, consectetur adipiscing elit [/pl_tabcontent] [pl_tabcontent number="2"] Lorem ipsum dolor sit amet, consectetur adipiscing elit [/pl_tabcontent] [/pl_tabcontentsection] [/pl_tabs]

      I get a strange output (in the attachment).

      Any ideas?

      Thanks in advance!

    • MooiWeb
      By MooiWeb
      Hello,

      I would like to align my qtranslate with my breadcrumb so that the flags are on the same hight.
      I'm aware of putting a code in the custom css and tryed severall codes from your site but for now, no succes

      The site i'm working on is http://nieuw.vazdias.nl

      Thx,
      Edwin



×