maujor
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Getting the pathCase someone needs detailed information:
<?php get_bloginfo('url); ?> //echoes absolute path to WP install itself
See: https://codex.www.ads-software.com/Template_Tags/get_bloginfoForum: Developing with WordPress
In reply to: theme translationHi moshu,
The link you pointed out explain in a clear way what to do.
But I’m doing something wrong here and can′t figure out how to fix it.
poEdit returns ‘Cannot find any file in the folder’ and so doesn’t populates the fields with english words to translate.
The theme I want translate is located at: C:\Inetpub\wwwroot\blog\wp-content\themes\blue-elegance-10
and this is the path I typed in poEdit Configurations.
Thanks for your kindness and I suspect that is hard for you to find the solution. I’ll try to fix it for myself in a couple of days.Forum: Developing with WordPress
In reply to: theme translationI did what Ryan’s article states using the pt_BR.mo file that I’m using for the main translation.
Made a copy of that file hosted at language folder and put the copy on themes folder (and also on mytheme folder) and it didn’t works.
The authors theme doesn’t provide a file.po for his theme.
According Moshu I must generate a specific PO file for the theme.
Can anyone point me a resource or tutorial explaining how to generate it. I’ve poEdit in my machine.Forum: Developing with WordPress
In reply to: styling root pages diferentlyHi HandySolo,
It appear that I wasn’t clear in my question.
I want stylize the navigation menu for the pages (on the sidebar) in a different manner for the root pages, not the pages itself.
Say: links for single pages will be red text and for root pages blue text.
Give only a way to assign a class for LI that encloses the link for root pages and I will stylize.Forum: Fixing WordPress
In reply to: Changing the #more-ID anchor for Read more… linkHello filosofo,
Plugin option works like a charm, ??
Thanks for share.
———————————————
For further information, sharing with others:
The plugin code:
<?php
/*
Plugin Name: more_replace
Description: Replace de #more-ID anchor by #post-ID anchor.
Author: Filosofo
Author URI: https://www.ilfilosofo.com/blog
Plugin URI: https://www.ads-software.com/support/topic/72388?replies=2#post-378516
*/
your code here...
?>Forum: Plugins
In reply to: CSS for a single postHi moshu,
Hello davidchait,Great thoughts! Problem solved! Thanks a lot.
—————————————————–
Lets add some items more:
1-)[quote=davidchait]First, note that CSS gets cached. ….).[quote]
Yes, I do agree tottaly. But, I’ll have not a few customize posts, I’m talking for 100+ posts, and styles sheet for 100+ pages into a single style sheet wow!!! will be a nightmare and a big one ??2-)[quote=davidchait]Second, the ‘conditional’ solution can…).[quote]
Interesting way for walk across, I do not test it because:the link pointed by moshu www.ads-software.com/support/topic/27073?replies=29
put the light over the question.
In that thread Ryan answering a question, told he had developed a Plugin named Custom post template. Few PHP lines, in a smart fashion that works like a charm not only for posts (the subject of my search) but for categories too.
——————————————————
Further explanations
For others members and future references for the same subject I’d like add some explanations:After installed and actived the Ryan’s plugin to customize the post, e.g. ID=27
1- make a copy of single.php and name it single-27.php;
2- on single-27.php replace<?php get_header();?>
by<?php include 'header-27.php'); ?>
;
3- make a copy of header.php and name it header-27.php`
4- customize header-27.php and you are ready to go.Each post id=# must have their single-#.php/header-#.php
For category customization see comments inside Ryan’s plugin.
Hello forum moderators: if the further explanations above are confusing (sorry for the poor english) feel free to edit or throw away. ??
Regards
Forum: Plugins
In reply to: CSS for a single postHi moshu,
Thank you for your kindness suggestion.
Sorry! single.php is used for all single posts.
This template call the posts header via<?php get_header(); ?>
If I put the link calling my custom style sheet into that header.php, i’ll load irrelevant css in all posts.Let me do a comparison with javascript:
Using javascript
When you need a javascript script working in one single post you must:- create a js file containing the js function;
- link to that file in the header.php;
- call the js function into the
<body>
of the post where you want the function working
For CSS isn’t a way for call the style sheets in the
<body>
So the problem is: How to customize a header.php for a single post. (not a page – this is easy).
I suspect that this is not possible to achieve with the actual WP tools/templates.Forum: Plugins
In reply to: CSS for a single postIf I’ve understood what you point out, this solution will load irrelevant CSS (the rules for one page only) in all pages of the blog. Is this?
Forum: Fixing WordPress
In reply to: Catch the total number of posts in the whole BlogThank you pizdin_dim ??
Works great!Forum: Fixing WordPress
In reply to: Category page to display list of posts onlySolved!
Change de if loop for this one:
<?php
$posts = get_posts('numberposts=100'); /* display 100 posts per page */
foreach($posts as $post) :
setup_postdata($post);
?>
<div class="post">
.....................
<?php endforeach; ?>Forum: Fixing WordPress
In reply to: Category page to display list of posts onlyHi all,
Thank you! Great post!
Based here I’ve created a template that display a custom category page.
I’m having the following problem:
I had have set up in the WP control panel a maximum of 5 posts displaying in the Blog’s pages.
I can’t figure out how to show all posts in the custom page instead of the default 5 last posts.
I’m using a category-#.php template.
The custom page showing 5 posts (there is 25 and increasing!) is hosted at: https://www.maujor.com/blog/category/todasMany thanks for any help
Forum: Installing WordPress
In reply to: How retrieve the <?php wp_title(); ?>Hello,
The function ‘'get_the_title()'
‘works great.
Many thanks