first thank you for this wonderful plugin which makes life lot easier.
until i spotted the following behaviour
It could be a misbehaviour in the plugin, maybe some char utf8-ish configuration issue, some security issue thingy or misunderstatement from me.
so when duplicating a post which contains the ampersand character &
in post_title, then in the duplicated post the ampersand character is encoded.
e.g.:
original post title “cool & the gang”
duplicate post title “cool & the gang”
which for me, is not a super exact duplicate.
this is caused by the usage of wp_kses_post
.
in this line: https://plugins.trac.www.ads-software.com/browser/post-duplicator/tags/2.32/includes/ajax.php#L20
found some similar issue on another topic of WordPress here: https://github.com/WordPress/gutenberg/issues/20490
—-
Plugin Version: Version 2.32
WordPress Version 6.4.3
[20-Dec-2023 10:45:30 UTC] PHP Warning: Attempt to read property “post” on null in /home/myuser/public_html/wp-content/themes/enfold/shortcodes/spiderfly-elements/page_title.php on line 53
[20-Dec-2023 10:45:30 UTC] PHP Warning: Attempt to read property “post_title” on null in /home/myuser/public_html/wp-content/themes/enfold/shortcodes/spiderfly-elements/page_title.php on line 53
Is there any solution to this?
]]>I tried this:
add_action( 'the_post', 'un_post_filter' );
function un_post_filter ( $post ) {
if ($post->post_type == 'page' && $post->post_name == 'mypage') {
$category_name = get_query_var ('category_name');
if (! empty ($category_name)) {
$category = get_category_by_slug($category_name);
$post->post_title .= ": " . $category->name;
$post->title = $post->post_title;
}
}
According to documentation and scarce examples of using action the_post this should change values and changes should be visible in HTML.
Changes on the $post are applied as expected, but HTML still shows unaltered values.
What I am doing wrong?
]]>Since May 18, the title – [newsletter:post_title] – no longer appears in the subject of the daily newsletter send with Mailpoet.
I have already deactivated (almost) all plugins to see if one of them shoots across, but that didn’t help. There is no error message in the log.
Does anyone have any ideas as to what could be causing this?
First of all: I just installed your plug-in and I think it’s great. Finally a filter plug-in with free support for custom meta fields. However, one of those custom meta fields contains a post-object. Fortunately the filter can handle an object as it can extract and display the ID of the related post. I would rather display the post_title than the ID. I guess that would require just a bit of coding. To avoid to break your code I would like to know what hook and variables to use. I found this topic:https://www.ads-software.com/support/topic/acf-select-field-support/
Is this the hook I can use?
BTW, I will definitely rate your plugin as soon I have completed the configuration
]]>any hints for me to add this to the single-product-title?
thanks!
]]>Notice: Undefined variable: post_title in /app/web/wp-content/plugins/ultimate-responsive-image-slider/layout.php on line 332
Seems to be related to:
Error on testing site, undefined
I fixed it by moving the assignment of $post_title outside of the if condition.
---
.../plugins/ultimate-responsive-image-slider/layout.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/wp-content/plugins/ultimate-responsive-image-slider/layout.php b/web/wp-content/plugins/ultimate-responsive-image-slider/layout.php
index 2bcfeb6..b9af0cd 100644
--- a/web/wp-content/plugins/ultimate-responsive-image-slider/layout.php
+++ b/web/wp-content/plugins/ultimate-responsive-image-slider/layout.php
@@ -224,8 +224,10 @@ document.addEventListener("DOMContentLoaded", function(event) {
/* Custom CSS */
<?php echo $WRIS_L3_Custom_CSS; ?>
</style>
+<?php $post_title = get_the_title( $post_id );?>
<?php if($WRIS_L3_Slide_Title) { ?>
-<h3 class="uris-slider-post-title"><?php echo $post_title = get_the_title( $post_id ); ?></h3>
+
+<h3 class="uris-slider-post-title"><?php echo $post_title; ?></h3>
<?php } if($TotalSlideIds>0){ ?>
<div id="slider-pro-3-<?php echo $post_id; ?>" class="slider-pro">
<!---- slides div start ---->
--
]]>So, here’s my situation:
I have a pod called Error Code, that has a custom taxonomy Error Code Category which includes a relationship to a page. I use this to link to a custom page depending on the category of the error.
In the template I’m using this code to display this
List with other codes can be found here: <a href="{@error_category.related_list.permalink}" target="_blank" rel="noopener">{@error_category.related_list.post_title}</a>
This has been working well until I created a extended page type with no extra fields (reasons for this below in case there’s another solution to achieve this). Since I did that, post_title is empty and doesn’t give any results back. Other fields like ID or post_name still work.
Do I need to put something else than post_title ? As a workaround, I’ve added an extra field and c/p the title which works but I would like to use post_title.
Background on why I made an extended page type: In another post, I wanted to display the content of a page as a whole with a short code which I achieved by adding this.
[pods name="page" id="<ID of the post>" field="post_content"]
It didn’t work if I put post instead of page and for page to work I needed an extended page type.
]]>Whenever I try to pull the posts:
<?php
$recent_posts = wp_get_recent_posts(array(
'numberposts' => 4, // Number of recent posts thumbnails to display
'post_status' => 'publish' // Show only the published posts
));
foreach( $recent_posts as $post_item ) : ?>
<p><a href="<?php echo get_permalink($post_item['ID']) ?>"><?php echo $post_item['post_title'] ?>
</a><br/><?php $post_date = get_the_date( 'd.m.Y' ); echo $post_date;?></p>
<?php endforeach; ?>
I end up with messed up titles as long as the post title contains special chars like ??ü.
I had no luck with preq replace. Not sure if I did anything wrong.
So how could we get rid of this stupid special chars and replace them with html entities?
]]>