-2

I've done some research, but can't find a solution.

I want the URL or my themes. For example:

example.com/atheme
example.com/btheme
example.com/ctheme

This is to make a drop down so anonymous users can view different themes, I have a multiside and it's a monumental headache with pluggins...so thinking of doing this manually...

My goal is to have users view different themes so they can choose what theme they want their website to be built upon.

I've seen something about it here:

https://developer.wordpress.org/reference/functions/bloginfo/

I have attempted to paste the code in a post with PHP insert pluggin:

   [insert_php]bloginfo ( string $show = '' ) [/insert_php]

But not working, how can I do this?

7
  • 1
    maybe you should explain better the context of the question. there is no such thing as a url of a theme, just url of theme files, so it sounds like you have some misconception about how themes actually work and being activated Jun 5, 2016 at 10:52
  • "url of theme files" then! I want users to be able to select a theme, and that would be based on URL, but the URL doesn't show, I thought maybe it's hidden? Jun 5, 2016 at 13:51
  • That you want a user to select a theme is understood. The missing part is what for. You should edit your question and fully explain what you are trying to do if you want a good answer. Jun 5, 2016 at 13:54
  • Do you mean select a theme for a new network site that they're about to create, or view the current site with a theme override, or something else? Can't you use the existing Admin site code to do this! It must browse to the blog with a theme override in query string params I'd guess.
    – Rup
    Jun 5, 2016 at 14:40
  • To Mark Kaplun: I added this to the post : "My goal is to have users view different themes so they can choose what theme they want their website to be built upon." Jun 6, 2016 at 3:34

1 Answer 1

0

Before Activation you can't able to get the theme url.

Here it's the functions that you can get the current / enabled theme url.

get_template_directory_uri();
2
  • THanks, but where do I put this code? And how? I what file, in a post as text? Jun 5, 2016 at 12:59
  • Can anybody tell me where to put "get_template_directory_uri();" ? Jun 7, 2016 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.