Hi,
Not directly, no. You would have to program a class that extends the widget I think.
But I don’t understand the problem you have. There might be a better solution.
Can you share the link to your website and state the problem?
I am currently working on a password protected staging environment.
Perhaps I have not expressed myself clearly enough.
My problem is the following:
I would like to have the Realted Posts at the end of my posts. However, I am using another plugin that inserts social sharing buttons also at the end of the post.
Now it is so that your plugin inserts the related posts directly after post end and the social sharing buttons come afterwards. But I want the related posts to be at the very end.
With a Generatepress element, I can place the related post PHP code the way I like it. However, this does not display the title that I can enter in the settings.
That’s why I asked if the title can also be output with PHP.
For better understanding here is a screenshot:
Screenshot
If you are putting it in the template file, you could simply have:
<?php echo '<h3>Related Posts</h3>'; ?>
I assume it is more complex then?
The whole block for the content filter should start with this:
<div class="related_content" style="clear:both;">
When you look in the inspector, what do you see? Is there something as an overlay?
You can check the inspector by hitting F12, or by right-clicking and selecting “Inspect Element’, then select the Console-tab.
It does make giving support a bit harder, not being able to see it myself π
Yes, it is more complex. Because if I insert a simple output, this output is also displayed on posts that have no Realted Posts added.
If I insert it automatically, the title will be displayed only if Related Posts have been added as well.
The following PHP code I used:
<?php global $related; echo $related->show( get_the_ID() ); ?>
and it only inserts me the following:
Screenshot
There is no overlay or something.
Only the
list is inserted, without <div> and <h3> title.
I don’t want to open my test environment and I don’t want to post a password here.
I could email you if you want to check?
-
This reply was modified 1 year, 4 months ago by dieter93.
Does this work for you then?
<?php
global $related;
$related_posts = $related->show( get_the_ID() );
if ( $related_posts ) {
echo '<h3>Related Posts</h3>';
echo $related_posts;
}
?>
I just borrowed it from the content filter. You could borrow more if you need or want.
https://plugins.trac.wordpress.org/browser/related/tags/3.2.0/related.php#L413
This works – thank you very much for that!
I can work with it π
Really a good plugin and thanks for your good and fast support.
A good review will follow.
Thank you very much.
How can I send you a coffee? π
You’re welcome π
You could donate a bit through paypal if you want and have that. My email there is marcel@timelord.nl
By bank is possible too, contact me then on that email address.
Coffee is on the way π
Thanks again
Thank you too π
Have a good weekend already.