[expand title="<img src='first_url'>" swaptitle="<img src='second_url'>"]Hidden Target Content[/expand]
Be sure you are doing this while viewing in text mode and that the single and double quotes are NOT curly quotes.
-
This reply was modified 5 years, 12 months ago by
twinpictures.
I am in text mode and I don’t know why the post I made have curly but I am using straight quotes in the command. Do you need the title to be an image aswell?
Can you post the full shortcode you are using? Please use the code wrapper in the WordPress Forum text editor so the code keeps its exact formating.
[expand title="VIEW SPECIFICATION" swaptitle="<img src="http://127.0.0.1/wp-content/files/arrow_up.png" />"]
When i save changes the single quotes change to double
-
This reply was modified 5 years, 12 months ago by
postmanpott2.
-
This reply was modified 5 years, 12 months ago by
postmanpott2.
OK, the issue is you are using double quotes (“) for both the value of swaptitle, and the value of the src. This means that the value of the swaptitle will be interpreted as: <img src=. Notice the use of single quotes inside the double quotes:
[expand title="VIEW SPECIFICATION" swaptitle="<img src='http://127.0.0.1/wp-content/files/arrow_up.png' />"]
When I copy and paste your code and then save, the quotes change to double when I look to edit it again.
I even tried using the html character ' but wordpress just adds the double quote in this case.
-
This reply was modified 5 years, 12 months ago by
postmanpott2.
I solved it, I had to edit the whole page as text and there use the single quotes, then wordpress doesn’t change it to double.
How are you creating the page? What entry method are you using?
Standard WordPress Editor?
A WordPress Gutenberg Block? (if so, which one?)
A Visual Page Editor?