• Resolved flodi

    (@flodi)


    I updated an old site with last WordPress and Custom Content plugin, and a loop stopped working.

    I have a WP page that in the body, using [load], load an html file which content is:

    <div id="recipeslist">
    [loop type="page" category="ricette-zh" clean="true"]
    	<div class="item recipeslistitem">
    		<a href="[field url]">[field image]</a><br>
    		[content excerpt]
    	</div>
    [/loop]
    </div>

    While it always worked, now the [field url] does return only part of the url.

    I mean, for example, one of the page of that category show me this permalink in the edit page:

    http://granapadanocheese.com.cn/zh/cucina-zh/club-sandwich/

    But [field url] (or [field slug], same result) returns:

    http://granapadanocheese.com.cn/zh/cucina-zh/

    for every page.

    Why that happens?

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter flodi

    (@flodi)

    Sorry, the right code in the html is:

    <div id="recipeslist">
    [loop type="page" category="ricette-zh" clean="true"]
    	<div class="item recipeslistitem">
    		<a href="[field url]">[field image]</a><br>
    		[field excerpt]
    	</div>
    [/loop]
    </div>
    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I tested this, and the issue is caused by a change in WordPress 4.2.3~ for handling shortcodes in HTML attributes. In this case, [field url] is run first, then the loop.

    To get around this, please use image-link to display the featured image linked to each page.

    So, to change this:

    <a href="[field url]">[field image]</a><br>

    ..to this:

    [field image-link]<br>

    I’ll make a note about this in the next update.

    Plugin Author Eliot Akira

    (@miyarakira)

    Actually, I found something that might fix this. Please try the existing code with the newest plugin update.

    Thread Starter flodi

    (@flodi)

    As always your support is AAA+

    The update resolved everything.

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

The topic ‘Loop stopped working’ is closed to new replies.