ioclaudio
Forum Replies Created
-
Forum: Installing WordPress
In reply to: How to ensure WordPress admin user has ID 1 when using WP-CLI?Hi,
yes, that’s true, perhaps the issue is related to the containers from the Helm chart, because even usingwp cli cache clearand similar commands, the problem persists.
Or it could be due to the fact that for MariaDB I’m using a three-node cluster, and when deleting tables from phpMyAdmin the nodes might not be synchronized.
I’ll see if I can isolate the problem.
Thanks for the response.Forum: Developing with WordPress
In reply to: Which is the template page for custom taxonomies?Hi,
I’ve added this in the taxonomy:'rewrite' => array( 'slug' => DIS_FAQ_TOPIC_TAXONOMY, 'with-front' => false ),and I’ve added DIS_FAQ_TOPIC_TAXONOMY in the post type definition, because it was missing:
'taxonomies' => array(
DIS_DEFAULT_CATEGORY,
DIS_DEFAULT_TAGS,
DIS_FAQ_TOPIC_TAXONOMY,
),where: define( ‘DIS_FAQ_TOPIC_TAXONOMY’, ‘dis-faq-topic’ );
now this works:
http://sitoict.local/dis-faq-topic/alumni
but this not:
http://sitoict.local/dis-faq-topicHowever it is not a problem because I need also the term in the url or as parameter.
Thank you very much.cld
Forum: Developing with WordPress
In reply to: Which is the template page for custom taxonomies?Hi,
thank you for your reply.
Yes, it is a classic theme.
I need a template for the page that shows all the FAQs that have the same value for the taxonomy dis-faq-topic.
For example: all the FAQs that has the category research.
If I use this url: example.com/dis-faq-topic/research/ which should be the name of the template ?
Thank you very much
Claudio B.
Forum: Fixing WordPress
In reply to: How to assign a localized menu to a localized location?Basically I would like to do this save from code:
Forum: Fixing WordPress
In reply to: How to assign a localized menu to a localized location?Rigth. I’m using Polylang in the free version.
Forum: Developing with WordPress
In reply to: Problem in translations timing in custom themeThanks to both of you for your suggestions.
Claudio
Forum: Developing with WordPress
In reply to: Problem assigning a custom template to a pageHi,
thank you for your answer.
I’ve solved. the problem was that the archive page of the content type was in conflict with the static page with the same name. Since I chosed not to use archive pages I’ve disabled them using the option
'has_archive' => falsein post type definition.
Claudio
@ravindra107 yes I could, but in this way they would be separate installations, I’d like to share the code but not the database. For example Drupal multisite allows this configuration.
Forum: Developing with WordPress
In reply to: Why the function get_posts returns the wrong post?It seems that this instead works:
if( ! function_exists( 'dli_get_content' ) ) { function dli_get_content( $slug, $content_type ) { $args = array( 'name' => $slug, 'post_type' => $content_type, 'post_status' => array( 'publish', 'draft' ), 'numberposts' => 1, ); $posts = get_posts( $args ); return $posts ? $posts[0] : null; } }You have to pass post_status, but I remember that before this code was working also without passing this parameter.
However it is not right that it returns the first object when it doesn’t find anything. Probably this is a bug.
Claudio
Forum: Developing with WordPress
In reply to: Why the function get_posts returns the wrong post?Hi,
this is the full function I’m using:
if( ! function_exists( 'dli_get_content' ) ) { function dli_get_content( $slug, $content_type ) { $args = array( 'post_name' => $slug, 'post_type' => $content_type, 'numberposts' => 1, ); $posts = get_posts( $args ); return $posts ? $posts[0] : null; } }I call this function in this way:
$page_check = dli_get_content( $post_name, EVENT_POST_TYPE );It doesn’t work either using ‘name’ or ‘post_name’ as parameter of the array.
Sorry, I don’t understand what do you need exactly.
Claudio
Forum: Developing with WordPress
In reply to: Best pattern to configure a site using a pluginHi @threadi thank you for your tips.
It seems a smart alternative, but I’m not sure I’ve understood well.
Do you add the same filter:
add_filter( ‘pluginname_add_settings’, array( $this, ‘add_settings’ ) );
to many classes, isnt’it?
But where do you call the apply_filters function ?
Thank you very much
Claudio B.
Forum: Fixing WordPress
In reply to: Tools to analyze compromised sitesIt was a snippet of code injected using the plugin WPCode.
It was added with an account that probably had a weak password.
cld
- This reply was modified 1 year, 10 months ago by ioclaudio.
Forum: Fixing WordPress
In reply to: Tools to analyze compromised sitesyes
Forum: Fixing WordPress
In reply to: Tools to analyze compromised sitesIt is a custom theme that we have into a private repository and it was modified two years ago last time.
The copy on the compromised site is the same on the repository.
Forum: Fixing WordPress
In reply to: Tools to analyze compromised sitesThank you for your help, I’m reading these documents.
I have just a curiosity.
Using a new brand container and a new WordPress core and replacing the plugins with the original version taken from the official repository, I still have this problem of the redirect.
That is, only when you visit the site the first time it redirects you to a malicious site.
So I wonder how they managed to “dirty” the site and where does the malicious code reside? Any ideas on where to look?
Thank you very much
cld
- This reply was modified 1 year, 10 months ago by ioclaudio.