Find php file anywhere in folder and subfolder from template
Find php file anywhere in folder and subfolder from template
Find php file anywhere in folder and subfolder from template
Here’s a random thought. query for ALL pages, but exclude the parents. Something like this maybe? query_posts( array( ‘post__not_in’ => array( 2, 5, 12, 14, 20 ) , ‘post_type’ => ‘page’, ‘orderby’ => ‘rand’ , ‘posts_per_page’ => ‘3’ ) );
If the code you posted above is all of your file contents then Yes you are missing something! you just created a new page template but it’s empty, you need to tell WordPress what to display, and usually its done using the loop and a few other template tags add this code to you a.php … Read more
you need to get the ID from wp_insert_post and make sure you exit or die so: $pid = wp_insert_post($new_post); wp_redirect( get_permalink( $pid ); die(); As for the second part you can use the WordPress Template Hierarchy and simply name each one of your custom post type designs as single-{post_type}.php for example if your post type … Read more
I would think that in the admin panel there would be fields for each area. I don’t get this part, could you elaborate?. Overall this sounds like a custom page templates to me. You can create templaets in advance, but assign them to pages via admin rather than hardcode slig/id match in template name.
WordPress includes a plethora of conditional tags that can be used in lieu of specific template files. For example, if you wanted to avoid using date-based archive template files, you could use something like the following in index.php: <?php if ( is_archive() ) { // This is a date-based archive if ( is_year() ) { … Read more
One way to make the Log In page your landing page is to go to Dashboard > Settings > Reading and find: Front Page displays ( ) Your latest posts (x) A static page Select your “home page” (which will be the Log In page) and your blog page appropriately in the drop down menus. … Read more
The short answer: there isn’t a way to control what shows up in that dropdown list, there are no filters available for it. Hopefully that will change in a future version. A possible solution would be to create your own meta box that lists templates from your own array of templates appropriate for the current … Read more
As has been mentioned, your way works, but there are some ways you can decouple the form from the template, allowing more flexibility. The Shortcode API allows you to create a shortcode for your form, so you can simply enter something like [my_form] in the page’s content, then within the function that handles your shortcode … Read more
In your order.php you will need something like this: $step = (isset($_POST[‘step’])) ? $_POST[‘step’] : ‘one’; switch ($step) { case ‘one’: // do step one break; case ‘two’ : // do step two break; case ‘three’ : // do step three break; } Your form, of course, has to send the appropriate arguments. I used … Read more