February 17, 2014 at 1:56 pm #224946
hi again kriesi,
– created a custom post type for recipes (with types plugin)
– copied and changed single.php and loop.php to my child theme
– later i want to integrate some custom fields to build a new layout
what i try to do now is to change the html to output schema.org relevant tags, what seems to happen (for example) here:
echo "<article class='".implode(" ", get_post_class('post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)).">";
within the loop.php
may you help me to get this working?
reneFebruary 17, 2014 at 2:31 pm #224958
i tried as follows:
– created a folder “includes” in child theme
– copied and renamed (to: alternative-markup.php) the avia-markup.php from enfold theme to includes
– made my alternative markup on this file and changed function name to function alternative_markup_helper
– added require_once( ‘includes/alternative-markup.php’ ); to my functions.php
– changed all avia_markup_helper to alternative_markup_helper in cpt files: my-loop.php and my-single.php
but… does not work :-/
is there a better solution? can you find my mistake?
reneFebruary 17, 2014 at 11:55 pm #225191
Unfortunately for that level of customization and debugging you’ll need to have a freelance developer go over your code/changes. There are just too many small things that could be effecting to guess or look through via support.
DevinFebruary 18, 2014 at 5:10 pm #225573February 19, 2014 at 10:33 am #226087
You can use the “avf_markup_helper_attributes” filter (can be found in wp-content/themes/enfold/includes/helper-markup.php) to add new attributes to the markup output. The $args variable contains all necessary parameters like context, post type, etc. and imo you don’t need to replace the avia_markup_helper function with a custom function. However if you’re not familiar with the concept and/or usage of filters please hire a freelancer.
PeterFebruary 19, 2014 at 12:32 pm #226120
thats what i was looking for .-)
thanx a lot dude!
as i will hold main theme update ready i think its the easiest way to redefine $args in the template files.
do you have an idea how to “append” definitons to a function defined in enfold?
thats one thing i would need to manage such requests “the clean way”
reneFebruary 20, 2014 at 6:07 pm #226925
You must be logged in to reply to this topic.