implenton
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Help with Variation display in cartHello,
I was wondering the same thing, then I dug a little deeper in the code:
If you are using 3.0+
Variation values are shown only if they are not found in the title as of 3.0.
This is because variation titles display the attributes.This is an actual comment from
woocommerce/includes/class-wc-cart.phpcomment from line 541-542Forum: Plugins
In reply to: [Duplicate Page] FiltersIf it is not a big problem please add a filter to the
post_meta_infosas well 🙂Forum: Plugins
In reply to: [Optimize your feed for feedly] SVG Upload Not Enabled in WordPressHello @noumaan,
sorry for the late reply.
You raised a good topic!
You are right about the SVG upload. WordPress does not support it by default. There is a long discussion about that here https://core.trac.ww.wp.xz.cn/ticket/24251.
It was a deliberate decision to include an input field first and the media selector under it, exactly for the reason WordPress does not allow it. Uploading the file via FTP might be a pain for some users. I believe you are right about this too.
I will consider your suggestion, until then I will update the plugin description to make it more clear the limitation around SVG and recommend the snippet you mentioned and also plugins to enable the SVG support.
Thanks, I appreciate your comment.
- This reply was modified 9 years, 7 months ago by implenton.
Forum: Fixing WordPress
In reply to: Double Posts in search resultsThat is fantastic 🙂
Forum: Fixing WordPress
In reply to: Double Posts in search resultsHello @fransin,
I don’t think it is related to the import.
You should check the search.php file if you have one, if not then the index.php file. I believe you have some repeating code that simply displays the content twice.
Forum: Fixing WordPress
In reply to: Related topicsHello @ivanko82,
you might want to consider adding the
s(Search Parameter) as an argument to the$argshttps://codex.ww.wp.xz.cn/Class_Reference/WP_Query#Search_Parameter
Please note that using the
sparamater works the same way as using the default search provided by WordPress – it searches in the content as well.It seems that there are ways to limit the search only to the title this might give you furher ideas:
http://wordpress.stackexchange.com/questions/11822/how-to-limit-search-to-post-titles/11826#11826
Forum: Fixing WordPress
In reply to: Warning: call_user_func_array() expects parameter 1Hello @rwvanleer,
with
add_action( ‘init’, ‘register_my_menus’ );you are calling theregister_my_menusfunction which is not defined – at least it does not appear in the code you pasted here.What you have to do is add the
register_nav_menusinto the function you specified:register_nav_menus( array( ‘primary’ => esc_html__( ‘Primary’, ‘cedargold’ ), ‘cgls’ => esc_html__( ‘Labs’, ‘cedargold’ ), ‘cgac’ => esc_html__( ‘Accountable’, ‘cedargold’ ), ) );like this:
function register_my_menus() { register_nav_menus( array( ‘primary’ => esc_html__( ‘Primary’, ‘cedargold’ ), ‘cgls’ => esc_html__( ‘Labs’, ‘cedargold’ ), ‘cgac’ => esc_html__( ‘Accountable’, ‘cedargold’ ), ) ); }Again it works correct in local environment, no warnings.
You might have different error reporting set on your local and live/staging site.
https://codex.ww.wp.xz.cn/Debugging_in_WordPress#PHP_Errors.2C_Warnings.2C_and_Notices
- This reply was modified 9 years, 8 months ago by implenton.
Forum: Fixing WordPress
In reply to: WP Insert PostMaybe we can try using https://gitter.im/wp-insert-post-duplicate/Lobby 🙂
Forum: Fixing WordPress
In reply to: WP Insert PostHello @disenorapido,
I think at this point figuring out the issue you have using the support forum is quite hard. I am willing to help you debug it using some kind of IM.
Forum: Fixing WordPress
In reply to: post_class(); usageHello @csjwp,
try replacing this part from your code
$terms = get_the_terms( $iso->ID, 'typologi' ); foreach ($terms as $term) { echo <div class="element-item . $term->slug"; }with this:
// get all the typologi terms from the post $terms = get_the_terms( $post->ID, 'typologi' ); // since get_the_terms returns WP_Term and you need only the slugs $terms_only_slugs = array_map( function( $term ) { return $term->slug; }, $terms ); // when multiple terms set make it a string $element_item_classes = implode( ' ', $terms_only_slugs ); // pass the string as an attribute echo '<div class="element-item ' . $element_item_classes . '">';Forum: Fixing WordPress
In reply to: two different links in post ?Hello @markuswedl,
the easiest solution for you problem would be using a custom field as a second link. https://codex.ww.wp.xz.cn/Custom_Fields
This articles gives you plenty of example using custom fields https://www.smashingmagazine.com/2009/05/10-custom-fields-hacks-for-wordpress/ and will also link to many more resources.
I hope you find this helpful.
Forum: Fixing WordPress
In reply to: Is get_posts search key always partial ?Hello @mstdmstd,
search not only matches the titles, but the content as well.
You can specify the
exact(to make it only match whole titles/posts) orsentence(to make it do a phrase search) to alter the search query. https://ww.wp.xz.cn/support/topic/how-to-search-phrases/This a good article regarding search in WordPress: https://premium.wpmudev.org/blog/build-your-own-custom-wordpress-search/
As a note:
Prepending a term with a hyphen will exclude posts matching that term. Eg, ‘pillow -sofa’ will return posts containing ‘pillow’ but not ‘sofa’ (available since Version 4.4).
Forum: Fixing WordPress
In reply to: Question about the loop and template partsHello @csjwp,
get_headerandget_template_partare very similar in nature; basically they include certain PHP files. Including files is convenient to organize your code in a better way or not the repeat the same code over and over.get_headerby default includes theheader.phpfile andget_template_part( 'file' )includes the file you specified, in my simplistic example thefile.php.You can “create” loops in the files which are included.
Forum: Fixing WordPress
In reply to: post_class(); usageHello @csjwp,
if you want to use the
post_classyou can apply a filter to it: https://developer.ww.wp.xz.cn/reference/hooks/post_class/and remove the classes you don’t need.
Here you can read more about filters: https://developer.ww.wp.xz.cn/reference/functions/add_filter/
You might also want to take a look at the
get_the_termsfunction it could be a starting point to write your ownpost_classfunction. https://developer.ww.wp.xz.cn/reference/functions/get_the_terms/- This reply was modified 9 years, 8 months ago by implenton.
Forum: Fixing WordPress
In reply to: WP Insert PostHello @luis Alberto Agea Duran,
it would be helpful to know in what context you are running
wp_insert_post? Are you calling this function after a specific action? Can you share more of your code?