[Resolved] Rearranging elements (plugins) under single posts

Home Forums Support [Resolved] Rearranging elements (plugins) under single posts

Home Forums Support Rearranging elements (plugins) under single posts

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1163791
    Max

    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

    #1163905
    David
    Staff
    Customer Support

    Hi 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/

    #1163929
    Max

    Hi 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.

    #1164271
    David
    Staff
    Customer Support

    Is 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 hook

    4. 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

    #1164431
    Max

    Hi 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 selecting after 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: left

    Here 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?

    #1164791
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I think you should just be able to do this:

    [wp-post-author align="center" image-layout="round"]

    Let me know ๐Ÿ™‚

    #1164948
    Max

    Hi Tom,

    That worked – without the quotation marks though.

    Thank you both for your suggestions and solutions!

    #1165566
    Tom
    Lead Developer
    Lead Developer

    Glad we could help ๐Ÿ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.