jerryskate
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Give pages truly unique id′s, classes, possible?Thanks again. Yeah, I’ve been in contact with the support, and hopefully they can help me out. Eager to fix these kind if stuff though, and yeah, feels like I’m getting close. And since it been hard to find any documentation on this by google, i thought it would be nice to find a solution here for future references.
I got the page class title with
<body <?php page_bodyclass(); ?>>
And this in functions.
function page_bodyclass() { // add class to <body> tag global $wp_query; $page = ''; if (is_front_page() ) { $page = 'home'; } elseif (is_page()) { $page = $wp_query->query_vars["pagename"]; } if ($page) echo 'class= "'. $page. '"'; }
Just need to make it output the class more unique.. for me to fetch a longer slug would work good.
Forum: Fixing WordPress
In reply to: Give pages truly unique id′s, classes, possible?Hi and thanks for the reply.
My problem first, is that the theme, or buddypres uses one template for all the pages i wanna change, and in unsure i can make custom templates for them, so i don’t think they have unique id′son the traditional way. Heres a link: https://abovebasics.com/community/members/jerry/
My goal is to have custom background images as the one you see in the link, so i ned a unique id for the tabs activity, profile, stats and so on.
Ok, thats what i was afraid of, since i don’t want to import the posts. I realize that this would be hard thing to do. Too bad. Great plugin though!
Well, i have a site with aggregated youtube clips, that opens in color box. i would love to be able to have a page, or category with the most viewed feed items.
Yeah this is correct. However, i realized 25 items is good enough.
Forum: Plugins
In reply to: [Infinite-Scroll] Wp Rss Agreggator and Infinite scroll not working.Problem solved. However killed my lightbox. Making a new thread about that.
Forum: Plugins
In reply to: [Infinite-Scroll] Wp Rss Agreggator and Infinite scroll not working.Anyone? Just cant figure this one out!
Forum: Plugins
In reply to: [Responsive Gallery Grid] Images auto-resize when page loadsNever mind, the float on the above did cause the problem.
Forum: Hacks
In reply to: link javascript and css correct.Thanks again for the reply. Not following though, theres no plugin except the scripts and the function to activate them. Probably sound dumb here, sorry for that. The script I’m using is this, placed in my js folder:
https://github.com/alvarotrigo/fullPage.js#fullpagejs
Im not really sure i need the external versions, but i can’t make it work without them, so far at least.
Forum: Hacks
In reply to: link javascript and css correct.Thanks for the reply. Still can’t get this to function. I do need to load the external scripts it seems to make the plugin I’m using to work.
Stupid question, but do i need to call the function/action in my header to make the scripts work?
Forum: Hacks
In reply to: display child pages with anchors working with full page.jsHaven’t been able to figure this out yet. If anyone wanna take a look at the code and give me some more pointers i would be very thankful. The parent div need to be a div classed “section” and the child need to be in a div class “slide” for the script to work.
<?php /* Template Name: One Page Layout */ ?> <?php get_header(); ?> <?php $options = get_option('sf_neighborhood_options'); $default_show_page_heading = $options['default_show_page_heading']; $default_page_heading_bg_alt = $options['default_page_heading_bg_alt']; $default_sidebar_config = $options['default_sidebar_config']; $default_left_sidebar = $options['default_left_sidebar']; $default_right_sidebar = $options['default_right_sidebar']; $show_page_title = get_post_meta($post->ID, 'sf_page_title', true); $page_title_one = get_post_meta($post->ID, 'sf_page_title_one', true); $page_title_bg = get_post_meta($post->ID, 'sf_page_title_bg', true); if ($show_page_title == "") { $show_page_title = $default_show_page_heading; } if ($page_title_bg == "") { $page_title_bg = $default_page_heading_bg_alt; } $sidebar_config = get_post_meta($post->ID, 'sf_sidebar_config', true); $left_sidebar = get_post_meta($post->ID, 'sf_left_sidebar', true); $right_sidebar = get_post_meta($post->ID, 'sf_right_sidebar', true); if ($sidebar_config == "") { $sidebar_config = $default_sidebar_config; } if ($left_sidebar == "") { $left_sidebar = $default_left_sidebar; } if ($right_sidebar == "") { $right_sidebar = $default_right_sidebar; } sf_set_sidebar_global($sidebar_config); $page_wrap_class = ''; if ($sidebar_config == "left-sidebar") { $page_wrap_class = 'has-left-sidebar has-one-sidebar row'; } else if ($sidebar_config == "right-sidebar") { $page_wrap_class = 'has-right-sidebar has-one-sidebar row'; } else if ($sidebar_config == "both-sidebars") { $page_wrap_class = 'has-both-sidebars'; } else { $page_wrap_class = 'has-no-sidebar'; } $remove_breadcrumbs = get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $remove_bottom_spacing = get_post_meta($post->ID, 'sf_no_bottom_spacing', true); $remove_top_spacing = get_post_meta($post->ID, 'sf_no_top_spacing', true); if ($remove_bottom_spacing) { $page_wrap_class .= ' no-bottom-spacing'; } if ($remove_top_spacing) { $page_wrap_class .= ' no-top-spacing'; } ?> <?php if ($show_page_title) { ?> <div class="row"> <div class="page-heading span12 clearfix alt-bg <?php echo $page_title_bg; ?>"> <div class="heading-text"> <?php if ($page_title_one) { ?> <h1><?php echo $page_title_one; ?></h1> <?php } else { ?> <h1><?php the_title(); ?></h1> <?php } ?> </div> <?php // BREADCRUMBS if (!$remove_breadcrumbs) { echo sf_breadcrumbs(); } ?> </div> </div> <?php } ?> <!-- Post all pages content --> <?php if (($locations = get_nav_menu_locations()) && $locations['slidenav'] ) { $menu = wp_get_nav_menu_object( $locations['slidenav'] ); $menu_items = wp_get_nav_menu_items($menu->term_id); $pageID = array(); foreach($menu_items as $item) { if($item->object == 'page') $pageID[] = $item->object_id; } query_posts( array( 'post_type' => 'page','post__in' => $pageID, 'posts_per_page' => count($pageID), 'orderby' => 'post__in' ) ); } while(have_posts() ) : the_post(); ?> <!-- <div id="<?php echo $post->post_name;?>" class="section"> --> <div id="pageSlide-<?php echo $post->post_name;?>" class="section" data-anchor="<?php echo $post->post_name;?>"> <div class="inner-page-wrap <?php echo $page_wrap_class; ?> clearfix"> <div id="content"> <div id="main" class="twelvecol first clearfix" role="main"> <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?> role="article" itemscope itemtype="https://schema.org/BlogPosting"> <header class="article-header"> <h1 class="page-title"><?php the_title(); ?></h1> </header> <?php if (($sidebar_config == "left-sidebar") || ($sidebar_config == "right-sidebar")) { ?> <div <?php post_class('clearfix span8'); ?> id="<?php the_ID(); ?>"> <?php } else if ($sidebar_config == "both-sidebars") { ?> <div <?php post_class('clearfix row'); ?> id="<?php the_ID(); ?>"> <?php } else { ?> <div <?php post_class('clearfix'); ?> id="<?php the_ID(); ?>"> <?php } ?> <?php if ($sidebar_config == "both-sidebars") { ?> <div class="page-content span6"> <?php the_content(); ?> <div class="link-pages"><?php wp_link_pages(); ?></div> </div> <aside class="sidebar left-sidebar span3"> <?php dynamic_sidebar($left_sidebar); ?> </aside> <?php } else { ?> <div class="page-content clearfix"> <?php the_content(); ?> </div> <?php } ?> <?php if ($sidebar_config == "left-sidebar") { ?> <aside class="sidebar left-sidebar span4"> <?php dynamic_sidebar($left_sidebar); ?> </aside> <?php } else if ($sidebar_config == "right-sidebar") { ?> <aside class="sidebar right-sidebar span4"> <?php dynamic_sidebar($right_sidebar); ?> </aside> <?php } else if ($sidebar_config == "both-sidebars") { ?> <aside class="sidebar right-sidebar span3"> <?php dynamic_sidebar($right_sidebar); ?> </aside> <?php } ?> </div> </article> </div> </div> </div> </div> <!-- end of page div--> <?php endwhile;?> <!-- end of query --> <?php get_footer(); ?>
Forum: Hacks
In reply to: display child pages with anchors working with full page.jsThanks for the reply! Still bit over my head, but now i have something to work on. Google is my friend ??
And thanks for the headsup on the </article> tag!
/J
Forum: Plugins
In reply to: [Advanced post slider] Link opens in new window/tabHad the same problem, solved it by going to advanced-post-slider.php, and there found this codesnippet: _blank. Change all of them to _self, and it will solve it.
Forum: Fixing WordPress
In reply to: Create a postgrid (2 columns)Its the row on the right. The posts are to wide at the moment, but ill fix that. just was trying to figure out how to make it into a grid.
Forum: Fixing WordPress
In reply to: Create a postgrid (2 columns)Thanks for the reply, heres the link to the site. Very rough, and a lot of “i-dont-know-what-im-doing” typ of coding…