Site logo

Archived topic

Help code" caja autor"

11 replies · Started by mogudasl on May 20, 2022

Viewing posts 1–12 of 12

Hello,

I have a code to put the author box in the entries.

I would also like the author box to appear on the pages and also for a link to an internal page of the web to appear from the name.

How would the modified code be in order to have these changes?

Thanks

Hi there,

you can create your own author box using the Block Element. This YT video explains:

https://www.youtube.com/watch?v=4x6CjGOyagc&t=9s

It's okay,

but it is not the solution that I was looking for.

Thanks,

I almost have it

How can I put it to be shown in posts and pages?

Which Hook are you using ?

The problem is that in the code it is limited by posts.

I send you the code

Hi moguldasl,

The code you’ve sent in the private information field only contains:

post_author;
?>

Can you try adding it through a code block instead as well? The code you're adding may also be causing issues with the layout of this thread.

Lastly, to have a better understanding of how we may best assist you, may we know what kind of Hook you’re using?

Hope to hear from you soon. :)

It is what I do not know how to replace this code with a code that is for pages and entries.

<?php 
      global $post;
       $author_id = $post->post_author;
   ?>

That code should also work for pages. To clarify, what are you referring to when you say entries?

Are these posts or archive pages?

If posts, that code should be applicable.

For archive pages, it wouldn’t be.

Also, how are you adding the code exactly? What hook are you using? What is the location in the display rules?

Kindly let us know. Also, code added in the Private information field messes with the thread. Can you try editing or deleting those? Or perhaps you can start a new thread? Kindly avoid adding code in the Private Information field.

Hello,

I have deleted the code that gave conflict,

Sorry.

And I have already found my mistake, the hook places it after_entry_content,

I change after_content y bualá,

It´s resolve

Thanks

I see! Glad you were able to resolve the issue!

This archived topic is closed to new replies.