Questions tagged [page-attributes]
The page-attributes tag has no usage guidance.
58 questions
0
votes
1
answer
23
views
Filtering with Attributes - how to display all non-queried products below query
I addded attributes to filter out products, based on their selection. For instance, I have field named 'tiled' as yes or no. If person ticks 'yes', all the products with the attribute of 'yes' are ...
1
vote
1
answer
211
views
Attributes array not saving values
I followed along with this stack overflow I got everything working except for the values saving in myTest attribute array. For some reason it's not and I've been stumped for over a week on it. Here is ...
1
vote
1
answer
114
views
Can this react script be optimized? How to make it faster
Rephrased the question on August 9th.
This is my first attempt to work with Wordpress blocks and also my first time working with React.
The code below adds the possibility to conditionally show blocks....
0
votes
0
answers
27
views
Automatic duplicate/copy of post to a related page in WordPress
I have a website about introducing softwares and apps. I created pages and so menus (named by categories).
I set my WordPress setting homepage to latest posts. I create posts and give them categories ...
0
votes
1
answer
40
views
Why is a renamed custom template file still showing up in the template dropdown menu?
I recently renamed a custom template file, changing it from template-programs.php to template-program-schedule.php.
In my template dropdown menu, Program Schedule shows up as expected, but Programs is ...
0
votes
0
answers
23
views
An excluded 'ghost' page is crashing my permalink
I am a SEO intern, and I'm having a problem with a wordpress page that I have to optimize.
So, I would like to make a better site structure, but when I am going to configure the permalink of the ...
0
votes
1
answer
315
views
Change the default blog post post attribute template name from "default template" to something else
I have found this filter which allows me to change the default name but this changes it for pages and posts. I just want to change it for posts. Is this possible?
add_filter('...
1
vote
1
answer
512
views
Sort CPT archive by order prevents sorting in admin
I've activated the Order feature for my 'portfolio' CPT and have managed to arrange my 'portfolio' posts according to respective Order values I've provided.
Unfortunately, I've found that this code ...
-1
votes
1
answer
701
views
Custom template not working for existing pages [closed]
I was playing around with using a custom template per page. (Because I need to load different post types per page).
When creating a new page, and link my custom template to it via Page Attributes, it ...
1
vote
1
answer
3k
views
How to add data- attribute to <body> tag
I need to add a data- attribute with a user-supplied value (via custom fields) to the tag of each page. I tried editing header.php as such
<body <?php astra_schema_body(); ?> <?php ...
1
vote
0
answers
357
views
How can I set different html lang attribute for different countries?
My WordPress theme header.php html language attitude
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
All page html language attitude :
<html lang="en-US">
...
0
votes
1
answer
2k
views
Remove Header and style.css from Specific Post template
I want to add some custom code so I've created a custom post file with the following content.
<?php
/*
* Template Name: Custom App
* Template Post Type: post, page, product
*/
?>
<?php ...
0
votes
0
answers
153
views
Custom post-type working except for Selecting page-parent
I created a custom post type in functions.php with these values (amongst others):
'hierarchical' => true,
'supports' => array( 'title', 'thumbnail', 'revisions', 'page-...
0
votes
1
answer
248
views
Force a specific template as default
[ EDIT: I'm using Chaplin theme as the parent theme ]
I'm working on a child theme and I need to set a specific template as default for all posts (there's no custom post types, just regular posts).
...
1
vote
1
answer
199
views
How to convert the WordPress meta box Page Attributes->Page Template dropdown to radio buttons?
I would like to be able to change the Page Attribute "Templates" dropdown to radio buttons, to allow me to have corresponding thumbnails next to them.
I have already removed and replaced the Page ...
0
votes
1
answer
2k
views
get_the_post_thumbnail() title and alt attributes not displaying
I am attempting to display 'alt' and 'title' attributes on a post thumbnail image, but the only attribute that actually displays as passed is 'class'. 'alt' and 'title' are missing. Any ideas what ...
1
vote
0
answers
104
views
How to list all WC products by their attributes values?
I wanted to get some advice on how to list all my inventory attributes values. I have this simple code that will output the products as plain text, But instead of the_title(); I want a list of all ...
1
vote
1
answer
844
views
Remove meta box for specific page
I'm trying to conditionally remove the 'Page Attributes' meta box for a specific page (or multiple specific pages). For example:
function remove_meta_boxes() {
if (is_page('contact')) {
...
1
vote
1
answer
674
views
I need a way to filter the titles in the page parent dropdown on the editor page
We are using custom breadcrumb titles for a hierarchical custom post type. We would like to have the page parent dropdown use the breadcrumb title if it is available and then the title if it is not.
-1
votes
1
answer
53
views
Page-parent field not appearing in editor [closed]
The drop-down of page parents doesn't appear in some sites as of upgrading to WordPress 5.0.+
-1
votes
1
answer
915
views
How to enable post types on Page Attributes?
How can I have post types shown on Page Attributes? For instance I have a custom post type which is product, and I want show it on Page Attributes alongside with the existing WP post types: page, post....
0
votes
1
answer
293
views
Wordpress function with attribute pass to template
really new to this stuff.
I basicly want to create a shortcode with an attribute that calls the function "playlist_code" which inserts a template with that attribute.
This is my code so far, I cant ...
0
votes
1
answer
183
views
Edit Parent page drop menu when creating a page
Please can someone tell me how to remove all items from the 'Parent' drop down when creating a page apart from a few items? (Loop through and remove all that are the ones I want).
0
votes
1
answer
1k
views
Wordpress Custom Post Type - Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
Edit: Now I've found that this is Hybrid Core, and apparently the template hierarchy is different. I still haven't solved my problem below though.
In addition to the title. My thinking is that if I ...
0
votes
0
answers
217
views
WordPress Page Attributes: Stop users changing the default parent
I want to restrict the parent menu in page attributes.
I have set a default parent using the below code:
add_filter( 'wp_insert_post_data', 'default_page_parent' );
function default_page_parent( $...
1
vote
1
answer
3k
views
Custom page type - template under page attributes?
I thought we can apply templates to custom page types:
You can't apply templates to custom post types in this manner. That
will show up only if the post type is 'page'
My code:
function ...
1
vote
1
answer
214
views
Can Page Templates be Applied to Archive and Post Templates?
If you're familiar with Wordpress, then you already know that Pages have an area to select a template while Posts do not. As well, archive.php and many other pages are handled by a default listing ...
1
vote
0
answers
74
views
How to use Custom Page Templates for hierarchical Custom Post Type
I added custom post type to my website.
function any_posttype() {
register_post_type(
'any',
array(
'labels' => array(
'name' => __( 'Any' )...
-1
votes
2
answers
4k
views
Change woocommerce product addons position in the product page
I need to change the product position of an addon called "misura anello" in the products (i use product add-ons plugin), i want to place it above the price, like the attributes...
i post to attach to ...
1
vote
1
answer
268
views
Why is the Page Template dropdown menu using the wrong file name?
This is strange.
I have a file, page_market.php, that is named "Market Main Page". It WAS being used when I chose that page template, but now it is not working at all. Instead, it looks like I'm ...
1
vote
1
answer
16k
views
Programatically added attribute, set to 'show on product page' automatically. Woocommerce [closed]
Ive written a script to import products to a new install of Woocommerce.
The products have attributes set up in the admin.
This bit of code adds the attributes on import.
update_post_meta($...
0
votes
1
answer
144
views
Templates list in "Page Attributes" metabox is inaccurate
This may be a simple fix but I've spent a few hours trying to resolve it already.
Template names that no longer exist are listed on the Page Attributes templates lists in the Wordpress Admin under ...
1
vote
0
answers
4k
views
Page attributes missing
(I searched if anyone has same problem but found nothing. So if this is a duplicate question please let me know)
My plan was to create a custome-page-template. So I found some tutorials and recognize ...
0
votes
1
answer
69
views
create template for one page
I want to create a one page template here and this is the content of page-contactWohnsinn.php:
hello world
So the php file only contains hello world and is stored in ...wp-content/themes/mytheme
I ...
0
votes
2
answers
3k
views
Removing or Restricting Access to Page Templates for Editor Role
I have a question about restricting access to page templates for blog editors who may create new pages in the future. During my buildout, I had to create specific templates to add custom features for ...
1
vote
1
answer
2k
views
Change Order of Admin Posts Depending on Meta
In my Admin Panel I have a custom post type of posts - with page attributes to define order. Is there "easy" way of changing how the admin panel pulls posts so I can reorder them?
Page Attributes ...
2
votes
1
answer
853
views
Parent page using wp_dropdown_pages and multiple post types
Is there a way to get wp_dropdown_pages to return a list of multiple post types (including custom) as options for parent_id? I have tried supplying array for 'post_type' but beginning to think its ...
0
votes
1
answer
640
views
Put an extra check box on "Page Attributes" widget
that will add lang="ur" attribute in page's main <body> tag. How I can do that? I try different plugin including polylang, but look not working. Please suggest plugin if you know or do some ...
0
votes
3
answers
600
views
Increment Page Order As Pages Are Created
In the Admin Panel, is there a way to hook into the page creation and increment Page Order number of each page or to be equal to the number of pages. Right now the default is 0 and when I make a new ...
0
votes
1
answer
266
views
JQuery multiple toggle values
I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template.
The below code displays ...
2
votes
6
answers
8k
views
How to disable Page Attributes dropdown in wp-admin
As discussed at WordPress admin screen very slow / timing out when editing or adding a new page/custom post
I am having a similar issue on a WP site containing 7,784 pages. Edit screens are slow ...
1
vote
1
answer
3k
views
How to remove the Template drop down, but keep Parent and Order
I am about to turn a custom Wordpress site over to a client and do not want them to be able to choose/edit Templates, but need to allow them to sort the pages with Order and choose a Parent page.
Is ...
0
votes
1
answer
1k
views
How can I limit page parent dropdown to show only author's own pages?
I'm trying to get the page parent dropdown (in page attributes) to show only pages that have been published by the author of the current page.
This doesn't seem to work :
add_filter( '...
0
votes
3
answers
5k
views
How to enable parent-child relationships and post attribute admin widget for posts
I want to be able to select a parent post when i create a new post. I assume it should be easy just to make the 'page attributes' admin widget to work similarly for posts too.
The use case is for ...
1
vote
1
answer
4k
views
Add Standard Page Attributes Metabox for Page Parent
I have a custom post type 'product' supplied to me by a Wordpress eCommerce plugin that does not offer the option to change the Page Parent in the Page Attributes Metabox. I'd like to remedy that.
I ...
0
votes
2
answers
5k
views
WooCommerce Layered Nav Widget [closed]
Has anyone used the "WooCommerce Layered Nav" widget.
I wonder if the attributes could be visible on the single product page?
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 ...
0
votes
2
answers
1k
views
Setting a default parent page
I have a site I'm putting together for a friend and I would like all new pages that are created to be the children of a set page (page id 495). I assume that I need to edit the meta-boxes.php file but ...
0
votes
2
answers
49
views
How to use the full page
I'm trying to figure out how to get rid of the whitespace on this page: http://www.seccbiblebowl.org/calendar/
I need the calendar to be full page. On the edit page screen, there's an option to set ...
0
votes
2
answers
3k
views
Set template for custom post type?
Is there a way to add the template selection dropdown to the custom post type? Perhaps under Page Attributes?