deinezauber
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Amazon affiliate, widgets and shortcodesBy the way, this is the snippet code I’ve added in my functions.php:
/* Activate widget shortcode execution */ add_filter('widget_text', 'do_shortcode'); /* Shortcode for printing Amazon links, depending on post category */ function printAmazonLinks(){ if(in_category('A')){ //Stuff related to category 'A' $widgetContent = ... } else if(in_category('B')){ //Stuff related to category 'B' $widgetContent = ... } else { //Default staff $widgetContent = ... } return $widgetContent; } add_shortcode('print_Amazon_links', 'printAmazonLinks');
Forum: Themes and Templates
In reply to: [Customizr] Amazon affiliate, widgets and shortcodesGood, for detecting a post category the WordPress API offers the function ‘in_category’; using this function it’s possibile to test for post category, including the HTML file with the Amazon links and having them displayed inside the widget.
Any other better idea?
Forum: Themes and Templates
In reply to: [Customizr] Amazon affiliate, widgets and shortcodesOk I think I’ve find out how to activate shortcode execution:
add_filter('widget_text', 'do_shortcode');
This PHP statement, saved inside my child theme functions.php, does the job; now I’m going to check how to detect post category…
Yes, also this one is working, thank you! Of course, the right rule will be chosen depending on my needs; at the moment they’re very specific for my category, maybe also the other writers will follow me if they enjoy the final result.
Thank you again for your support!
NicolaOk, I’ve asked to my brain to be more collaborative and I think I’ve completed both the tasks thanks to d4z_c0nf:
- added the rule
.single .category-grammatica .entry-header header{ display: none; }
that removes ONLY from post pages of a specific category (not from static pages, category pages or tag pages) the H1 title
- as suggested by d4z_c0nf, added CSS rules like
.single .category-grammatica h1 {…}
for modifying ONLY the style of a post page for a specific category of posts.
Thank you for your support!
NicolaAwesome, thank you d4z_c0nf!!!
I’ve applied the number (2) and it worked like a charm; about the number (1) I’d like to remove the H1 header only from the post page, i.e. the page that WordPress shows me when I ask for a post.
Pages, category pages and tag pages must remain the same.Thank you again,
NicolaForum: Themes and Templates
In reply to: [Customizr] RSS feed not updating?Ok, everything looks fine now!!!
NicolaForum: Themes and Templates
In reply to: [Customizr] RSS feed not updating?I think I’ve understood why I get this behaviour… I’ve added a hook to the event pre_get_posts for ordering my posts depending on their category but the same query is used also for retrieving RSS feeds; so I’ve now added a clause that excludes feeds to be affected by this change of ordering:
if ( !is_admin() && $query->is_main_query() && !$query->is_feed) {
I’m just waiting that my WordPress will refresh its feeds for checking the correctness of this issue.
Forum: Themes and Templates
In reply to: [Customizr] Search buttonYes, you were right!!! To be more precise, I added this rule:
.newsletter.newsletter-widget p { text-align: left; }
and now both search button and newsletter button are aligned on the left. Ok, I suppose I should do better than this but this website is just an hobby and I can’t invest so much time on it…
Good, thank you again for your support, bye!
NicolaForum: Themes and Templates
In reply to: [Customizr] Search buttonWell, I’ve tried several times to modify the newsletter form style and I can see them loaded… but Firebug clearly points out – with a strikethrough line – that they where somehow overridden.
Anyway, I’m stubborn and I’ll keep going on with it until I’ll defeat CSS ??
Thank you again for your support!
NicolaForum: Themes and Templates
In reply to: [Customizr] Search buttonHi d4z_c0nf,
thank you for your answers! Yes, I’m aware about the deep difference between the two forms but I was unlucky with changing the style of the newsletter form (there’s something that about CSS loading order, so my rules are overridden by the plugin ones…) and I turned to modify the search form button.
Ok, I’ll have a try then with your advice.Oh, thank you so much for noticing that problem about the third thumbnail… well, I’ve done it for reducing the round shape in the archive pages but I stupidly didn’t prevent this rule to take over also on the home page… I’ll repair my fault!
Thank you again,
NicolaForum: Themes and Templates
In reply to: [Customizr] Search buttonHi all,
I’m facing a similar problem because I need to align the search form button in the enter, instead of the current left position, without changing also the alignment of the input box; the difficulty here is that input box and button are inside the same DIV, so a trivial change in DIV content alignment will affect everything inside of it. Any suggestion?My website link is Il tuo giapponese.
Thank you,
NicolaForum: Plugins
In reply to: [Yoast SEO] 'keyword density is 0%'Hi Nick30,
with the help of Juliette from GitHub I’ve found out that this problem is likely due to the version of PHP; with PHP 5.3 the plugin is not working completely whereas with PHP 5.4.4 it’s working correctly.
I hope this can help also in your case.
Regards,
NicolaForum: Plugins
In reply to: [Yoast SEO] Yoast problem with my blogWith the help of Juliette from GitHub I’ve found out that this problem is likely due to the version of PHP; with PHP 5.3 the plugin is not working completely whereas with PHP 5.4.4 it’s working correctly.
I’ll ask to my hosting provider to upgrade the PHP version on my website.
I hope this can help someone else in solving this issue.Forum: Plugins
In reply to: [Yoast SEO] Yoast problem with my blogHi, same problem for my WP, I’ve opened a GitHub issue here:
https://github.com/Yoast/wordpress-seo/issues/703
I’m still waiting for an answer.
- added the rule