Solved

add Dynamic Content Gallery to static page

Posted on 2011-02-15
7
596 Views
Last Modified: 2012-06-21
I want to add Dynamic Content Gallery to a static page but can't get it to work.  Any idea on how to do that?  I added the following line of code to the html on the page but it does not display.
<?php dynamic_content_gallery(); ?>

Open in new window

0
Comment
Question by:COwebmaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Expert Comment

by:thecrew
ID: 34899719
Wordpress will not allow you to use PHP in the HTML part of the editor unless you have a plugin to allow you to do so. That's why there are "shortcodes". I'll find the name of a plugin I've used in the past. Just a moment.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 250 total points
ID: 34899726
Hi COwebmaster,

You can't just stick that in a page via the Page Editor.  You have to edit your theme files and add it to the page template itself.  If that's not an option for you, you can attempt to use the Exec PHP plugin to make it work via the editor:

http://wordpress.org/extend/plugins/exec-php/
0
 
LVL 3

Assisted Solution

by:thecrew
thecrew earned 250 total points
ID: 34899766
I just re-read your question and I may have misunderstood your problem. Did you put that line of code in the actual HTML of the template file or in the HTML part of the page editor?

The name of the plugin that I've used to execute PHP in a page or post is "PHP Exec", it works just fine. I have also noticed that Wordpress does some odd things with the input from the HTML edit window, if you are finding problems there another good plugin that should solve that is called "Raw HTML capability", it forces WP to parse your HTML exactly how you put it in instead of adding the elements it thinks are missing.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:COwebmaster
ID: 34900002
I added in the line of code into the HTML tab on my static page.  It's not rendering though.  Are you saying that I need Exec-PHP plugin?
0
 

Author Comment

by:COwebmaster
ID: 34900186
ok, that worked, thx!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34900393
>> Are you saying that I need Exec-PHP plugin

Yes.  The HTML tab in the editor won't accept <?php ?> content at all without PHP Exec.

Just make sure you have VERY strong passwords on your accounts.  If a ton of people are creating content for you, you really want to rethink this solution
0
 

Author Comment

by:COwebmaster
ID: 34900432
ok, thx!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
warning code: class php incomplete message 6 31
Allow a tab area under the contents 1 24
HTML INPUT 6 17
aria difference 2 14
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question