• First of all, great plugin. This was what I was looking for. Saves me a lot of time to create it myself. I have two questions though:

    1. As the title says. I’ve created a block of HTML in combination with shortcodes (shortcodes are from the plugin Custom Content Types). So far so good, because this works like a charm. However, now I would like to include PHP and for some reason this doesn’t work. When I use <?php echo ‘test’; ?> nothing happens. When I open the console and view the source, I litteraly see the PHP part (including the PHP-tags). If I exclude the PHP-tags and just echo something, I just see what i wrote as well. If i try ;?><?php //code ?><?; the whole block doesn’t work anymore.

    2. Is it somehow possible to extend the button on the admin panel to add the shortcode to your site. In the template I am using several variables. If possible, I would like to generate some sort of GUI so the unknowing user just selects stuff like ‘category’, ‘sort by’, etc. All the button then does is generate the shortcode as it already does, but then with extra parameters like ‘category=test’.

    My current code looks like this. Bare in mind that the shortcode is some sort of loop within Custom Content Type.

    [summarize_posts post_type="woningtype" taxonomy="category" taxonomy_term="%%categorie%%" order="ASC" orderby="post_title"]
    <div class="woningtype">
    <div class="woningtypeinner">
    <div class="woningheader" style="background: url('[+thumbnail_src+]');">
    <div class="woningheadercontent">
    <h3>[+Zorglocatie+]</h3>
    <h4>[+Locatie+]</h4>
    </div>
    </div>
    <div class="woningtypecontent">
    <h5>[+type+]</h5>
    [+post_content+]
    <strong><a href="[+permalink+]">Meer over [+Zorglocatie+]</a></strong>
    <div class="clearfix">
    <div class="infoleft">Huurprijs:</div>
    <div class="inforight">[+Huurprijs+]</div>
    </div>
    <div class="clearfix">
    <div class="infoleft">Servicekosten:</div>
    <div class="inforight">[+Servicekosten+]</div>
    </div>
    <div class="clearfix">
    <div class="infoleft">Woonzorgservicepakket:</div>
    <div class="inforight">[+Woonzorgservicepakket+]</div>
    </div>
    
    <hr />
    
    <div class="clearfix">
    <div class="infoleft"><strong>Totaalkosten:</strong></div>
    <div class="inforight"><strong>[+totaalpermaand+]</strong></div>
    </div>
    <div class="ButtonGreen"><a href="#">Informatie aanvragen</a></div>
    </div>
    </div>
    </div>
    [/summarize_posts]

    https://www.ads-software.com/plugins/global-content-blocks/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP doesn't seem to parse…’ is closed to new replies.