How to change post template

The way I see it you have two options here: Pass the id to a custom template and then create a custom wp_query loop and use $_GET[‘id’] as the id of the loop. For Example: <?php /* Template Name: Pop Up View */ //get id from your url $id=$_GET[‘id’]; //start custom loop $query = new …

Read more

How can I locate the single buddypress forum post template? [closed]

Even if I’m also not quite sure if this question is related to bbPress or BuddyPress, locating (plugin-) template files might always be the same: An easy approach might be to call the body_class() in a file which is definitely active (like header.php). The output will look something like this: class=”forum-archive bbpress archive post-type-archive post-type-archive-forum …

Read more

Custom SINGLE page with custom metaboxes and custom template

Simlified function, maybe will help someone: jQuery(document).ready(function($) { $(“#page_template”).change(function() { if($(‘#page_template’).val() != ‘page-contacts.php’) { // show the meta box $(‘#postdivrich’).show(); } else { // hide your meta box $(‘#postdivrich’).hide(); } }).change(); }); Of course it lacks controls what fields will be submitted, because jQuery just hides them. As I am coding it for one-admin user …

Read more

What is the point of using the front-page.php template? [closed]

You would use the front-page.php template because it allows to have custom content and layout for your website’s static front page. You can edit content on your static front page from inside the WordPress admin if the front-page.php template contains the the_content() template tag or similar. It really depends on what your content and presentation …

Read more