Questions tagged [page-attributes]

The tag has no usage guidance.

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

How to return a specific attribute

The following returns the description return (new CSimpleField('product','data','description',null,null))->GetHtml(); I am trying to return a specific attribute named pa_color but it is not ...
  • 101
0 votes
0 answers
14 views

remove attribute page from woocommerce

i need to hide attributes & reviews pages, How to do this ?
1 vote
1 answer
54 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....
  • 11
0 votes
0 answers
43 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.
0 votes
0 answers
24 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 ...
  • 103
0 votes
1 answer
31 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
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 ...
  • 1
0 votes
1 answer
191 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
188 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 ...
  • 11
-1 votes
1 answer
269 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
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 ...
  • 191
1 vote
0 answers
195 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"> ...
  • 11
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 ...
  • 15
0 votes
0 answers
85 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-...
  • 13
0 votes
1 answer
106 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). ...
  • 31
1 vote
1 answer
164 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 ...
  • 13
0 votes
1 answer
1k 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
93 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 ...
  • 65
1 vote
1 answer
639 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
466 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
48 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
689 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....
  • 321
0 votes
1 answer
214 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
160 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).
  • 155
0 votes
1 answer
846 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
201 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( $...
  • 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 ...
  • 321
1 vote
1 answer
211 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
70 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' )...
  • 21
-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
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 ...
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($...
  • 113
0 votes
1 answer
142 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 ...
  • 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 ...
  • 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 ...
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 ...
  • 20.1k
2 votes
1 answer
793 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 ...
  • 151
0 votes
1 answer
596 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 ...
  • 105
0 votes
3 answers
548 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 ...
  • 20.1k
0 votes
1 answer
263 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
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 ...
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( '...
  • 5,991
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?
  • 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 ...
  • 921
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 ...
  • 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 ...
  • 113