If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I have a blog with 20 categories for 20 cities. Each city has its own page that will have content (photo and video galleries) and post listings for its blog category. I created the first one dynamically in template builder, but it looks like I’d have to choose which category I’d like to appear in that template.
Does this mean I’d have to create 20 nearly identical dynamic templates? Or is there a way I can utilize WordPress code like this in the dynamic template builder?
<?php query_posts('cat=14'); ?>
You can see the very barebones site at http://yourhotspots.com/test/ The city pages are under Episode Guides.
You could use a custom field to save the category id value: http://codex.wordpress.org/Custom_Fields
Actually some custom work on your end is required here and I can’t provide a working solution but the idea is to eg duplicate the blog element code in includes/helper-template-dynamic.php and to add a new element options field to includes/admin/register-admin-dynamic-options.php (based on the blog element) and then you need to the add the http://codex.wordpress.org/Function_Reference/get_post_meta function which overwrites the default category array.
That definitely points me in the right direction, Dude. I’ll work on a development server and see if I can get this to work (after ‘breaking’ it a few times, of course! haha).
Again, I appreciate it!
The topic ‘WordPress Code in Template Builder Section?’ is closed to new replies.