Questions tagged [page-attributes]

The tag has no usage guidance.

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

Multiple Variable Product Attribute Values In Woocommerce [closed]

Good day! Tell me where to look (maybe there are ready-made solutions?) There is an attribute "Size" which is used in creating variations. Must add European size and American. But if we add ...
1
vote
0answers
14 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
0answers
5 views

Get Product Attribute link

i am trying to get attribute shown in product page by using the following code global $product; $artist_name = $product->get_attribute('artist'); But it only get the attribute name but not the ...
0
votes
1answer
25 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
0answers
17 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
1answer
27 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
1answer
30 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
1answer
82 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 ...
0
votes
0answers
15 views

How to add attribute value in Sale label when there's sale in Woocommerce?

I have an attribute called "discount" and I would like to present it in the Sale label on the product http://prntscr.com/qgskb5 This is the code that I have used for printing custom sale label ( ...
0
votes
0answers
49 views

Replace wp_get_attachment_image with lqip image size

I created the image sizes as follows, add_image_size( 'size-260', 260, 0, false ); //260px Original add_image_size( 'size-260-landscape', 260, (int) round( 260 * 0.7 ), true ); //260px Landscape ...
1
vote
0answers
56 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
1answer
90 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')) { ...
0
votes
0answers
78 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
1answer
39 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.+
0
votes
1answer
183 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
1answer
67 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
1answer
97 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
1answer
427 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
0answers
136 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
1answer
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 ...
1
vote
1answer
59 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
0answers
57 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
2answers
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 ...
1
vote
1answer
252 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
1answer
12k 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
1answer
136 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
0answers
3k 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
1answer
60 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
2answers
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 ...
0
votes
1answer
1k 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
1answer
678 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
1answer
443 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
3answers
418 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
1answer
246 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 ...
1
vote
3answers
5k 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
1answer
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 ...
0
votes
1answer
898 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
3answers
4k 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
1answer
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 ...
0
votes
2answers
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
2answers
59 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
2answers
950 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
2answers
46 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
2answers
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?
2
votes
1answer
92 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 ...
5
votes
4answers
9k views

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

I'm new to the site but appreciate any help you can give. I have a WordPress set-up which (rightly or wrongly) has hundreds of pages and thousands of another custom post type which is also based on a ...
0
votes
2answers
451 views

Add a custom meta box for client to order CPT posts how they want

Im looking for a way to add a custom meta box to a custom post type that will allow the user/client order the posts to show up how they want on the site. Is this possible? Basically using a very ...
0
votes
4answers
2k views

Wordpress 3.2 - removed ability to select a page template in the page attributes when adding a new page?

Maybe it's just the site I'm running but has the 3.2 update removed the ability to select a page template in the page attributes when adding a new page? It's kinda essential unless anyone knows a way ...
1
vote
1answer
5k views

How to get the order attribute of a page

As we know we can sort pages in a query by their page order attribute, I can't figure out how to get this number to use it for a conditional and the max number listed Thanks,
3
votes
1answer
4k views

Best way to arrange custom post types by Attributes -> Order metabox value?

I have my front page setup to display a custom post type via: add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) { if ( is_home() && false == $query->...