pvanbavel
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: executing generated shortcodesThnx. I hadn’t tried this before but this code works fine
<?php echo do_shortcode( '[Best_Wordpress_Gallery id="21" gal_title="Name of User"]' ); ?>BTW, the
[insert_php]shortcode does not work.I’ve now removed all code from the WordPress Page and put it into a template file. So executing PHP is no problem anymore.
However I still have a problem with my page and that is that the above solution is hardcoded.
The short-code string is correctly contained within
{{Best_Wordpress_Gallery}}
If a put{{Best_Wordpress_Gallery}}into a variable and put that variable into the below statement, things don’t work anymore.
What am I doing wrong?Following is the complete source:
<head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css"> <link rel="stylesheet" href="http://www.w3schools.com/lib/w3data.js"> <script src="http://www.w3schools.com/lib/w3data.js"></script> <script> var Artists = {"artiesten":[ {"Naam":"User-1","Discipline":"Schilderen", "Best_Wordpress_Gallery":"[Best_Wordpress_Gallery id=\"20\" gal_title=\"User-1\"]"}, {"Naam":"User-2","Discipline":"Schilderen", "Best_Wordpress_Gallery":"[Best_Wordpress_Gallery id=\"21\" gal_title=\"User-2\"]"}, {"Naam":"User-3","Discipline":"Schilderen", "Best_Wordpress_Gallery":"[Best_Wordpress_Gallery id=\"21\" gal_title=\"User-3\"]"}, {"Naam":"User-4","Discipline":"Schilderen", "Best_Wordpress_Gallery":"[Best_Wordpress_Gallery id=\"21\" gal_title=\"User-4\"]"} ]}; </script> </head> <body> <section id="index" class="w3-container w3-section w3-padding-small"> <nav class="w3-top w3-sidenav w3-sand w3-animate-left w3-margin-top" style="display:none"> <a href="javascript:void(0)" onclick="w3_close()" class="w3-closenav w3-large w3-pale-yellow w3-center">Close ×</a> <ul id="id03" class="w3-container w3-ul" onmouseleave="w3_close()"> <li class="w3-border-0" w3-repeat="artiesten" ><a onmouseclick="w3_close()" href="#{{Naam}}" >{{Naam}}: {{Discipline}}</a></li> </ul> </nav> <div id="rest" class="w3-container w3-rest"> </div> </section> <section id="Per Kunstenaar" class="w3-container "> <ul id="id04" class="w3-container w3-ul"> <li class="w3-border-0" w3-repeat="artiesten" > <div class="w3-container w3-center "> <h3 class="w3-container w3-margin-top">{{Naam}}</h3> {{Best_Wordpress_Gallery}} <?php echo do_shortcode( '[Best_Wordpress_Gallery id="21" gal_title="User-2"]' ); ?> </div> <div class="w3-container w3-center w3-margin-top"> <span class="w3-opennav w3-large w3-border " onclick="w3_open()">☰ Namenlijst </span> <!-- "☰" : Unicode code for menu hamburger --> </div> </li> </ul> </div> </section> <script type="text/javascript" charset="utf-8" async defer> w3DisplayData("id03", Artists); </script> <script type="text/javascript" charset="utf-8" async defer> w3DisplayData("id04", Artists); </script> <script type="text/javascript" charset="utf-8" async defer> function w3_open() { document.getElementsByClassName("w3-sidenav")[0].style.width = "20%"; document.getElementsByClassName("w3-sidenav")[0].style.display = "block"; } </script> <script type="text/javascript" charset="utf-8" async defer> function w3_close() { document.getElementsByClassName("w3-sidenav")[0].style.display = "none"; } </script> </body>The result should be a separate section per artist, consisting of his/her name, a small photo gallery and a “Namenlijst” (=’NameList’) button
Much appreciated if you could help me out.
Forum: Fixing WordPress
In reply to: Changing twenty-sixteenHi Beau,
One more thing.
When I comment-out thebuttonline and
implement the proposed css changes,
then
when I narrow down the width of the viewport to less than 910px,
I get a small vertical menu on the righthand side as well as a full width menu in the footer.What I want is my main menu horizontally positioned on the top of the page without ever disappearing.
So I do not want see the righthand menu, the “footer”-menu or the hamburger icon.Regards,
PaulForum: Fixing WordPress
In reply to: Changing twenty-sixteenHello Beau,
First of all thanks for your answer.
I couldn’t find the fragment you referred to.
The only place in (2016) header.php that hadbutton id="menu-toggle"in it was line 47, that reads:
<button id="menu-toggle" class="menu-toggle"><?php _e( 'Menu', 'twentysixteen' ); ?></button>I removed and reinstalled the theme 2016, but nothing changed compared to what I said above.
I commented out the “button” line but the effect still is that when the screen-width narrows down to less then 910 px the hamburger menu re-appears.
I hope you can help find the working solution,
Regards,
Paul
Forum: Requests and Feedback
In reply to: QA for new releasesHow do I find what is causing this message, because the nessage is only show the line number of the message function