Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #316760

    i have a blog wit about 900 blogposts. Now i want a button at the end of each blogpost with a link to a external website (opens blank). I do’nt want to change every blogpost by hand so i want to change in enfold. I have a child theme of enfold but i dont have access to the server itselve.

    Can you please help me? If a button with the text Download Brochure is not possible then a link “download brochure” to another website.

    Hope you can help.

    #317168

    Hi!

    Try filtering the_content:

    function my_the_content_filter($content) {
      if(is_singular('post')){
      	$new_content = $content;
      	$new_content .= "<div><a href='#'>Link</a></div>";
      	return $new_content;
      }else{
      	return $content;	
      }
    }
    
    add_filter( 'the_content', 'my_the_content_filter' );

    Reference:
    http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content

    Best regards,
    Josue

    #317201

    Thank you very much. Great !

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How can i put a button in the bottom of each existing blogpost.’ is closed to new replies.