• Hi Everyone!!!!

    I need to set the url of many images inside the content of a page.

    The problem is that I am using custom permalinks so when the page is loaded the images path not works… ??

    I saw special tags that we can use in the page content like <!–more–>

    So, I need something like this

    <img src=”<!–siteurl–>/images/image.jpg”>

    thanks in advance and greetings ??

Viewing 1 replies (of 1 total)
  • Thread Starter luiscastillocr

    (@luiscastillocr)

    I found a solution here

    https://codex.www.ads-software.com/Shortcode_API

    function get_siteurl($atts, $content=null) {
    	 return get_bloginfo('wpurl');
    }
    add_shortcode('siteurl', 'get_siteurl');
    
    function get_themeurl($atts, $content=null) {
    	 return get_bloginfo('template_url');
    }
    add_shortcode('themeurl', 'get_themeurl');

    Then in the content just write [themeurl] or [siteurl]

    ??

Viewing 1 replies (of 1 total)
  • The topic ‘Use bloinfo() information inside the Page Editor’ is closed to new replies.