Help Creating Placeholder Image in Shortcode?
-
Hello, I’m using NextGen Plus for my image galleries since I wanted the tagging functionality for my images. However, when you use their tagcloud function, it only offers up a list of words that is replaced by images when you click on a tag. I want the two side by side – the list of tags AND the thumbnails at the same time. Envira has this option in a lovely way, but I didn’t want to make the switch and pay extra for their Gold label. (Also of note that my theme, ThemeX, doesn’t seem to support NextGen’s tagcloud formatting with larger size words for more-used tags, but I don’t care much about that anyway…), I just want it to do more than they offer.
So, after much digging through the forums, I’ve somewhat established a work-around cobbled together from other people’s attempts to have a menu alongside the images they pull up stay on the same page.
I installed a PHP widget, Samsarin PHP 1, so I am able to use PHP in the widget area.
The code I put there is:
<ul class="galtags"> <?php global $wpdb; $results = $wpdb->get_results('SELECT * FROM wp_terms INNER JOIN wp_term_taxonomy ON wp_terms.term_id = wp_term_taxonomy.term_taxonomy_id WHERE taxonomy = "ngg_tag" ORDER BY name ASC'); foreach ($results as $row) { echo "<li><a href=http://apps.hudsonvalley.org/runaway-art/galleries/?gallerytag="; echo $row->slug; echo ">"; echo $row->name; echo "</a> </li> "; } ?> </ul>I then inputted this widget on a new blank page called “Galleries”. I did this using the Widget Shortcode plug-in to be able to use this widget as shortcode anywhere and not just in a widget area. (I also tweaked the style on this in my CSS since I didn’t love the formatting, I’ll share that if you care).
Then, in a second column next to this column on the new Galleries page, I added the [ tagcloud ] where the images would load, as formatted through the NextGen in-edit button.
Everything works fine, the column of tags is there on the left. And once you click on a left tag, the thumbnails appear in the right column (body) of the page. Yay!
EXCEPT, it’s when you first click on the page, found here – http://apps.hudsonvalley.org/runaway-art/galleries/ – that things are clunky.
The tag list is there on the right as I want. But in the main column, there’s another tag list that duplicates the first one in an ugly, confusing, unnecessary way. So there’s two tag lists when I only want one.
Is there a way I can replace the tag list in the main body with a placeholder image without getting too deep into coding (I really don’t know how to do this very well and appreciate plug-ins and shortcode etc when they exist!!!)
I would love for there to be something, anything – an image from my galleries – in that space UNTIL someone clicks on a left link, and THEN the appropriate thumbnails arrive. Is there any way to do this?
And here is the code I have on the Galleries page itself at this point that is calling these two lists:
Explore student art galleries arranged by year, school, and runaway slave ads [column type="1/4"] [do_widget "Samsarin PHP 1"][/column] [column type="3/4" last="true"]<img class="ngg_displayed_gallery mceItem" src="http://apps.hudsonvalley.org/runaway-art/nextgen-attach_to_post/preview/id--2521" data-mce-placeholder="1" /> [/column]Your help is appreciated; thank you!
The topic ‘Help Creating Placeholder Image in Shortcode?’ is closed to new replies.