0
votes
2answers
136 views

Pagination not working on Custom Page Template

I searched a lot on this but I can't figure out why my code is not working. I published a page with slug "blog" that uses a custom built template "page-blog.php" that I build from editing the ...
1
vote
2answers
39 views

How to display summary content from a Page (Not a Post) on another page

I created a Page called "About Joe" as a page in WordPress. Then on a different page (e.g. the homepage), I wish to display a summary which includes: a thumbnail the 1st paragraph link to page ...
0
votes
1answer
82 views

How to get current page nearest parent id?

I am trying to get current page nearest parent id not top-level. For example I have added page like this: Now If I am in Junior Design Award 2013 page I want to get his parent id 765 not top-level ...
0
votes
0answers
24 views

Unable to manipulate rewrite rules without calling flush_rewrite_rules() each time

I am trying to make a small portfolio website in multiple languages. Just a few pages (the actual blog doesn't need to be in multiple languages), mainly pages that are generated by a own-made plugin. ...
0
votes
2answers
51 views

How to get main menu only with wp_nav_menu

I have created one menu and have some sub-menu but I don't want to display any sub-menu from my template. My Menu code: <?php wp_nav_menu( array('menu' => 'header-uk', 'menu_id' => 'nav', ...
1
vote
1answer
84 views

Set if condition with wp_nav_menu

I have created one new menu and add bellow code in footer.php to display my menu wp_nav_menu( array('menu' => 'footer-cn', 'menu_id' => 'nav', 'menu_class' => 'ft-nav' )); Currently I did ...
0
votes
0answers
13 views

Wp query for custom template page [duplicate]

I want to create custom page template, which this custom page I am copy it from index.php. On index.php I have 3 columns ( 2 sidebar and 1 list content column). But on this custom page I plan to ...
0
votes
2answers
33 views

Unable to paginate a custom page query

I have this code on a page called Categories. <?php /* Template Name: Categories */ get_header(); ?> <section id="primary" class="content-area"> <main id="main" ...
0
votes
0answers
20 views

How to retrieve parent pages

I have this pages and all are parent of Media: Behind-The-Scenes: Commercial "I KNEW YOU" BEHIND-THE-SCENES RED Album Art 2012 - Rio de Janeiro, Brazil SPEAK NOW EXHIBIT 2012 Australia/New Zealand ...
0
votes
1answer
50 views

Toolbar Hidden in a Virtual Page

I am trying to create a virtual page, but my admin toolbar is not showing up. This is how I am creating the virtual page: functions.php add_action('init', function() { ...
0
votes
1answer
45 views

How to create single page site in WordPress

I have total 5 pages on my website, I want to display all pages as single page. It is possible? Example: http://yaremchuk.ru
0
votes
2answers
315 views

get contents and permalink from a specified page

below is a query where it supposed to get a contents from a page by a specified page title <?php $page = get_page_by_title( 'About Us' ); $content = apply_filters('the_content', ...
0
votes
3answers
76 views

Wordpress ultra slow if I click on posts?

I have 5000 posts on my website, which I have uploaded from a CSV file. This all went well and the website is fast on the back-end and frankly on any other page. There is one exception: if I click on ...
0
votes
1answer
110 views

Hierarchical List Pages as a table

I need to generate a list of all Wordpress Pages and have them display in a HTML Table, that will be printed for offline use. First column is Blank Second column will have the Page Creation Date ...
0
votes
1answer
372 views

wp_dropdown_pages with tax_query clause

I'm display a dropdown list of custom post types in wordpress. This first block of code uses WP_Query $houseQuery = new WP_Query( array( 'post_type' => 'house', 'order' ...
0
votes
1answer
403 views

Posts of specific category on page and excluded from index.htm

hope things are going well. I'm trying to create a member's only section specific for posts of about job opportunities. My goal is to have posts of this category displayed on this page and excluded ...
0
votes
1answer
161 views

How to extract images of post and pages excluding header and logo image in wordpress?

I have tried this code to get all images from media library and i am sucessfully getting the source urls of all the images but now i want to exclude all the unwanted images like logo, header images ...
1
vote
2answers
12k views

How to display page content in a page template?

In my WordPress site, I made a custom page template, which contained a custom query [using WP_Query()]. With that query, I can perfectly get the posts of a certain category. But I want to show the ...
2
votes
2answers
2k views

Next_posts_link() works only with original $wp_query

I've got custom template that I want to display paged blog posts. This is the beginning of my file: $wp_query = new WP_Query($args); if($wp_query->have_posts()){ ...
0
votes
1answer
150 views

Get next post when using pagination with WP_Query?

How do i specify which "page" to get when using WP_Query? I'm using pagination and i only display three posts per page, but i need to manually set which page to get, because Wordpress doesn't do that ...
0
votes
2answers
132 views

Determine if ID is page or post and query the ID

I want to look up a page id and determine if it's a page or post. Then query that id and display stuff like title, featured image, etc. This works for Pages: query_posts('page=' . ...
2
votes
3answers
394 views

What are the differences between “Latest Posts” and “Static Page”?

WordPress has an option to pick "Latest Posts" and "Static Page" under "Settings" in Admin Panel. My questions: What page template is getting loaded in each of those modes? Why paged stops working ...
0
votes
2answers
299 views

How to query for a page, get data, then query for child pages of that page

Basically, I want to query PARENT for a bunch of custom field data and echo it out. Then, I want to query all of the CHILD pages of that parent and echo out more data. What's the best way to do it? ...
1
vote
2answers
433 views

Single page theme that uses pages for the content

I'm making a one page site. On the page I want to run WP_Query three or four times to pull in those 3-4 pages. The page looks a bit like this: <div class="row"> <?php $args = array( ...
1
vote
1answer
173 views

Is there a reason why Pages are not publicly_queryable?

I am building a segmented search (by post type) with the ability to filter to a specific post type and realized pages were not publicly queryable. What I know I can do is the following: function ...
0
votes
1answer
301 views

Get list of all Grandchild Pages

I have the following page hierarchy, all of which are under a top page (TOP) with ID = 1: mid1 gc1 gc2 mid2 gc3 gc4 I would like to make submit WP_Query query that will return random pages ...
1
vote
0answers
73 views

Get page content by category or tag

I'm trying to sort of emulate the Views behaviour in Drupal with Wordpress, but doing it in theme templates. Now, I have pages that are assembled by using wp_query in the template to get posts ...
1
vote
1answer
414 views

WP_Query not retrieving by random order under parent

I currently have TWO subpages under parent page ID 43. Client testimonials.. Anyway. I have the random order thing in the query $args but the order never changes. What could I be missing? ...
-2
votes
2answers
196 views

Query page: preserve page formating

dose anyone know how to get this query (or a different query) to preserve the page formatting? Thanks <?php $my_postid = 663;//This is page id or post id $content_post = get_post($my_postid); ...
0
votes
1answer
370 views

How to get from sql query page id and retrieve it url and title

Conditions: Page have template, for example: /* Template name: News */ Explaining: We have many pages, and one page with assigned template (/* Template name: News */). I want on main page ...
0
votes
2answers
91 views

Custom query does not find pages

I don't consider myself to be a newb, I've had a loop of all the pages work before, but right now one of my custom loops on my page template (which is used as the index page of the site), will not ...
-1
votes
1answer
293 views

How to write short code with if else to get page_id?

<div class="group-training"> <?php while ( $page_loop->have_posts() ) : $page_loop->the_post(); ?> <div class="entry"> <h1><?php the_title(); ...
2
votes
2answers
843 views

Does Wordpress generate an automatic page for post formats?

I want a page to view only a specific post format (e.g. aside). Do I have to create my own page and run a custom query, or does Wordpress have an automatic page generated for me (like the ...
0
votes
2answers
538 views

WP Query and multiple pages

Can anyone tell me why this isn't working? Assuming two things here - 1. WP Query handles multiple page requests, and 2. doesn't need a reset because I'm creating a new WP Query. What happens is I ...
0
votes
3answers
5k views

Page template query with WP_Query

I'd like to query only pages with a certain page template with WP_Query or a function that would return the post object, but I can't find any information about that on the officiel codex.
0
votes
1answer
2k views

How to create a dynamic page based on form data with a plugin?

I have a form that users fill out. When they finish, they are redirected to a 3rd party site to set up payment options. After completing the payment process, they are sent back to my site with a ...
0
votes
1answer
92 views

Why doesn't my page know it's a page (won't return true for is_page())?

I have a page with the slug blog. Mysite.com/blog correctly renders from the template file page-blog.php. However, it does not execute footer code from my theme that's conditioned on is_page('blog'), ...
2
votes
1answer
623 views

Page queried instead of a custom taxonomy

When I try to get an archive for a custom taxonomy, WP searches for a page and doesn’t find anything. The Setup My code from the functions.php: add_action( 'init', 'register_store_taxonomy' ); ...
0
votes
1answer
481 views

Using wp_list_pages() after calling query_posts()

It's possible that I'm just doing this wrong, so feel free to let me know how you would solve this problem. I have a mostly page-based site, but there are a few "pages" where my content is coming ...
0
votes
1answer
139 views

Page displays content from different query?

How can I reset all variables in order to get the actual page content? I keep getting the last post's content I've called from a news-box I've implemented - but need the actual page's content .. ...