taghaboy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: HELP – how to shorten the_titleI’v find solution in https://www.wordpress-fr.net/support/viewtopic.php?pid=99796#p99796
and thanks goes to BertrandB21<?php function shorten_text($text, $length) { $shortened_text = substr($text, 0, $length); $shortened_text .= '…'; return $shortened_text; } if (have_posts()) : while (have_posts()) : the_post(); $title=the_title('','',FALSE); $shortened_title = shorten_text($title, 15); print $shortened_title; ?> <?php endwhile;?> <?php else : ?> <h2>Introuvable</h2> <p>Désolé, mais vous cherchez quelque chose qui n'est pas ici.</p> <?php endif; ?>
also for little code lover you can simply use this:
<?php $thetitle = $post->post_title; echo substr($thetitle, 0, 26); ?>…Enjoy
Forum: Fixing WordPress
In reply to: HELP – how to shorten the_titleany help please.
Forum: Themes and Templates
In reply to: Passing the_title variable or turning it into oneit help a lot;
thanks for sharingForum: Fixing WordPress
In reply to: How to modify user rights?Hi,
i dont understand really your question, but if you want :
– to let members to acces in some area of your admin pannel just use some plugin as Adminimize or Role Manager.
– to let members to only see some of your “private” Contents (for exemple to show to the custumer Sold/price, image, link, text…) just try to insert this code in the area you want:contents only appears up when the admin/user is logged in. < ?php if (current_user_can('level_10')){ /*if user is an admin, then make the correct link*/ ?> your content - price - link her... < ?php } /* end of if statement */ ?>
level_10 it’s for the admin only, so if you want to set different prices for each member category, you need only to change the User Levels range from 0 to 10 ( https://codex.www.ads-software.com/User_Levels )
This technics used a lot in the e-commerce website who provide diferent prices for diferent custumers.Hop i help you, and understand my english ??
Forum: Fixing WordPress
In reply to: Need very, very, basic 3 column to start design withHi,
I dont think that the theme you need, but you need some thing who can let you to edit the design of any theme, template, website you like in the fly, me too i have the some probleme to change the layout of a theme, but by chance i use the FireBug : Tools for web development, allow inspect, edit and monitor CSS, HTML and JavaScript live in any web page, it’s easy really easy to change any website in a second.
donwload her : https://www.getfirebug.com, and install the firefox to work with.
Hop i help.Forum: Fixing WordPress
In reply to: HELP – how to shorten the_titleHi thisisedie,
cause i’d like to short the title only in frontpage, and show the full in Read more.
My goal is how can i insert the <?php the_title(); ?>
in line 7 = ‘Your very long title blah blah blah‘Thanks
Forum: Fixing WordPress
In reply to: How to Generate contents@earner: her the complet code i use.
——Tips———-
And for users who want to use it, must download and learn Tablesorter Documentation, it better to let users parse and sort many types of data including linked data in a cell.
——————–<table cellspacing="1" class="tablesorter"> <thead> <tr> <td>ID</td> <td>Title</td> <td>Category</td> <td>Date</td> <td>Author</td> <td>Link</td> </tr> </thead> <tbody> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <tr> <td><?php the_ID(); ?></td> <td><?php the_title(); ?></td> <td><?php the_category(', ') ?></td> <td><?php the_date(); ?></td> <td><?php the_author(); ?></td> <td><a href="<?php the_permalink(); ?>">more</a></td> </tr> <?php endwhile;?> </tbody> </table>
________________
Forum: Fixing WordPress
In reply to: How to Generate contentshi again Evita,
the table work in the home page, but it dont work in the Page (it show only the lastest news data)???
is there a different loop structur between Postes and Pages?Forum: Fixing WordPress
In reply to: How to Generate contentsi’d like to note that this script it’s using under a table.php as a tempalte i attached with a page.
Forum: Fixing WordPress
In reply to: How to Generate contentsYes i Do, i just past the part i need, and this is the code with table tag:
<table> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <tr> <td><?php the_ID(); ?></td> <td><?php the_title(); ?></td> <td><?php the_category(', ') ?></td> <td><?php the_date(); ?></td> <td><?php the_author(); ?></td> <td><a href="<?php the_permalink(); ?>">Lire plus...</a></td> </tr> <?php endwhile; endif; ?> </table>
The result i have is only one line generated, especially the lastest news dada.
Thanks
Forum: Fixing WordPress
In reply to: How to Generate contentsmoshu, (with my respect to you, YOU NEVER PROVIDE A HELP TO ME IN MANY TOPIC I OPEN, YOU ONLY TALK… i hop you only provide a TIP it well be more easy to solve this amazing code who any board in the net provide a solution)
WHY DO I NEED TABLE?????
Cause i use the tablesorter with it, users can sort all news by Author, Date , or category…
THAT’S WHY I NEED THIS LINE TO BE GENERATED.
and i hop you provide help if possible, if not, it’s better do not writ nothing.Forum: Fixing WordPress
In reply to: How to Generate contentsHi Evita, and thanks for reply.
It display any error, it just print only the latest news (one line), and i want to display all the news data (ID, Title, Cat…) in lines.
That’s why i’d like to know to generate this line of table <tr>.
Thanks.Forum: Themes and Templates
In reply to: how to print things in <table> and skine it with csswhere are you moshu? i miss you.
Forum: Fixing WordPress
In reply to: Number each resulthi, hop some one have idea.
Forum: Themes and Templates
In reply to: how to print things in <table> and skine it with cssi need your help, please.