Support » Plugins and Hacks » [Resolved] Modify Markup

[Resolved] 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?



Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tweetpressfr


    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.

    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:


    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.


    Plugin Author tweetpressfr


    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.

    Plugin Author tweetpressfr


    I’ve added some new filters and wrote some snippets. See tab called “Other Notes”.

    Do not forget to update to 4.3

    Hope it helps.

    Plugin Author tweetpressfr


    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 ‘[Resolved] Modify Markup’ is closed to new replies.