Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

We are trying to rethink how a blog is laid out, by using Tags as primary headers for each post, instead of Categories.

In order to do this, we have to set a Tag for the post as Primary.

So, we are trying to read the Tags as they are input into the Post Tags widget in the Post Admin, by using Javascript to read the AJAX output printed to the page. We have accomplished that part of the equation.

What we haven't be able to do, is then use document.write after printing the tags using .ready to another widget we created, so that the end user may select one of the Tags as primary.

For some reason, it does not seem to like the document.write statement and we're not sure why.

Any suggestions?

share|improve this question
    
Just to clarify, I want to get the tags BEFORE the user publishes the post. The tags don't exist in meta until publish, so we're trying to grab them from the AJAX display, so we can select one of them as primary, and have that become the "tag category" of the post. –  Tony Zeoli Oct 25 '11 at 16:36
1  
25% accept rate? Can you accept answers from any of your previous questions? –  Chip Bennett Oct 25 '11 at 16:41
1  
What do you mean by "set a Tag for the post as Primary"? What does that mean? Have you considered using hierarchical categories, or else using a custom taxonomy for your purposes? As-described, this sounds like trying to fit a square peg into a round hole. –  Chip Bennett Oct 25 '11 at 16:42
1  
I'm saying replace the concept of Primary Tag with Custom Taxonomy (that you could even call Primary Tag). That way, you can tag the post however you want, and then designate the "Primary Tag", via the custom taxonomy. Whatever you list in the custom taxonomy, you don't list as a Post Tag. –  Chip Bennett Oct 25 '11 at 17:11
1  
I'm going to compose my suggestion, and then move it into an answer, for further discussion. –  Chip Bennett Oct 25 '11 at 17:35

1 Answer 1

up vote 0 down vote accepted

Looks like someone on on of my listserves provided the answer:

He said to, "use innerHTML() within your ajax callback function. It looks like you're using jquery, so use the .load() function."

I checked on the jquery site and it said .innerHTML is .html in jQuery, so we'll go with that then and see if we can pull the AJAX data and print it somewhere else using that function.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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