New answers tagged

0 votes

Serving Images from subdomain in wordpress

You can fetch images (All types of media Items) that are hosted somewhere with a plugin External Media without Import By using this plugin you don't require to upload media items to your wp site ...
user avatar
1 vote
Accepted

Get wordpress installation folder

You don't need to do this. As long as your site URL in Settings is set to mydomain.tld/wordpress you don't need to include /wordpress in your rewrite rules. If you look at the rewrite_rules option in ...
user avatar
1 vote
Accepted

Create page (not the post type) dynamically

You need to register a 'rewrite endpoint' using add_rewrite_endpoint(): <?php add_action( 'init', function() { add_rewrite_endpoint( 'play', EP_PERMALINK ); } ); Now, after ...
user avatar
0 votes

Url Rewriting a dynamic wordpress page with parameters

'^offer/([^/]*)/([^/]*)/?', Why do you have a question mark here at the end, that doesn't do anything here. You also need to add_rewrite_tag otherwise it will never work.
user avatar
  • 1
0 votes

flush_rewrite_rules() not working on plugin activation

What we need to do on plugin activation is this instead: delete_option('rewrite_rules');
user avatar
  • 484
0 votes
Accepted

Trying to add array of paths to post permalink

You shouldn't need to manually handle this with hooks & custom slug settings - just ensure hierarchical is set to true in your register_post_type arguments. You mention "CPT UI" settings,...
user avatar
  • 35.5k

Top 50 recent answers are included