- This topic has 7 replies, 3 voices, and was last updated 4 years, 2 months ago by Tom.
-
AuthorPosts
-
February 13, 2020 at 2:08 am #1163791Max
Hi there,
I am using the latest WP version and GP Premium.
I recently installed two plugins:
1.) footnotes
2.) WP Post Auhtor.They are currently being displayed in the wrong order – so the references appear underneath the author box.
While I know how to style them via CSS I do not know how to rearrange them (change the order).
Could you help me with changing the display order?Thank you in advance and best wishes
February 13, 2020 at 3:57 am #1163905DavidStaffCustomer SupportHi there,
it looks like both those plugins are filtering the_content() function.
Options are :
1. Speak with those plugin authors to see of they have an option to change the priority in which their code is called.
2. If they provide a Shortcode or PHP function method of displaying their output then you can add them using a Hook Element. Where you can set the priority for each of them.
https://docs.generatepress.com/article/hooks-element-overview/
February 13, 2020 at 4:40 am #1163929MaxHi David,
1.) I will open a support topic but the possibility of getting a response within the next months for almost any plugin is quite low, unfortunately.
2.) Could you give me some details? Perhaps I might be able to look for the code myself within the php files of the respective plugin.
February 13, 2020 at 8:15 am #1164271DavidStaffCustomer SupportIs the WP Post Author Plugin?
https://wordpress.org/plugins/wp-post-author/If so it provides this shortcode:
[wp-post-author]
So you can do this:
1. Create a new Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/2. Add
[wp-post-author]
as the content.3. Select the
after_content
hook4. Check Execute Shortcodes
5. Set the Priority to
5
6. Set your Display Rules.
This should move the Author box below the Footnotes – but still above the post meta
February 13, 2020 at 10:16 am #1164431MaxHi David,
Thank you for the suggestion. That is indeed the correct plugin. And your solution works – kind of. It does paste the plugin unterneath the references but underneath the post’s meta as well .
By selectingafter entry content
I was able to move it above the post meta. The display rule for the hook is: Posts only.
The problem is: Now there are two instances of the WP Post Author box – one which is being affected by the settings in the backend (round image etc.) and which stays in the original position and the one I added via shortcode which remains unaffected by the settings. It seems they use the same CSS selector.
In the backend it says:The shortcode <?php echo do_shortcodes(‘[wp-post-author]’); ?> is mainly designed for WordPress single post author and author page.
———————————————————————————
Edit: I saw in the settings that you cannot have both: Either the shortcode or the settings enabled. It is possible, however, to use some parameters on the shortcode, e.g.Options: align
Available values: left, right or center
Default value: leftHere is a screenshot of the page.
But honestly, I would not know how to add those values to the shortcode. Underneath it says:
You can configure and use the shortcode for .php templates and functions with appropriate attribute values. The output will only visible on single post and single author page.
Does that mean I need to know php in order to modify it?
February 13, 2020 at 8:18 pm #1164791TomLead DeveloperLead DeveloperHi there,
I think you should just be able to do this:
[wp-post-author align="center" image-layout="round"]
Let me know ๐
February 14, 2020 at 2:22 am #1164948MaxHi Tom,
That worked – without the quotation marks though.
Thank you both for your suggestions and solutions!
February 14, 2020 at 9:50 am #1165566TomLead DeveloperLead DeveloperGlad we could help ๐
-
AuthorPosts
- You must be logged in to reply to this topic.