0

I have a wordpress site that has to integrate with a .NET platform for a client. I simply need to add two commented out pieces of HTML for it to work on the .NET platform end (not our system).

Wordpress keeps stripping it out of the custom template, though. Is there a way around this?

Note: This is not done in the backend editor. This is directly in the template php file that I'm placing these two commented lines of code.

Also note: I already tried Linklays function to modify tinymce to see if that would be a solution, but again this isn't using tinymce since it's hard-coded into the template.

Edit: Template Code: enter image description here

8
  • Please show some code (limited to the problem). Just from the text I don't really have an idea what you're currently doing.
    – kero
    Commented Dec 18, 2019 at 17:27
  • ` <div class="container"> <div class="primary-content"> <?php the_content(); ?> <h2><!--WebLink:ContentTitle--></h2> <!--WebLink:BodyContent1--> </div> </div> ` the commented out lines do not show, no matter what I do. Commented Dec 18, 2019 at 17:30
  • When you say the template PHP, how are you editing the template PHP? Is this the template file on the server? Are you making the changes then FTP'ing them up? Or are you using one of those dangerous plugins that let you put PHP directly into the database and run it? It's not clear, screenshots would be helpful!
    – Tom J Nowell
    Commented Dec 18, 2019 at 17:34
  • Edited to include a screenshot of the template file with the commented code. The h2 shows up empty, the commented code doesn't show on inspect. I've tried doing this multiple ways and just haven't figured it out yet. Commented Dec 18, 2019 at 17:38
  • How should WordPress/PHP know, what <!--WebLink:ContentTitle--> means?
    – kero
    Commented Dec 18, 2019 at 17:56

1 Answer 1

0

Figured this out, autoptimize strikes again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.