Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
0 answers
524 views

Use a custom page with dynamic content as a user profile page

I'm trying to create a website with fully customised user profile pages. I've created the page which uses dynamic content to pull user custom fields into it, this works fine to view your own profile ...
jonnylucas's user avatar
0 votes
2 answers
559 views

Add custom template 'sub-page' to Custom Post type?

I have a custom post type called 'Inspections' Doing this, you can access an inspection record by going to example.com/inspections/inspection-slug-here However, I want to add some 'sub-pages' if you ...
Barry Chapman's user avatar
0 votes
1 answer
18 views

Displaying posts inside table having issues

I am trying to create a comparsion table like the attached image. But it was not working like in the image. for that i have done following code what i am getting is not like the image for example the ...
James Paul's user avatar
0 votes
0 answers
201 views

Custom post types & Pages hierarchy - Error 404

I've defined two custom post types: Theme Fiche I've also 7 pages using a defined rubrique template: (template-rubrique.php) Both my Theme and Fiche have an ACF post-object field. The Theme ACF ...
Quentin's user avatar
  • 15
0 votes
1 answer
33 views

How to pass page as an argument like post in WordPress?

I am using this code to pass arguments in posts: $args_automobile_just_launched_bike = array( 'posts_per_page' => 3, 'post_type' => 'post', 'order' => 'DESC', '...
Shriram's user avatar
  • 23
-1 votes
1 answer
531 views

How do delete a meta key?

Unlike the rest of the platform for some reason, there is no apparent way to simply modify a meta key where it lists them for a given page. I created a meta key as a means of testing, but I can't find ...
John Joe's user avatar
0 votes
1 answer
266 views

Output Post with ACF Fields into other Post

I got a post that should be embeded, included or outputted - however you call it - into another post. I prefer a solo code variant. So far I have tested various shortcode plugins - but they don't ...
mogio's user avatar
  • 115
1 vote
0 answers
241 views

Advanced Custom Fields dynamic update_field

I have a function that is triggered when a new review is submitted on a specific page. function rex_my_action ($review, $post_id) { $some_value = get_post_meta( 753, 'rwp_user_score', true ); ...
user2812779's user avatar
0 votes
0 answers
382 views

Add and Custom category for posts "PAGE"

I want to create custom category page for posts "PAGE" for an internal use. The categories will be the list of the clients I want to remove somes fields (like slug, description, parent category ...
Samuel's user avatar
  • 354
0 votes
1 answer
697 views

"Virtual category page" based on a custom field filter

I am using advanced custom fields and want to display a page in the same layout like a category - with posts where the custom field has a specific value. I have no clue how to approach this ...
Alex's user avatar
  • 147
0 votes
0 answers
1k views

Custom protected password page with ACF

I need some help if it's possible. Each page of my website are protected with a password, i use protected password page. Page link : http://builder.depretz.com/onepage-hotel You can see the custom ...
Samuel's user avatar
  • 354
5 votes
1 answer
682 views

Custom Field in Featured image for A particular post

I have added a custom textarea to my featured image only to post, Using the following code. function add_featured_description( $content ) { global $post; $small_description = get_post_meta( $...
Prifulnath's user avatar
0 votes
1 answer
366 views

Load one page with parent and child pages

Given I have a pretty long page and I don't want the user to insert content in the back-end all at once. More specifically, this given page is made of several sections (I'm actually using fullPage.js) ...
Diogo Bento's user avatar
-1 votes
1 answer
2k views

How do I add custom fields to the "Edit page" admin screen?

I'm writing a plugin to add a set of custom fields to the "edit page" admin screen, using Custom Meta Boxes 2 plugin. That's what I wrote so far: <?php /** * Plugin Name: foo Page Banner * ...
ifthenelse's user avatar
3 votes
2 answers
854 views

How can I show drafts in wp_dropdown_pages list?

I am using wp_dropdown_pages in the backend of my site to generate a list of pages according to a specific set of criteria. The list only shows published posts where I would like it to show both ...
yyyyyyyyyyyyyyyyy's user avatar
0 votes
1 answer
61 views

Page template is missing fields or is invalid when I updating the template

I am trying to update a page template, and when I do something strange happens. Let me explain.. I have a template "Hat Size Guide" where the code file is /themes/my-theme/pages/page-hat-size-guide....
Nick Rolando's user avatar
5 votes
2 answers
1k views

Having different sidebar content for MANY pages?

I am continuing on from a topic I already posted but with a different angle. Please bare with me as I try to provide as much information as possible. I am looking to add a simple text area called "...
Nimara's user avatar
  • 161
0 votes
1 answer
95 views

Loop through two different sets of custom fields

I created a Custom Field ('custom_name') to allow content editors to specify a 'custom_name' (different from the title of the page) to any post created: custom_name - (Field type --> 'text') For a ...
John's user avatar
  • 125
2 votes
1 answer
16k views

Create a full width responsive header image per page

I’m new to Wordpress - currently building a site that has a few pages (Home, Artists, History, Videos). Each of those pages need a custom header containing a responsive full width image (the image ...
John's user avatar
  • 125
0 votes
0 answers
100 views

Define an extra field for all pages (with no plugin?)

I usually use WP Types define custom fields, post types, ... But I have a theme a little bit overloaded of plugins, so I would like to define this field for (all) the pages in functions.php if ...
Toni Michel Caubet's user avatar
0 votes
1 answer
87 views

Calling Specific Pages with wp query Part II

I'm making one page website and I added a custom field on "Page" post type that asks "Use this page as a section:" Yes or No(with dropdown). I called all pages on template-onepage.php(custom template) ...
Hussy571's user avatar
0 votes
1 answer
160 views

Injecting pre-defined text from custom page template to editor

I am creating a custom page template: < ?php /* * Template Name: sliding content * Description: Sliding category contents */ get_header(); ?> <div id="primary" class="content-area"> ...
ccot's user avatar
  • 149
1 vote
2 answers
4k views

How to "group" (categorize) the Pages together?

I have a lot of Pages which can be (need to be) grouped under a number of different Categories. ** Then the more important thing is, i need to control those pages (of different groups) programatically ...
夏期劇場's user avatar
0 votes
1 answer
200 views

Why is wp_list_pages altering $post->ID of the page?

So I have a template that is used for all pages in a section that has this script to create a menu based off children: <?php if($post->ID = 142) { $children = wp_list_pages("...
Kukulza's user avatar
2 votes
2 answers
2k views

add_meta_box Callback not being called

I created my first plugin last week that makes a custom post type. As this worked, I copy pasted the code I already had and modified it to be a different post type. For whatever reason however, the ...
Aidan Knight's user avatar
0 votes
1 answer
1k views

Price comparison table based on Custom Post Type?

I have created a review site where clients can rate their hosting providers based on various factors, however since the launch, many have asked if it would be possible to create a price comparison ...
Aidan Knight's user avatar
0 votes
1 answer
38 views

Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?

I'm new to wordpress and I'm trying to make a field that either links to a page internally via a dropdown OR a text area for a URL. Obviously I don't want the button to have two destinations so I'd ...
Rambo8000's user avatar
  • 187
0 votes
1 answer
107 views

Display a different image for each page with editor

We have several PAGES (about us, contact, services, etc...) On each page, we have an area for an IMAGE. The IMAGE is located in the same location on each page. (lower right corner > above the ...
Ravi Ram's user avatar
  • 117
0 votes
0 answers
393 views

Using Post ID and Page ID in same function

I've written a function to display a custom sidebar, which is outputted as a sidebar. On some pages, I have a Custom Field called 'show_sidebar', which I can assign as 'false' on pages which I do not ...
Tom Oakley's user avatar
0 votes
1 answer
113 views

Custom Field select list is truncated

The site I'm working on has many custom fields being used in it's pages. For some reason though, the list of custom fields that you can pick from the dropdown only displays the first 30 field names. ...
Shawn H's user avatar
  • 701
0 votes
3 answers
2k views

get_post_meta() retrieves meta from a specific post on pages, not the page currently viewed

I am making a simple sidebar functionality to display embed video in the sidebar. I've created a meta field where admin should paste the embed video. It works as it should on posts, but on pages, ...
Bojana Šekeljić's user avatar
0 votes
1 answer
244 views

How to use page metadata while using wp_list_pages()?

I'm creating my pages links in wordpress, using wp_list_pages(). each link contains an <i> tag which displays retina icons. I want to set a different class for each link in order to display a ...
user avatar
0 votes
1 answer
968 views

Getting content from custom fields of different pages on a single page

I want to get content from one custom field of different pages along side their page titles and I'm using the following code: <?php $mypages = get_pages( array( 'sort_order' => 'ASC', ...
user1666698's user avatar
0 votes
1 answer
71 views

Decouple page name from page title

As far as I can see, the name of a page (in admin) is the same as the title for the page. In many cases you would want the page name to be something else to better grasp what it's about while ...
BoBoz's user avatar
  • 356
2 votes
3 answers
14k views

Add input field to 'Pages > Edit Page' through functions.php

Original Question: I'm trying to add an input field to 'Pages > Edit Page'. The use of this input field will be for a user to add an ID of a slider, so that that slider will be page specific. ...
Paxjah's user avatar
  • 81
0 votes
1 answer
379 views

Display selected parts from selected pages on the frontpage?

I'm build a site for my company and want to display four (of my choise) of our special deals on our frontpage. A special deal is a page. I want to grab: Featured Image Page Title Price (taking from ...
Andy-with-love's user avatar
0 votes
2 answers
329 views

Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)

I've spent a few days researching working with WP static pages - as separate from posts. Although I've found useful guidance, I can't seem to find any good tutorials or worked examples that show me ...
Paul Zee's user avatar
0 votes
2 answers
3k views

Hooking into the post editing screen for an existing page only

I am working on a Wordpress theme that hides the default WYSIWYG editor and replaces it with a custom module system which is fine and dandy, but I've come to the realisation if someone were to use the ...
Dwayne Charrington's user avatar
1 vote
1 answer
1k views

How to Display pages with a Custom Fields in one page

I am trying to display all the pages that have custom fields of a certain value. What I would like to do is use the current page title as the value for the custom field and get all pages that have ...
DigitalElise's user avatar
5 votes
4 answers
33k views

How to add add_meta_box to specific Page Template?

I want to add add_meta_box to specific page type like Page Template, Like Product Template. I am using this article http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/ ...
Ajay Patel's user avatar
0 votes
1 answer
108 views

Home page: using custom fields for posts and pages

in my home page I'd like to display some pages and posts title using the custom fields. Unfortunately my code prints only posts title. If there is a key "highlights" print the title. Here my code: ...
Ale's user avatar
  • 1
0 votes
2 answers
63 views

Can You Build Page Templates Without Extra Files

I'm very familiar creating page templates in WP and for this project I really just have one page template with an option to switch the sidebar from the right side to the left side. The problem is that ...
BFTrick's user avatar
  • 941
1 vote
3 answers
9k views

Calling custom fields for pages (not posts)

I'm trying to place a small code in my template header.php file. I want to get a custom field value. I'm trying to call custom fields from current page outside of loop, btw. I have no problem doing ...
RCorrie's user avatar
  • 23
0 votes
1 answer
242 views

How can I use custom properties to set different background on different pages?

The problem isn't that complex (compared to the description I'll write :)) but I'd like to do this as correct as possible (e.g. I could be doing it wrong with Home.php), so I'll give you the whole ...
Andrija's user avatar
  • 115
2 votes
1 answer
418 views

Populating a page with content from post custom fields

I'm doing up a blog at the moment where each post is accompanied by the name of a song. Adding the songs to the posts is fairly easily done via custom fields. However, I also need to have a page ...
snthr's user avatar
  • 191
0 votes
3 answers
3k views

I want Page titles and excerpts to show up on home.php in certain order

In the functions.php, I have the following code added: add_post_type_support( 'page', 'excerpt' ); This allows pages to have excerpts. The reason I want an excerpt is because I want to call only ...
micah's user avatar
  • 235
0 votes
1 answer
533 views

Custom Page Template [closed]

Could somebody help me make a custom page template? I'd like to have a basic page (with sidebars, header and footers) and a table for data. I'd like the data to be taken from custom fields. ...
Ambo100's user avatar
  • 149
13 votes
1 answer
28k views

How to enable custom fields for pages (if not a bad practice)?

My main page has a intro image beside the main content. I would like to add that image using custom fields. I've noticed that pages don't have. I would like to enable them. Is it a bad practice?
wyc's user avatar
  • 3,897