Questions tagged [page-attributes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Displaying Woocommerce Product Attributes on single product page

I would like to display woocommerce product attributes on the single product page, is this possible to achieve, if so how can i do it. Looking forward to your response. Thanks in advance.
user avatar
0 votes
0 answers
23 views

Submitting product attributes via Ninja Forms wordpress?

I have a wordpress website selling products. On the product page there is a button “Ask a question”, through which a pop-up form created on the basis of the “Ninja forms” plugin opens. There are ...
user avatar
  • 1
0 votes
0 answers
22 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 ...
user avatar
  • 103
0 votes
1 answer
30 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 ...
user avatar
0 votes
0 answers
21 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 ...
user avatar
  • 1
0 votes
1 answer
125 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('...
user avatar
1 vote
1 answer
125 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 ...
user avatar
  • 11
-1 votes
1 answer
231 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 191
1 vote
0 answers
159 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"> ...
user avatar
  • 11
0 votes
1 answer
1k 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 ...
user avatar
  • 15
0 votes
0 answers
65 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-...
user avatar
  • 13
0 votes
1 answer
79 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). ...
user avatar
  • 31
1 vote
1 answer
147 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 ...
user avatar
  • 13
0 votes
1 answer
964 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 ...
user avatar
1 vote
0 answers
90 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 ...
user avatar
  • 65
1 vote
1 answer
512 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')) { ...
user avatar
1 vote
1 answer
390 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.
user avatar
-1 votes
1 answer
45 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.+
user avatar
0 votes
1 answer
569 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....
user avatar
  • 324
0 votes
1 answer
180 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 ...
user avatar
0 votes
1 answer
151 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).
user avatar
  • 155
0 votes
1 answer
790 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 ...
user avatar
0 votes
0 answers
195 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( $...
user avatar
  • 155
1 vote
1 answer
2k 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 ...
user avatar
  • 324
1 vote
1 answer
205 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 ...
user avatar
1 vote
0 answers
67 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' )...
user avatar
  • 21
-1 votes
2 answers
3k 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 ...
user avatar
1 vote
1 answer
266 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 ...
user avatar
1 vote
1 answer
15k 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($...
user avatar
  • 113
0 votes
1 answer
141 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 ...
user avatar
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 ...
user avatar
  • 111
0 votes
1 answer
64 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 ...
user avatar
  • 101
0 votes
2 answers
2k 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 ...
user avatar
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 ...
user avatar
  • 19.6k
2 votes
1 answer
765 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 ...
user avatar
  • 151
0 votes
1 answer
577 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 ...
user avatar
  • 105
0 votes
3 answers
522 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 ...
user avatar
  • 19.6k
0 votes
1 answer
259 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 ...
user avatar
1 vote
5 answers
7k 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
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( '...
user avatar
  • 5,891
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 ...
user avatar
1 vote
1 answer
3k 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 ...
user avatar
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?
user avatar
  • 69
0 votes
2 answers
61 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 ...
user avatar
  • 911
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 ...
user avatar
  • 1
0 votes
2 answers
48 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 ...
user avatar
  • 113
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?
user avatar
  • 1,361
2 votes
1 answer
97 views

How to get a list of post types that "support" various things such as page-attributes?

When you register a post type you can pass an array of arguments that it "supports." (For example, "page-attributes," "author," "editor," etc.) I see that get_post_types has some args you can filter ...
user avatar