WordPress Page Attributes: Stop users changing the default parent
WordPress Page Attributes: Stop users changing the default parent
WordPress Page Attributes: Stop users changing the default parent
in your code: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_locaiton’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); use this: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_location’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); In $labels variable name array value has different slug. I think this can be a problem. So, you … Read more
You can use set_query_var(‘playlist_id’, $tp_atts[‘id’]);. When you later call locate_template with $load = true, it will call load_template, which extracts the query variables making them global, and accessible to the template file (in this case, as $playlist_id).
A quick answer – post-type-switcher plugin below: https://wordpress.org/plugins/post-type-switcher/ Though it would be great without a plugin.
Turns out this was caused by the following custom theme filter in functions.php. Commenting out fixed the problem. function image_alt_tags($content) { global $post; preg_match_all(‘/<img (.*?)\/>/’, $content, $images); if (!is_null($images)) { foreach($images[1] as $index => $value) { if (!preg_match(‘/alt=/’, $value)) { $new_img = str_replace(‘<img’, ‘<img alt=”‘ . get_the_title() . ‘”‘, $images[0][$index]); $content = str_replace($images[0][$index], $new_img, $content); … Read more
Custom post-type working except for Selecting page-parent
You have to do a couple of things here… First, you have to create a duplicate of header.php and we’ll name it header-custom-app.php. Now modify the duplicated file and remove the HTML elements you don’t want. In your template, instead of using get_header(); you would use this: <?php /* * Template Name: Custom App * … Read more
An excluded ‘ghost’ page is crashing my permalink
Automatic duplicate/copy of post to a related page in WordPress
Submitting product attributes via Ninja Forms wordpress?