How to change hyperlink color in posts and pages only

Posted in: Newspaper
Post count: 103

Hello,

I wanna change only the colours of my hyperlinks in my posts and pages. I found some codes here posted by the TagDiv staff, but they change the color of everything (block titles ect).

My colourcode is #E84E1B.

Thank you!

Post count: 20685

Hi,

If you mean the post content only, this code will change the link color in that situation
https://www.screencast.com/t/U6taXukH
But it would be best if you could provide specific details about where exactly you want to change the link colors for posts and pages, for a more accurate solution.

Thanks

Post count: 103

Hai Simion,

I added the code, but nothing happen.

I want every hyperlink i make in posts and pages to have a specific color. Just like this:

https://www.google.nl/search?q=hyperlink&source=lnms&tbm=isch&sa=X&ved=0ahUKEwj1i9PWmbPWAhUHK1AKHdPFAKoQ_AUICigB&biw=1366&bih=638#imgrc=dSQD2xEmslrUgM:

Also, i set my blocks to show 5 articles, but if there is more i want it to show a button that said ‘more’ (to let people know there is more) Is that possible?

Post count: 103

Also, please copy the code in the forum posts itself. Otherwise i have to type it over and i could make mistakes. Thank you.

Post count: 103

This is what i mean exactly: https://www.dagonline.nl/over-ons/. The last 2 wordsin this text (deze pagina) are a hyperlink, but you cant see its a hyperlink. I want all my hyperlinks in posts and pages to light up.

Post count: 20685

Hi,

Sorry, it seems I have forgotten to provide the code used in the example. The default link color is inherited from the theme accent color set in the theme panel
https://www.screencast.com/t/cLEVJM61PPf
The code I mentioned will change the color of the links in the post content, to the color you want as shown in screenshot. It could be extended to the page content links, something like this should cover it (test and check the results, and if the code is working properly)
https://www.screencast.com/t/ikMmOLTG

.td-post-content a,
.td-page-content a,
.tdc-content-wrap a {
color: #E84E1B;
}

There are block pagination options that you can use to achieve what you want
https://www.screencast.com/t/8bpWiByi
More information about the available block settings and options in this guide
https://forum.tagdiv.com/block-settings-guide/

Thanks

Post count: 103

@ Simion

The hyperlinks are lighting up the color i want know, but my article titles (only on frontpage), author name (only on frontpage) and categories (only on frontpage) also have the same color. This is not what i want. I want ONLY the links (such as a website and email address) in my posts and pages to have the color.

  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

I can make the code more exact, but there is no way to differentiate between links (email address or any link) only by the location the links are found.
For example this code will make only links found in the column text elements, have the color you want
https://www.screencast.com/t/U3WMG0kdp1
Adding the post content links to the code will change the color for those as well (all of them, not just website links or emails)

.wpb_text_column a,
.td-post-content a {
color: #E84E1B;
}

So now this code applies to links found in the post content, and links found in text column elements, like the one used in the page you provided.

Thanks

Post count: 103

Thank you Simion, that was the right one.

How can i change the pagination text and color of the ‘load more’ AJAX button? I edited the text ‘Load_more’ in the homepage itself, but that doesnt seem to work. I wanna have the Dutch text ‘Meer berichten’ in it.

  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

Glad it works. The load more text on the button can be changed to anything you require, in the theme translation settings
https://www.screencast.com/t/8kIGKeEP5K2Q
The color of the text can be changed with a code like this
https://www.screencast.com/t/eaVtgoj7

.td-load-more-wrap a {
color: #E84E1B;
}

The color of the border can be changed if needed, add this code
https://www.screencast.com/t/6Tvf0Tcr

.td_ajax_load_more {
border: 1px solid #E84E1B;
}

Thanks

Post count: 103

Thanks again Simion. Problem is i have different blocks with different colors tabs. When i add the CSS code for the color and border, all the ‘Load more’ texts in all blocks become the same color (obviously).

So my first block is blue, so the ‘Load more’ button needs to be blue too. How can i specify specific colors for each block? If you dont know what i mean, please take a look on https://www.dagonline.nl. Thank you.

  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

That can be done by setting a unique class for each block, then using it in the code. Like in this example
https://www.screencast.com/t/n0rDVBXw
https://www.screencast.com/t/nLbwQRdmaQmr
https://www.screencast.com/t/MEJUVT1pH5
Each block can be customized in particular, by setting a unique class to it.

Thanks

Post count: 103

Thanks Simion. I see that the outcome of the ‘load more’ buttons is pretty messy, i will skip it. Instead i will choose for the ‘Next Prev Ajax’ option for pagination. How can i change the colors of the border and arrows of each block. Can you please tell me specificly what to do?

Btw, on mobile (Chrome) i get an quick flash error. It says:

“This site can’t be reached
The web page might be temporarily down or it may have moved permanently to a new web address”. Error content decoding failed.

I think its only on mobile and its only once. Once i visited the post of page its gone. I empty caches, but than it pops up again. I contacted my hosting, but they dont see any errors. How can i fix this?

  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
Post count: 103

@ Simion, its the WP Super cache plugin which causes the problem. This should be a compatible plugin. Do you have any idea?

Post count: 20685

Hi,

The next/prev pagination can be customized the same way. For all the blocks at once you can use a code like this
https://www.screencast.com/t/ZNFbvTBTHxuT

.td-next-prev-wrap a {
color: red;
border: 1px solid red;
}

Fore each block the same method provided above will have to be used, to style each block individually.
The WP Super Cache works properly with the theme
https://forum.tagdiv.com/cache-plugin-install-and-configure/
I have not seen that error displayed in relation to this caching plugin. It is even recommended to be used with the theme. You could try other caching plugins if you want, but the Super cache should not produce errors like you mention.

Thanks

Post count: 103

Thank you Simion. I did it. Only the little green arrow dissappears when i hover over it and i see only a little colored box. How can i make the arrow white, when i hover/click on it? (i wanna keep the green arrow when i do not hover).

Strange. Probably not theme related then.

Post count: 20685

Hi,

You can something like this for all of them at once, in addition to your code
https://www.screencast.com/t/9rKIKjXTXL3J

.td-next-prev-wrap a:hover {
color: white!important;
}

Or add it in the codes you used
https://www.screencast.com/t/p5IT724c

Either way will work properly.

Thanks

Post count: 103

Work! Thanks Simion!

Viewing 18 posts - 1 through 18 (of 18 total)
You must be logged in to reply to this topic.