WordPress display page information rather than post

I figured out a solution. It works, not entirely sure if it’s best practice but I queried the posts first and it seems to show up. Here’s my code; <?php query_posts(‘showposts=2’); if (have_posts()) : while (have_posts()) : the_post(); ?> I then closed the if statement with; <?php endif; wp_reset_query(); ?>

Add_Meta_box to custom page (formidable edit post)

Like this? <?php /* Plugin Name: Your plugin name Plugin URI: http://www.domain.com Description: Description Author: You obviously Version: 1.0 */ /** * Adds a meta box to the post editing screen */ include(‘meta_box/meta_box.php’); ?> meta_box.php <?php $post_id = $_GET[‘post’] ? $_GET[‘post’] : $_POST[‘post_ID’] ; $page_temp = get_page_template_slug( $post_id ); if ($page_temp == ‘template_name.php’) { function … Read more

calling pages instead of posts

This was already answered in the comment by Jack, but what you would do is add &post_type=page at the end of the WP_Query call. https://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters Your revised query call: $my_query = new WP_Query(‘showposts=”.$show.”&orderby= ‘ . $orderby . ‘&order=” . $order . “&post_type=page’);

I lost the link to my posts in my menu bar

I’d check/adjust the Menu (under Appearance, Menu; also usually within Appearance, Customize). Create a menu if not already there. Then add a “Custom Link” to the menu. The URL is your home page, the Link Text is something like “Home”. Drag that menu item to the spot on the menu (the vertical list of all … Read more

displaying one category on one page

If it works with is_home() then I think it is just a problem with your slug. Have you tried to check the is_page by it ID directly? Something like this should return /* * Returns true when the Pages displayed is either post ID 1, * or post_name “top-best”, or post_title “Top Best”. * Note: … Read more