Custom post type URL
You can set the rewrite slug when you register your post type: $args = array( ‘rewrite’ => array( ‘slug’ => ‘media/lajmet’ ) // other args… );
You can set the rewrite slug when you register your post type: $args = array( ‘rewrite’ => array( ‘slug’ => ‘media/lajmet’ ) // other args… );
WordPress as a content management system organizes pieces of data into categorizations. It calls any individual piece of data that it might manipulate or display a “post”, and any way to classify or organize that piece of data a “taxonomy”. But not every post is the same, and there are often groups of posts that … Read more
You dont have to make a post type Contact.Just make a dynamic sidebar in the Widget area of WordPress.And take the Text Widget in that Dynamic Sidebar , Copy your html and Paste it there in the Dynamic Widget Area you make. If you are not able to make the Dynamc sidebar Paste ths code … Read more
Typically when you want to create an extra representation or variation it implies extending URL a bit and treating that case differently. The easiest way in WP for that are rewrite endpoints. However the ease is relative you still need to handle with code the changes in a query and how to produce output. WP … Read more
In this situation I would use the page as a placeholder to configure the sidebars, even though WordPress will completely ignore it on the front end. Just add the page, make sure the slug is trainings, let the client set it up as they need, and then in your template: if ( $trainings_page = get_page_by_path( … Read more
Plugins that load the WordPress environment this way get rejected from the repository, as they are prone to failure in non-standard configurations. For something like this I would use the admin-post-$action to receive requests. The WordPress API will be available where you can check if users are authorized to perform specific actions.
You’re setting the HTML of the second drop down to essentially blank with: $(‘select[name=”second_dropwdown”]’).html(“<option>Sorry, no options</option>”); So when you enable it again, that’s the only option. Instead, you might try including that as an actual option within your select and then selecting it when disabling the second drop down. You could either include it in … Read more
You could try creating a custom post type for videos paired with a custom taxonomy that matches the personalities. Then you create the videos, categorize/tag them to the personality. Once they are tagged, create a template for the personality, write a custom WP_Query() that grabs your video posts filtered by the personality slug.
It appears to be because I was using the Advanced Custom Fields plugin, which has a seperate taxonomy option that was overriding the standard.
I just resolved this. Apparently, when you do AJAX calls to post edit pages in WordPress, or administrator, things work different and you don’t get the ID of the post you are editing. I read a lot of similar questions like this, but none of the solutions worked for me, but they gave me hints. … Read more