0
votes
0answers
54 views

Best way to execute custom page-specific mysql queries

I would like to query a secondary mysql database (not the Wordpress mysql database) with page-specific queries. I've seen many answers / tutorials on setting up a secondary mysql database, like: ...
-1
votes
1answer
13 views

The page that displays Posts on homepage

I want to know the page responsible for displaying the blog posts in WordPress. Where I can probably expect to find the SQL query and post rendering so I can edit some stuff by myself.
1
vote
3answers
110 views

How to echo excerpts with wp_list_pages?

I've tried to echo excerpts in wp_list_pages with the code below. It works, but only for one of the child pages. How would I echo the excerpt and title for each child page? <?php $children = ...
0
votes
2answers
37 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
3answers
743 views

Get wp_get_attachment_url outside of loop

I need to get the featured image outside the loop. This is so that I can have a different full-screen background image for each page, set by the featured image. After doing some research I was able ...
0
votes
1answer
44 views

Query pages based on tags

On a site that I'm working on I've added the ability to tag pages. These tags should then be used in a query to retrieve all associated pages of a tag. In my functions file - // Add tag support to ...
0
votes
1answer
63 views

Filter posts by author selected in page

I've inherited a Wordpress project, and my client has a new feature request. For a "portfolio" page template, they want to be able to select an author, which I want to add to the $args in my ...
0
votes
2answers
335 views

custom query for both category and pages using global $wpdb;

I have a custom query returning categories, but I also need to return some pages with a particular post ids. How would I add those? They obviously have no taxonomy and are page post types. Below is ...
0
votes
1answer
32 views

Show content if page is a grandchild of top level page

I'm looking to show a certain block of content if the current page is a grandchild of a top level page. This is my current page heirarchy; - Top Level Page - Child Page - Grandchild Page ...
0
votes
2answers
18 views

How to have more post in a page than in your home page

I am new to the world of WordPress. I own a new site and I'd like my home page to display the latest news and articles (which I accomplished to set in Settings > Reading), but I'd like another page to ...
1
vote
1answer
176 views

Loop after page content

I just upgraded to 3.4.2 from 2.9 (i know, i know, but if it ain't broke...) I have page templates that are (or at least were) set up to display the page content first, then start a loop of posts, ...
1
vote
1answer
196 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
990 views

Get all pages to display at once

I'm doing a theme that is supposed to be ease to create, but I have now reached a standstill and need to get past this. Is there a way to display/show all pages at once? Or can I create a custom ...
1
vote
1answer
371 views

How to retrieve attachments from child pages of a specific Page?

How would I retrieve attachments from all subpages of a specific Page ID? Example: SPECIFIC PAGE Child (with attachments) Child (with attachments) Child (with attachments) I'm currently ...
0
votes
1answer
236 views

Query specific Pages

I wonder if someone would know how to query specific pages (not by id), lets say I create a custom field called "product", and I would like to query all pages with that custom field. Any Help? Kind ...
0
votes
1answer
130 views

Prevent duplicate pages from being added

Im using this code to prevent duplicate post from being added but i also need to prevent duplicate pages too. Can Someone please help? function clearDuplicatePosts(){ global $wpdb; $prefix = ...
2
votes
1answer
1k views

[Plugin: Posts 2 Posts] How does it work?

I recently discovered Scribu's Posts 2 Posts plugin, which seems to be exactly what I was looking for in order to connect pages and posts for a big editorial website. But I cannot get it to work, ...
6
votes
4answers
28k views

Proper way to get page content

I have to get specific page content (like page(12)) I used that : <?php $id=47; $post = get_page($id); echo $post->post_content; ?> Work nice execpt for compatibility with qtranslate ...
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 .. ...