presdec
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Help with some customization.Could a moderator please remove the link to the website on the first post.
Forum: Plugins
In reply to: List Category Posts qTranslateCompletely different plugin, but do u think you could help out with this?:
$ret = ''; if (is_array($posts)) { $ret .= '<ul class="wdpv_popular_posts ' . ($network ? 'wdpv_network_popular' : '') . '">'; foreach ($posts as $post) { if ($network) { $data = get_blog_post($post['blog_id'], $post['post_id']); if (!$data) continue; } $title = $network ? $data->post_title : $post['post_title']; $permalink = $network ? get_blog_permalink($post['blog_id'], $post['post_id']) : get_permalink($post['ID']); $ret .= "<li>" . "<a href='{$permalink}'>{$title}</a> " . sprintf(__('<span class="wdpv_vote_count">(%s votes)</span>', 'wdpv'), $post['total']) . "</li>"; } $ret .= '</ul>'; }
If like me you don’t have access to your Sql database, just re-download the plugin, unzip it. Open file allowphp.php and edit line 27 to read :
static $database_prefix = "allowPHP_functions";
delete the old, replace with the edited and refresh ur page ?? BINGO!
Forum: Themes and Templates
In reply to: Help with some customization.Thanks for the help
After some struggling, debugging like mad i managed to get a working code:
$categoryId = 7; $args = array('category' => $categoryId , 'post_status' => 'publish', 'numberposts' => 5); $posters = get_posts( $args ); if ( $posters ) { foreach ($posters as $post) { $imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "Full"); ?> <a href="<?php echo get_permalink($post->ID); ?>" title=""><img src="<?php echo $imgsrc[0]; ?>" class="thumbnail" width="130" height="130" alt='' /></a> <?php } }
I’ve made it into a shortcode [featuredposts category=7] and calling it lets me add the featured images of the latest 5 posts for a category of my choosing!
Forum: Themes and Templates
In reply to: Help with some customization.Had a look at your link and thank you for the time. With help from walter at webdesigndepot i’ve now got:
Still no love tho as i can’t figure out how to implement the php into the post, phpexec and similar plugins don’t seem to work for this, tho simple things like echo’test’; work fine.// fetching latest posts from specific category $categoryId = 7; $args = array('category' => categoryId , 'post_status' => 'publish', 'numberposts' => 5); $posts = get_posts( $args ); foreach($posts as $post){ $feat_image_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); $post_url = get_permalink($post->ID); }
Forum: Themes and Templates
In reply to: Help with some customization.<p style="text-align: center;">[slider_pro id="1"]</p> <h1 style="text-align: center;"></h1> <h1 style="padding-left: -30px; text-align: left;">Featured Posts.</h1> <h1 style="padding-left: 30px; text-align: center;"></h1> <p style="padding-left: 30px; text-align: center;">[dropshadowbox align="center" effect="curled" width="97%" border_width="1" border_color="#DDD" inside_shadow="false" ] ? ? ?? <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke.jpg"> <img class="alignnone wp-image-280" title="lucky-luke" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke-150x150.jpg" alt="" width="135" height="135" /> </a> <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke.jpg"> <img title="lucky-luke" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke-150x150.jpg" alt="" width="135" height="135" /> </a> <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke.jpg"> <img title="lucky-luke" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke-150x150.jpg" alt="" width="135" height="135" /> </a> <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke.jpg"> <img title="lucky-luke" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke-150x150.jpg" alt="" width="135" height="135" /> </a> <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke.jpg"> <img title="lucky-luke" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/lucky-luke-150x150.jpg" alt="" width="135" height="135" /> </a> ?[/dropshadowbox]</p> [wpcol_1third id="" class="" style=""] <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png"> <img class="alignnone size-full wp-image-300" title="wordpress-250x250" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png" alt="" width="250" height="250" /> </a> [/wpcol_1third] [wpcol_1third id="" class="" style=""] <a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png"> <img title="wordpress-250x250" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png" alt="" width="250" height="250" /> </a> ?[/wpcol_1third] [wpcol_1third_end id="" class="" style=""] <div class="art-box"><a href="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png"> <img title="wordpress-250x250" src="https://ariadneswonderland.gr/wp-content/uploads/2012/07/wordpress-250x250.png" alt="" width="250" height="250" /> </a></div> [/wpcol_1third_end]
The contents of the Homepage’s HTML if it helps.
I’d like to see a list of all available shortcode options/commands also. Apparently [fpg cat=”YOUR-Category-ID-Here” orderby=”title” order=”asc”] is doable, tho from the authors documentation it would not appear so. Personally i’m trying to get a different sized grid on my homepage to the one i’m using on all other pages.
Forum: Fixing WordPress
In reply to: Two different search bars, one stock one custom with bacground img.This solved my question nicely.