If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
October 2, 2011 at 10:12 am #6173
When creating columns in the Template Builder, there are two options for page and post content:
– Single Page
– Post from category
If these options are selected, but no specific page or post is then chosen to be displayed, the default setting will display the LATEST post/page. How can I change the default so it is the CURRENT post/page? ie the post/page that I want to apply the template to.
Thanks guysOctober 2, 2011 at 3:43 pm #53155October 2, 2011 at 4:05 pm #53156
I know. I was going through the register-admin-dynamic-options.php and helper-templates.php this weekend. I managed to get the new options in the menus, but the changes I tried for the helper-templates didn’t work. I can’t make sense of all the variables. I thought I could use some of the code from the post/page template option (the one that doesn’t use columns), since that has a default current post option already set (‘self’), but the way the code gets the ids isn’t the same.
If Kriesi updates the code it would be really useful to have the following options in the column content selection:
Current post/page content – make this the default instead of the latest post.
Singe post – at the moment you can only choose a category.
There is a workaround for selecting a specific post in a column, but it involves making a separate category for every individual post (and I’m not even sure if that works), which isn’t very efficient, and also still doesn’t allow you to apply a template to several posts (a category) where you only want the content of one post to show (ie the post that you apply the template to).
Thanks for trying to help as always!October 3, 2011 at 6:27 pm #53157
thanks for the input, I will have a look at the idea ;)
sounds quite good…
KriesiOctober 3, 2011 at 7:22 pm #53158
If changing the default setting isn’t too complicated, could you post the php changes here please?
Thanks for your help!
:O)October 3, 2011 at 7:29 pm #53159December 21, 2011 at 6:59 pm #53160
i need to show the category post and the date on the top of the post image in a custom template with columm, wich file i have to mod?
I think that i have to insert in helper-template.php this code, how i have to do it?
//check if we should display post content
if(strpos($data, ‘post’) !== false)
$output .= “<div class=’entry-content’>”;
$output .= “—->>>POST CATEGORY—->>>POST DATE <h1 class=’post-title’>“.get_the_title().”</h1>”;
$output.= ” “.__(‘Read more’, ‘avia_framework’).”<span></span>“;
$extraClass = $extraClass.’_content’;
The topic ‘Change default setting for Template Builder column content (pages and posts)’ is closed to new replies.