Title: Modify Markup
Last modified: August 21, 2016

---

# Modify Markup

 *  Resolved [stephen_connolly](https://wordpress.org/support/users/stephen_connolly/)
 * (@stephen_connolly)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/)
 * Hello,
 * I’m trying to modify the markup in particular the twitter:markup meta tag. Due
   to the way we have our testing site setup only relative paths are used for images.
 * So I want to modify the markup to use the absolute path. I know this function
   jmtc_modify_markup can be used as it stated in the documentation:
 * How do I go about manipulating the twitter:markup tag?
 * Regards,
    Stephen
 * [https://wordpress.org/plugins/jm-twitter-cards/](https://wordpress.org/plugins/jm-twitter-cards/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671008)
 * Hi, can you be more precise please? What are you trying to do? My plugin does
   not have any interaction with path. You paths can be curved by some code I guess.
 * I’m just grabbing resources that are used in your post.
 *  Thread Starter [stephen_connolly](https://wordpress.org/support/users/stephen_connolly/)
 * (@stephen_connolly)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671093)
 * As I mentioned above due to the way of site is setup the twitter:image meta tag
   on the live site look like this:
 * <meta name=”twitter:image” content=”/wp-content/themes/themename/images/twitter-
   card-default-logo.png”/>
 * As you can see its just outputs relative path.
 * Please note, your plugin is working fine, it does output the absolute path, but
   due to our setup we eventually end up with the relative path on the live site.
 * I think I have found a way around it, by just using the following function:
 * jmtc_modify_markup
 * in the documentation you mention this can be used to filter the markup, so can
   I amend twitter:image meta tag using this function, if so how?
 * PS I just noticed my initial post wasn’t very clear, apologies for that.
 * Regards,
    Steve
 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671111)
 * Ah ok! You want to add some prefix before such as `home_url()` or some `bloginfo()`
   in order to keep your relative path because Twitter does not understant relative
   paths.
 * Actually I think I picked the wrong term in my description. This is not actually
   about modifying the markup but more something like disable the markup for some
   condition with a filter.
 * To do the kind of tricks you’re looking for it would require some more hooks.
   I’ll think about it for next updates. It might be interesting to play with paths
   if possible.
 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671118)
 * I’ve added some new filters and wrote some snippets. See tab called [“Other Notes”](http://wordpress.org/plugins/jm-twitter-cards/other_notes/).
 * Do not forget to update to 4.3
 * Hope it helps.
 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671119)
 * Marked it as resolved. I’ve tested it. It’s working. Be careful anyway.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Modify Markup’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jm-twitter-cards.svg)
 * [JM Twitter Cards](https://wordpress.org/plugins/jm-twitter-cards/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jm-twitter-cards/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jm-twitter-cards/)
 * [Active Topics](https://wordpress.org/support/plugin/jm-twitter-cards/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jm-twitter-cards/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jm-twitter-cards/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: Anonymous User 10765487
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/modify-markup/#post-4671119)
 * Status: resolved