Site logo

[Resolved] Replace link by a button

Home Forums Support [Resolved] Replace link by a button

Home Forums Support Replace link by a button

  • This topic has 7 replies, 2 voices, and was last updated 3 years ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2570269
    Boris

    Hello,

    I would like to replace a link by a button in the home page,

    I give you an example in the secret area,

    thanks

    #2570273
    Boris

    I forget to precise that it’s in the home page only

    #2570298
    Leo
    Staff
    Customer Support

    Hi Boris,

    Sorry but I cannot picture what you are trying to achieve in my head.

    The Comment allumer la lumière d’un vélo électrique ? link is just the title of the post and an important <h2> for your site.

    Are you able to show me an example of what you are trying to achieve?

    Let me know 🙂

    #2570310
    Boris

    Hello leo,

    Yes, I just want to obfuscate the link in the h2, it means that I want to remove the link and put in a button like this: <button onclick=”location.href=’http://www.example.fr/contact/'”>CONTACTEZ NOUS</button> instead of href.

    I would want this only for the home page and for all the h2

    It’s for Search Engine Optimization purpose.

    Thanks in advance

    #2570313
    Boris

    I already have the css to remove the style of the button:

    
    button{
    	text-transform: unset !important;
    	background: none;
    	color: inherit;
    	border: none;
    	padding: 0;
    	font: inherit;
    	cursor: pointer;
    	outline: inherit;
    }
    

    But how can i replace the href by the button for all h2 in the home page ?

    #2570393
    Leo
    Staff
    Customer Support

    It’s for Search Engine Optimization purpose.

    Are you sure about that? It’s a standard practice to have <h2> element as the post titles on the blog page – this is determined by WordPress itself and not the theme.

    I’ve never heard that using a button is better for SEO.

    #2570403
    Boris

    Yes in fact the idea of the button was bad

    Thanks I will open a new ticket after to be more clear

    #2570462
    Leo
    Staff
    Customer Support

    No problem 🙂

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