Fxam
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble ThemeHi BCW,
yes I am using the built in WP editor. Thanks for your advice!I restored the file “theme_actions.php” from the theme download and now every thing is back the way it was.
I am using a theme called Marble and I would like to change the order in which the portfolio isotope filters are displayed!
In the theme the filters are displayed in alphabetical order by category as follows:
ALL / ARCHIVE / COMMERCIAL / OTHER / SHOWREELI believe to have found the original code that does this in theme_actions.php it looks like this:
/* * Displays the isotope filters for the portfolio */ add_action( 'ebor_portfolio_filters', 'ebor_portfolio_filters_markup', 10 ); function ebor_portfolio_filters_markup(){ $output = ''; $output = '<ul class="filter"><li><a class="active" href="#" data-filter="*">'.__('All','marble').'</a></li>'; $categories = get_categories('taxonomy=portfolio-category'); foreach ($categories as $category){ $output .= '<li><a href="#" data-filter=".' . $category->slug . '">' . $category->name . '</a></li>'; } $output .= '</ul>'; echo $output; } /*
Please see https://newpage.felipeascacibar.com/
I would like the filters to be displayed as follows:
SHOWREEL COMMERCIAL ARCHIVE OTHERI was able to remove the “/” between filters in the custom.css by adding:
.fix-portfolio .filter li:after { content: ""; }
and I removed the “ALL” portfolio filter which was displayed first in the theme by default by deleting it from theme_actions.php:
*/ add_action( 'ebor_portfolio_filters', 'ebor_portfolio_filters_markup', 10 ); function ebor_portfolio_filters_markup(){ $output = ''; $output = '<ul class="filter"><li><a class="active" href="#" data-filter="*">'.__('').'</a></li>'; $categories = get_categories('taxonomy=portfolio-category'); foreach ($categories as $category){ $output .= '<li><a href="#" data-filter=".' . $category->slug . '">' . $category->name . '</a></li>'; }
So far so good. It seems to work the way I would like it to! ?? Any remarks? Do you have any better Ideas so far?
I read in a thread that it was possible to order the filters by slug so I gave SHOWREEL slug=1, COMMERCIAL slug=2, ARCHIVE slug=3 and OTHER slug=4.
I tried to re-format the taxonomy argument into array format like you suggested and continued with the foreeach loop. Like this:
*/ add_action( 'ebor_portfolio_filters', 'ebor_portfolio_filters_markup', 10 ); function ebor_portfolio_filters_markup(){ $output = ''; $output = '<ul class="filter"><li><a class="active" href="#" data-filter="*"></a></li>'; $categories = get_categories( array( 'taxonomy' => 'portfolio-category', 'orderby' => 'slug', )); foreach ($categories as $category){ $output .= '<li><a href="#" data-filter=".' . $category->slug . '">' . $category->name . '</a></li>'; } $output .= '</ul>'; echo $output; } /*
But after refreshing my browser all I get is and error message:
Parse error: syntax error, unexpected ‘*’ in /homepages/8/d39654049/htdocs/wp_felipe/wp-content/themes/marble/ebor_framework/theme_actions.php on line 56
And from there I have to restore the theme_actions.php from the theme download all over again. ??
Any Idea what I am doing wrong?
Thanks for your help I really appreciate it!!!
Cheers, FxamForum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble Themeline 80 is:
if( get_post_meta( $post->ID, '_cmb_the_client_date', true ) && get_option('portfolio_date', '1') == 1 ){
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble ThemeParse error: syntax error, unexpected ‘}’ in /homepages/8/d39654049/htdocs/wp_felipe/wp-content/themes/marble/ebor_framework/theme_actions.php on line 80
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble Themedamm! now I have really messed it up ??
Ahhhhhhhhhh…. cant undo???
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble ThemeI also tried:
*/ add_action( 'ebor_portfolio_filters', 'ebor_portfolio_filters_markup', 10 ); function ebor_portfolio_filters_markup(){ $output = ''; $output = '<ul class="filter"><li><a class="active" href="#" data-filter="*"></a></li>'; $categories = get_categories( array( 'taxonomy' => 'portfolio-category', 'orderby' => 'slug', )); foreach ($categories as $category){ $output .= '<li><a href="#" data-filter=".' . $category->slug . '">' . $category->name . '</a></li>'; } $output .= '</ul>'; echo $output; } /*
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble ThemeThanks! Unfortunately there is still a problem?
*/ add_action( 'ebor_portfolio_filters', 'ebor_portfolio_filters_markup', 10 ); function ebor_portfolio_filters_markup(){ $output = ''; $output = '<ul class="filter"><li><a class="active" href="#" data-filter="*"></a></li>'; $categories = get_categories( array( 'taxonomy' => 'portfolio-category', 'orderby' => 'slug',)); foreach ($categories as $category){ $output .= '<li><a href="#" data-filter=".' . $category->slug . '">' . $category->name . '</a></li>'; } $output .= '</ul>'; echo $output; } /*
Forum: Themes and Templates
In reply to: Custom Order Portfolio Filters Marble ThemeForum: Themes and Templates
In reply to: [Customizr] Multiple stylesHi guys,
I am have a similar problem and was wondering if this also works for single page themes?The theme i’m using wants me to use a custom.css instead of editing the styls.css. I have managed to change the colors of almost everything just not the page sections headers that I want to change independently.
Help would be greatly appreciated! (see dvfx.de)
Thanks!