![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Apr 2014
Posts: 171
|
Word Press template to page script question
Is it possble and exactly how would it be to add this on page rather than through theme template so it functions on page as well?
heres script in question as much as far as I can tell is needed from the template <h2 class="post-title">Videos selected for you</h2> <?php $args = array( 'numberposts' => 42, 'orderby' => 'rand', 'category__in' => array(782, 829) ); $rand_posts = get_posts( $args ); foreach( $rand_posts as $post ) : ?> <div class="post" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(240,180), array('alt' => get_the_title(), 'title' => '')); ?></a> <?php if ( get_post_meta($post->ID, 'duration', true) ) : ?><div class="duration"><?php echo get_post_meta($post->ID, 'duration', true) ?></div><?php endif; ?> <div class="link"><a href="<?php the_permalink() ?>"><?php short_title('...', '34'); ?></a></div> </div> <?php endforeach; ?> <div class="clear"></div> <?php } else { ?> <h2>Sorry, no posts matched your criteria</h2> <?php } ?> </div> whats needed and not needed to make this work on page.
__________________
Lollipopx.com Twitter @lollipopx_1, Tumblr lollipop-x, ICQ 669068563, Skype lollipop_130 Tell me your from gfy or i might ignore you. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jan 2011
Location: Somewhere in Germany
Posts: 817
|
Maybe this plugin is what you need:
https://wordpress.org/plugins/insert-html-snippet/ Second result on Google "WordPress insert html in pages".
__________________
I know, my english is bad. But your german might be even worse ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Apr 2014
Posts: 171
|
so far no luck.
tried a bunch of plugins and short codes but no good.
__________________
Lollipopx.com Twitter @lollipopx_1, Tumblr lollipop-x, ICQ 669068563, Skype lollipop_130 Tell me your from gfy or i might ignore you. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Industry Role:
Join Date: Aug 2014
Posts: 99
|
are you trying to use this code in a wordpress page?
__________________
![]() Adult-Wordpress-Theme.com Create Adult Tube sites based on Wordpress with Mass Video Embedder and Autopilot. $20 Discount code: GFY20 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Apr 2014
Posts: 171
|
Yes its word press
__________________
Lollipopx.com Twitter @lollipopx_1, Tumblr lollipop-x, ICQ 669068563, Skype lollipop_130 Tell me your from gfy or i might ignore you. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Industry Role:
Join Date: Jul 2015
Posts: 39
|
Might try SiteOrigin Page Builder.
__________________
Premium WooCommerce & WordPress Plugins $10/ea. or Free With Membership PluginForage.com |
![]() |
![]() ![]() ![]() ![]() |